/** * Retrieves a list of product property attributes defined for a product type. * * <p> * * <pre><code> * ProductTypeProperty producttypeproperty = new ProductTypeProperty(); * AttributeInProductType attributeInProductType = producttypeproperty.getProperties( productTypeId); * </code></pre> * * @param productTypeId Identifier of the product type. * @param dataViewMode DataViewMode * @return List<com.mozu.api.contracts.productadmin.AttributeInProductType> * @see com.mozu.api.contracts.productadmin.AttributeInProductType */ public List<com.mozu.api.contracts.productadmin.AttributeInProductType> getProperties( Integer productTypeId) throws Exception { MozuClient<List<com.mozu.api.contracts.productadmin.AttributeInProductType>> client = com.mozu.api.clients.commerce.catalog.admin.attributedefinition.producttypes .ProductTypePropertyClient.getPropertiesClient(_dataViewMode, productTypeId); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); }
/** * Removes a property attribute previously defined for the specified product type. * * <p> * * <pre><code> * ProductTypeProperty producttypeproperty = new ProductTypeProperty(); * producttypeproperty.deleteProperty( productTypeId, attributeFQN); * </code></pre> * * @param attributeFQN The fully qualified name of the attribute, which is a user defined * attribute identifier. * @param productTypeId Identifier of the product type. * @param dataViewMode DataViewMode * @return */ public void deleteProperty(Integer productTypeId, String attributeFQN) throws Exception { MozuClient client = com.mozu.api.clients.commerce.catalog.admin.attributedefinition.producttypes .ProductTypePropertyClient.deletePropertyClient( _dataViewMode, productTypeId, attributeFQN); client.setContext(_apiContext); client.executeRequest(); client.cleanupHttpConnection(); }
/** * Retrieves a list of product property attributes defined for a product type. * * <p> * * <pre><code> * ProductTypeProperty producttypeproperty = new ProductTypeProperty(); * CountDownLatch latch = producttypeproperty.getProperties( productTypeId, callback ); * latch.await() * </code></pre> * * @param productTypeId Identifier of the product type. * @param callback callback handler for asynchronous operations * @param dataViewMode DataViewMode * @return List<com.mozu.api.contracts.productadmin.AttributeInProductType> * @see com.mozu.api.contracts.productadmin.AttributeInProductType */ public CountDownLatch getPropertiesAsync( Integer productTypeId, AsyncCallback<List<com.mozu.api.contracts.productadmin.AttributeInProductType>> callback) throws Exception { MozuClient<List<com.mozu.api.contracts.productadmin.AttributeInProductType>> client = com.mozu.api.clients.commerce.catalog.admin.attributedefinition.producttypes .ProductTypePropertyClient.getPropertiesClient(_dataViewMode, productTypeId); client.setContext(_apiContext); return client.executeRequest(callback); }
/** * Retrieves a product property attribute definition for the specified product type. * * <p> * * <pre><code> * ProductTypeProperty producttypeproperty = new ProductTypeProperty(); * AttributeInProductType attributeInProductType = producttypeproperty.getProperty( productTypeId, attributeFQN, responseFields); * </code></pre> * * @param attributeFQN The fully qualified name of the attribute, which is a user defined * attribute identifier. * @param productTypeId Identifier of the product type. * @param responseFields Use this field to include those fields which are not included by default. * @param dataViewMode DataViewMode * @return com.mozu.api.contracts.productadmin.AttributeInProductType * @see com.mozu.api.contracts.productadmin.AttributeInProductType */ public com.mozu.api.contracts.productadmin.AttributeInProductType getProperty( Integer productTypeId, String attributeFQN, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.AttributeInProductType> client = com.mozu.api.clients.commerce.catalog.admin.attributedefinition.producttypes .ProductTypePropertyClient.getPropertyClient( _dataViewMode, productTypeId, attributeFQN, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); }
/** * Assigns a property attribute to the specified product type, according to the information * defined in the request. * * <p> * * <pre><code> * ProductTypeProperty producttypeproperty = new ProductTypeProperty(); * CountDownLatch latch = producttypeproperty.addProperty( attributeInProductType, productTypeId, responseFields, callback ); * latch.await() * </code></pre> * * @param productTypeId Identifier of the product type. * @param responseFields Use this field to include those fields which are not included by default. * @param callback callback handler for asynchronous operations * @param dataViewMode DataViewMode * @param attributeInProductType Properties of an attribute definition associated with a specific * product type. When an attribute is applied to a product type, each product of that type * maintains the same set of attributes. * @return com.mozu.api.contracts.productadmin.AttributeInProductType * @see com.mozu.api.contracts.productadmin.AttributeInProductType * @see com.mozu.api.contracts.productadmin.AttributeInProductType */ public CountDownLatch addPropertyAsync( com.mozu.api.contracts.productadmin.AttributeInProductType attributeInProductType, Integer productTypeId, String responseFields, AsyncCallback<com.mozu.api.contracts.productadmin.AttributeInProductType> callback) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.AttributeInProductType> client = com.mozu.api.clients.commerce.catalog.admin.attributedefinition.producttypes .ProductTypePropertyClient.addPropertyClient( _dataViewMode, attributeInProductType, productTypeId, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); }