|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.elasticpath.service.impl.AbstractEpServiceImpl
com.elasticpath.service.impl.AbstractEpPersistenceServiceImpl
com.elasticpath.service.attribute.impl.AttributeServiceImpl
public class AttributeServiceImpl
Default implementation for AttributeService.
| Constructor Summary | |
|---|---|
AttributeServiceImpl()
|
|
| Method Summary | |
|---|---|
Attribute |
add(Attribute attribute)
Adds the given attribute. |
Attribute |
findByKey(java.lang.String key)
Find the attribute with the given key. |
Attribute |
get(long attributeUid)
Get the attribute with the given UID. |
java.util.List |
getAttributeInUseUidList()
Return a list of uids for all attributes in use, exclude the customer profile attributes. |
java.util.List |
getAttributesExcludeCustomerProfile()
Returns a list of attributes exclude customer profile attribute. |
java.util.Map |
getAttributeTypeMap()
Return the map for attribute type value-description. |
java.util.Map |
getAttributeUsageMap()
Return the map for attribute usage value-description. |
java.util.List |
getCategoryAttributes()
Return a list of category attributes. |
java.util.List |
getCustomerProfileAttributeInUseUidList()
Return a list of uids for all customer profile attributes in use. |
java.util.List |
getCustomerProfileAttributes()
Returns a list of customer profile attributes. |
java.util.Map |
getCustomerProfileAttributesMap()
Returns a map of all system attributes. |
java.util.List |
getDistinctAttributeValueList(Attribute attribute,
java.lang.String languageCode)
For a given attribute, the set of distinct values currently existing for that attribute is returned. |
java.lang.Object |
getObject(long uid)
Generic load method for all persistable domain models. |
java.util.List |
getProductAttributes()
Return a list of attributes used for products. |
java.util.List |
getSkuAttributes()
Return a list of attributes used for skus. |
boolean |
keyExists(Attribute attribute)
Check whether the given attribute's key exists or not. |
boolean |
keyExists(java.lang.String key)
Checks whether the given attribute key exists or not. |
java.util.List |
list()
Lists all attribute stored in the database. |
Attribute |
load(long attributeUid)
Load the attribute with the given UID. |
void |
remove(Attribute attribute)
Delete the attribute. |
void |
setDistinctAttributeValueCriterion(DistinctAttributeValueCriterion distinctAttributeValueCriterion)
Sets the generator for criteria used to query the persistence layer for distinct lists of attribute values. |
void |
update(Attribute attribute)
Updates the given attribute. |
| Methods inherited from class com.elasticpath.service.impl.AbstractEpPersistenceServiceImpl |
|---|
getPersistenceEngine, setPersistenceEngine |
| Methods inherited from class com.elasticpath.service.impl.AbstractEpServiceImpl |
|---|
getElasticPath, setElasticPath |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.elasticpath.service.EpPersistenceService |
|---|
getPersistenceEngine, setPersistenceEngine |
| Methods inherited from interface com.elasticpath.service.EpService |
|---|
getElasticPath, setElasticPath |
| Constructor Detail |
|---|
public AttributeServiceImpl()
| Method Detail |
|---|
public Attribute add(Attribute attribute)
throws DuplicateKeyException
add in interface AttributeServiceattribute - the attribute to add
DuplicateKeyException - - if the speicifed attribute key is already in use.
public Attribute findByKey(java.lang.String key)
throws EpServiceException
findByKey in interface AttributeServicekey - the attribute key.
EpServiceException - - in case of any errors
public Attribute get(long attributeUid)
throws EpServiceException
get in interface AttributeServiceattributeUid - the attribute UID
EpServiceException - - in case of any errorspublic java.util.List getAttributeInUseUidList()
getAttributeInUseUidList in interface AttributeServicepublic java.util.List getAttributesExcludeCustomerProfile()
getAttributesExcludeCustomerProfile in interface AttributeServicepublic java.util.Map getAttributeTypeMap()
getAttributeTypeMap in interface AttributeServicepublic java.util.Map getAttributeUsageMap()
getAttributeUsageMap in interface AttributeServicepublic java.util.List getCategoryAttributes()
getCategoryAttributes in interface AttributeServicepublic java.util.List getCustomerProfileAttributeInUseUidList()
getCustomerProfileAttributeInUseUidList in interface AttributeServicepublic java.util.List getCustomerProfileAttributes()
getCustomerProfileAttributes in interface AttributeServicepublic java.util.Map getCustomerProfileAttributesMap()
getCustomerProfileAttributesMap in interface AttributeService
public java.util.List getDistinctAttributeValueList(Attribute attribute,
java.lang.String languageCode)
getDistinctAttributeValueList in interface AttributeServiceattribute - the attribute for which the distinct attribute values are to be returnedlanguageCode - the lower case code of the language for which attributes are to be returned.
AttributeValues
public java.lang.Object getObject(long uid)
throws EpServiceException
getObject in interface EpPersistenceServiceuid - the persisted instance uid
EpServiceException - -
in case of any errorspublic java.util.List getProductAttributes()
getProductAttributes in interface AttributeServicepublic java.util.List getSkuAttributes()
getSkuAttributes in interface AttributeService
public boolean keyExists(Attribute attribute)
throws EpServiceException
keyExists in interface AttributeServiceattribute - the attribute to check
EpServiceException - - in case of any errors
public boolean keyExists(java.lang.String key)
throws EpServiceException
keyExists in interface AttributeServicekey - the attribute key.
EpServiceException - -
in case of any errors
public java.util.List list()
throws EpServiceException
list in interface AttributeServiceEpServiceException - -
in case of any errors
public Attribute load(long attributeUid)
throws EpServiceException
load in interface AttributeServiceattributeUid - the attribute UID
EpServiceException - - in case of any errors
public void remove(Attribute attribute)
throws EpServiceException
remove in interface AttributeServiceattribute - the attribute to remove
EpServiceException - - in case of any errorspublic void setDistinctAttributeValueCriterion(DistinctAttributeValueCriterion distinctAttributeValueCriterion)
setDistinctAttributeValueCriterion in interface AttributeServicedistinctAttributeValueCriterion - the DistinctAttributeValueCriterion
public void update(Attribute attribute)
throws DuplicateKeyException
update in interface AttributeServiceattribute - the attribute to update
DuplicateKeyException - - if the speicifed attribute key is already in use.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||