Package de.hybris.platform.jalo.type
Class TypeManager
java.lang.Object
de.hybris.platform.jalo.Manager
de.hybris.platform.jalo.type.TypeManager
- All Implemented Interfaces:
ItemLifecycleListener,Serializable
Deprecated.
Basic functionality for creating and searching for types.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classDeprecated.Nested classes/interfaces inherited from class de.hybris.platform.jalo.Manager
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDeprecated.protected voidcheckBeforeItemRemoval(SessionContext ctx, Item item) Deprecated.Avoiding calls to ejb layer except forAttributeDescriptorandTypeinstances.protected voidcheckForRelationAttribute(boolean localized, AttributeDescriptor fd) Deprecated.createAtomicType(PK pkBase, AtomicType superType, Class javaClass) Deprecated.since ages - use ModelService.create to create instancescreateAtomicType(PK pkBase, AtomicType superType, String code) Deprecated.since ages - use ModelService.create to create instancescreateAtomicType(PK pkBase, Class javaClass) Deprecated.since ages - use ModelService.create to create instancescreateAtomicType(AtomicType superType, Class javaClass) Deprecated.since ages - use ModelService.create to create instancescreateAtomicType(AtomicType superType, String code) Deprecated.since ages - use ModelService.create to create instancescreateAtomicType(Class javaClass) Deprecated.since ages - use ModelService.create to create instancescreateCollectionType(PK pk, String code, Type type) Deprecated.since ages - use ModelService.create to create instancescreateCollectionType(PK pkBase, String code, Type type, int typeOfCollection) Deprecated.since ages - use ModelService.create to create instancescreateCollectionType(String code, Type type) Deprecated.since ages - use ModelService.create to create instancescreateCollectionType(String code, Type type, int typeOfCollection) Deprecated.since ages - use ModelService.create to create instancescreateComposedType(PK pkBase, ComposedType superType, String code) Deprecated.since ages - use ModelService.create to create instancescreateComposedType(ComposedType superType, String code) Deprecated.since ages - use ModelService.create to create instancescreateMapType(PK pkBase, String code, Type argumentType, Type returnType) Deprecated.since ages - use ModelService.create to create instancescreateMapType(String code, Type argumentType, Type returnType) Deprecated.since ages - use ModelService.create to create instancescreateRelationAttribute(PK pkBase, String relationName, ComposedType enclosingType, String qualifier, ComposedType attributeType, int modifiers, boolean localized) Deprecated.since ages - use proper service to create instancescreateRelationAttribute(PK pkBase, String relationName, ComposedType enclosingType, String qualifier, ComposedType attributeType, int modifiers, boolean localized, int typeOfCollection) Deprecated.since ages - use proper service to create instancesprotected RelationDescriptorcreateRelationDescriptor(PK pk, String relationName, ComposedType enclosingType, String qualifier, ComposedType otherEndItemType, int modifiers, boolean localized) Deprecated.since ages - use proper service to create instancesprotected RelationDescriptorcreateRelationDescriptor(String relationName, ComposedType enclosingType, String qualifier, ComposedType otherEndItemType, int modifiers, boolean localized) Deprecated.since ages - use proper service to create instancescreateRelationType(PK pk, String relationName, boolean localized, AttributeDescriptor sourceFD, AttributeDescriptor targetFD) Deprecated.since ages - use proper service to create instancescreateRelationType(String relationName, boolean localized, AttributeDescriptor sourceFD, AttributeDescriptor targetFD) Deprecated.since ages - use proper service to create instancescreateRestriction(String code, Principal principal, ComposedType restrictedType, String query) Deprecated.since ages - use ModelService.create to create instancesSet<? extends AtomicType>Deprecated.since ages - - write own flexible search to fetch desired typesSet<? extends CollectionType>Deprecated.since ages - - write own flexible search to fetch desired typesSet<? extends ComposedType>Deprecated.since ages - - write own flexible search to fetch desired typesDeprecated.since ages - - write own flexible search to fetch desired typesDeprecated.since ages - - write own flexible search to fetch desired typesgetAtomicTypesForJavaClass(Class javaClass) Deprecated.since ages - use TypeService instead.getComposedType(Class jaloClass) Deprecated.since ages - use TypeService instead.getComposedType(String code) Deprecated.since ages - use TypeService insteadstatic TypeManagerDeprecated.Deprecated.getRestrictions(Principal principal, ComposedType type) Deprecated.since ages - use SearchRestrictionService or FlexibleSearch insteadgetRootAtomicType(Class javaClass) Deprecated.getRootComposedType(int typeCode) Deprecated.The type matching an item ejb typecode.getRootComposedType(Class jaloClass) Deprecated.Finds the top most composed type starting with the one matching the given jalo class ( seegetComposedType(Class)for match by jalo class ).getRootComposedTypeForJaloClass(Class jaloClass) Deprecated.getSearchRestriction(ComposedType ct, String code) Deprecated.since ages - use SearchRestrictionService or FlexibleSearch insteadgetSearchRestrictions(Principal principal, ComposedType restrictedType) Deprecated.since ages - replaced byFlexibleSearch.getQueryFilters(Principal, ComposedType, boolean, boolean, boolean)getSearchRestrictions(Principal principal, ComposedType type, boolean includeGroups, boolean includeSuperTypes, boolean includeSubtypes) Deprecated.since ages - replaced byFlexibleSearch.getQueryFilters(Principal, ComposedType, boolean, boolean, boolean)Deprecated.since ages - use TypeService.getTypeForCode() instead.protected TypeManagerEJBDeprecated.voidinit()Deprecated.called once for each tenant, so this method fits best to perform some initialization stuffprotected voidnotifyItemRemoval(SessionContext ctx, Item item) Deprecated.Superclass method overridden to avoid call to ajb layer.Deprecated.Methods inherited from class de.hybris.platform.jalo.Manager
afterItemCreation, beforeItemCreation, destroy, extractNonRequiredRemoteFromItem, extractRequiredRemoteFromItem, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemote, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, setAttribute, setTenant, setTransientObject, wrap
-
Field Details
-
BEAN_NAME
Deprecated.- See Also:
-
-
Constructor Details
-
TypeManager
public TypeManager()Deprecated.
-
-
Method Details
-
init
public void init()Deprecated.Description copied from class:Managercalled once for each tenant, so this method fits best to perform some initialization stuff -
getRemoteManagerClass
Deprecated.- Overrides:
getRemoteManagerClassin classManager
-
getInstance
Deprecated.- Returns:
- instance of this manager
-
getType
@Deprecated(since="ages", forRemoval=false) public Type getType(String code) throws JaloItemNotFoundException Deprecated.since ages - use TypeService.getTypeForCode() instead.Returns the type for the given code.- Parameters:
code- The code of the searched type.- Returns:
- the
Typewith the given code. - Throws:
JaloItemNotFoundException- if there is noTypewith the given code.
-
checkBeforeItemRemoval
protected void checkBeforeItemRemoval(SessionContext ctx, Item item) throws ConsistencyCheckException Deprecated.Avoiding calls to ejb layer except forAttributeDescriptorandTypeinstances.- Overrides:
checkBeforeItemRemovalin classManager- Parameters:
ctx- the current session contextitem- the item which should be removed- Throws:
ConsistencyCheckException- thrown to abort removal due to consistency errors- Since:
- 2.10
-
notifyItemRemoval
Deprecated.Superclass method overridden to avoid call to ajb layer. Removes allrestrictionsfor aPrincipalwhich is going to be removed.- Overrides:
notifyItemRemovalin classManager- Parameters:
ctx- the currency session contextitem- the item which is going to be removed- Since:
- 2.10
-
getAllTypes
Deprecated.since ages - - write own flexible search to fetch desired types- Returns:
- all atomic, collection, map, composed and product types
-
getAllAtomicTypes
Deprecated.since ages - - write own flexible search to fetch desired types- Returns:
- all atomic types
-
getAllComposedTypes
@Deprecated(since="ages", forRemoval=false) public Set<? extends ComposedType> getAllComposedTypes()Deprecated.since ages - - write own flexible search to fetch desired types- Returns:
- all composed types
-
getAllCollectionTypes
@Deprecated(since="ages", forRemoval=false) public Set<? extends CollectionType> getAllCollectionTypes()Deprecated.since ages - - write own flexible search to fetch desired types- Returns:
- all collection types
-
getAllMapTypes
Deprecated.since ages - - write own flexible search to fetch desired types- Returns:
- all map types
-
getAtomicTypesForJavaClass
Deprecated.since ages - use TypeService instead. -
getRootAtomicType
Deprecated.- Throws:
JaloItemNotFoundException
-
getComposedType
@Deprecated(since="ages", forRemoval=false) public ComposedType getComposedType(Class jaloClass) throws JaloItemNotFoundException Deprecated.since ages - use TypeService instead.Finds the composed type which matches a certain jalo class. Since there may be multiple types having one jalo class in case subtypes didnt get own jalo classes the root type will be returned. Means: the top most type having this jalo class is returned.- Parameters:
jaloClass- the jalo class which the type have to match exactly- Returns:
- the
ComposedType - Throws:
JaloItemNotFoundException- in case there is no such type
-
getRootComposedType
Deprecated.Finds the top most composed type starting with the one matching the given jalo class ( seegetComposedType(Class)for match by jalo class ). if the jalo class type is already abstract it will be returned, otherwise its top most non-abstract super-type.- Parameters:
jaloClass- the jalo class matching the start type- Returns:
- the
ComposedType - Throws:
JaloItemNotFoundException- if no type matched the jalo class
-
getRootComposedType
Deprecated.The type matching an item ejb typecode. since there may be multiple types having one typecode the root type will be returned. This means: the top most type having this typecode is returned.- Parameters:
typeCode- the item ejb typecode- Returns:
- the
ComposedType - Throws:
JaloItemNotFoundException- if no such type exist
-
getComposedType
@Deprecated(since="ages", forRemoval=false) public ComposedType getComposedType(String code) throws JaloItemNotFoundException Deprecated.since ages - use TypeService insteadMatches a type by its code- Parameters:
code- the exact code of the type- Returns:
- the
ComposedType - Throws:
JaloItemNotFoundException- if no such type exist
-
createAtomicType
@Deprecated(since="ages", forRemoval=false) public AtomicType createAtomicType(Class javaClass) throws JaloInvalidParameterException, JaloDuplicateCodeException Deprecated.since ages - use ModelService.create to create instancesCreates a newAtomicTypefor the given class.- Parameters:
javaClass- the class of theAtomicTypewhich should be created- Returns:
- the new
AtomicType - Throws:
JaloInvalidParameterException- if the given class is not a valid class for anAtomicTypeJaloDuplicateCodeException- if the already exists aAtomicTypewith the given class.
-
createAtomicType
@Deprecated(since="ages", forRemoval=false) public AtomicType createAtomicType(PK pkBase, Class javaClass) throws JaloDuplicateCodeException, JaloInvalidParameterException Deprecated.since ages - use ModelService.create to create instancesCreates a newAtomicTypefor the given class.- Parameters:
pkBase- the pk for the new item; it will be equipped with type code additionally (- ) javaClass- the class of theAtomicTypewhich should be created- Returns:
- the new
AtomicType - Throws:
JaloInvalidParameterException- if the given class is not a valid class for anAtomicTypeJaloDuplicateCodeException- if the already exists aAtomicTypewith the given class.
-
createAtomicType
@Deprecated(since="ages", forRemoval=false) public AtomicType createAtomicType(AtomicType superType, Class javaClass) throws JaloInvalidParameterException, JaloDuplicateCodeException Deprecated.since ages - use ModelService.create to create instancesCreates a newAtomicTypefor the given class.- Parameters:
superType- the super type of theAtomicTypewhich should be createdjavaClass- the class of theAtomicTypewhich should be created- Returns:
- the new
AtomicType - Throws:
JaloInvalidParameterException- if the given class is not a valid class for anAtomicTypeJaloDuplicateCodeException- if the already exists aAtomicTypewith the given class.
-
createAtomicType
@Deprecated(since="ages", forRemoval=false) public AtomicType createAtomicType(PK pkBase, AtomicType superType, Class javaClass) throws JaloDuplicateCodeException, JaloInvalidParameterException Deprecated.since ages - use ModelService.create to create instancesCreates a newAtomicTypefor the given class.- Parameters:
pkBase- the pk for the new item; it will be equipped with type code additionally (- ) superType- the super type of theAtomicTypewhich should be createdjavaClass- the class of theAtomicTypewhich should be created- Returns:
- the new
AtomicType - Throws:
JaloInvalidParameterException- if the given class is not a valid class for anAtomicTypeJaloDuplicateCodeException- if the already exists aAtomicTypewith the given class.
-
createAtomicType
@Deprecated(since="ages", forRemoval=false) public AtomicType createAtomicType(AtomicType superType, String code) throws JaloInvalidParameterException, JaloDuplicateCodeException Deprecated.since ages - use ModelService.create to create instancesCreates a newAtomicTypefor the given class.- Parameters:
superType- the super type of theAtomicTypewhich should be createdcode- the code of theAtomicTypewhich should be created- Returns:
- the new
AtomicType - Throws:
JaloInvalidParameterException- if any of the parameters isnullJaloDuplicateCodeException- if the already exists aAtomicTypewith the given class.
-
createAtomicType
@Deprecated(since="ages", forRemoval=false) public AtomicType createAtomicType(PK pkBase, AtomicType superType, String code) throws JaloDuplicateCodeException, JaloInvalidParameterException Deprecated.since ages - use ModelService.create to create instancesCreates a newAtomicTypefor the given class.- Parameters:
pkBase- the pk for the new item; it will be equipped with type code additionally (- ) superType- the super type of theAtomicTypewhich should be createdcode- the code of theAtomicTypewhich should be created- Returns:
- the new
AtomicType - Throws:
JaloInvalidParameterException- if any of the parameters isnullJaloDuplicateCodeException- if the already exists aAtomicTypewith the given class.
-
createComposedType
@Deprecated(since="ages", forRemoval=false) public ComposedType createComposedType(ComposedType superType, String code) throws JaloInvalidParameterException, JaloDuplicateCodeException Deprecated.since ages - use ModelService.create to create instances -
createComposedType
@Deprecated(since="ages", forRemoval=false) public ComposedType createComposedType(PK pkBase, ComposedType superType, String code) throws JaloDuplicateCodeException, JaloInvalidParameterException Deprecated.since ages - use ModelService.create to create instances -
createCollectionType
@Deprecated(since="ages", forRemoval=false) public CollectionType createCollectionType(String code, Type type) throws JaloInvalidParameterException, JaloDuplicateCodeException Deprecated.since ages - use ModelService.create to create instances -
createCollectionType
@Deprecated(since="ages", forRemoval=false) public CollectionType createCollectionType(PK pk, String code, Type type) throws JaloInvalidParameterException, JaloDuplicateCodeException Deprecated.since ages - use ModelService.create to create instances -
createCollectionType
@Deprecated(since="ages", forRemoval=false) public CollectionType createCollectionType(String code, Type type, int typeOfCollection) throws JaloInvalidParameterException, JaloDuplicateCodeException Deprecated.since ages - use ModelService.create to create instances -
createCollectionType
@Deprecated(since="ages", forRemoval=false) public CollectionType createCollectionType(PK pkBase, String code, Type type, int typeOfCollection) throws JaloDuplicateCodeException, JaloInvalidParameterException Deprecated.since ages - use ModelService.create to create instances -
createMapType
@Deprecated(since="ages", forRemoval=false) public MapType createMapType(String code, Type argumentType, Type returnType) throws JaloInvalidParameterException, JaloDuplicateCodeException Deprecated.since ages - use ModelService.create to create instances -
createMapType
@Deprecated(since="ages", forRemoval=false) public MapType createMapType(PK pkBase, String code, Type argumentType, Type returnType) throws JaloDuplicateCodeException, JaloInvalidParameterException Deprecated.since ages - use ModelService.create to create instances -
createRestriction
@Deprecated(since="ages", forRemoval=false) public SearchRestriction createRestriction(String code, Principal principal, ComposedType restrictedType, String query) throws JaloInvalidParameterException Deprecated.since ages - use ModelService.create to create instances- Throws:
JaloInvalidParameterException
-
getSearchRestriction
@Deprecated(since="ages", forRemoval=false) public SearchRestriction getSearchRestriction(ComposedType ct, String code) Deprecated.since ages - use SearchRestrictionService or FlexibleSearch instead- Since:
- 2.10
-
getSearchRestrictions
@Deprecated(since="ages", forRemoval=false) public Collection getSearchRestrictions(Principal principal, ComposedType restrictedType) Deprecated.since ages - replaced byFlexibleSearch.getQueryFilters(Principal, ComposedType, boolean, boolean, boolean)Finds the search restrictions of the given principal upon the given type. please note that neither the principal groups nor supertypes and subtype are included here.- Parameters:
principal- thePrincipalrestrictedType- the restrictedComposedType- Returns:
- a
Collectionof all restrictions for the givenPrincipalon the givenComposedType
-
getSearchRestrictions
@Deprecated(since="ages", forRemoval=false) public Collection<SearchRestriction> getSearchRestrictions(Principal principal, ComposedType type, boolean includeGroups, boolean includeSuperTypes, boolean includeSubtypes) Deprecated.since ages - replaced byFlexibleSearch.getQueryFilters(Principal, ComposedType, boolean, boolean, boolean)Finds the search restrictions of the given principal upon the given type.- Parameters:
principal- thePrincipaltype- the restrictedComposedTypeincludeGroups- if true restrictions for all groups of the principal are includedincludeSuperTypes- if true restrictions for all supertypes of the type are includedincludeSubtypes- if true restrictions for all subtypes of the type are included- Returns:
- a
Collectionof all restrictions for the givenPrincipalon the givenComposedType
-
createRelationType
@Deprecated(since="ages", forRemoval=false) public RelationType createRelationType(String relationName, boolean localized, AttributeDescriptor sourceFD, AttributeDescriptor targetFD) throws JaloInvalidParameterException, JaloDuplicateCodeException, JaloDuplicateQualifierException Deprecated.since ages - use proper service to create instances -
createRelationType
@Deprecated(since="ages", forRemoval=false) public RelationType createRelationType(PK pk, String relationName, boolean localized, AttributeDescriptor sourceFD, AttributeDescriptor targetFD) throws JaloInvalidParameterException, JaloDuplicateCodeException, JaloDuplicateQualifierException Deprecated.since ages - use proper service to create instances -
createRelationDescriptor
@Deprecated(since="ages", forRemoval=false) protected RelationDescriptor createRelationDescriptor(String relationName, ComposedType enclosingType, String qualifier, ComposedType otherEndItemType, int modifiers, boolean localized) throws JaloDuplicateQualifierException Deprecated.since ages - use proper service to create instancesCreates a relation attribute. This attribute is already typed as relation attribute but not connected to a relation type. Use this method only for creating new relation types.- Parameters:
relationName- the name of the new relatonenclosingType- the owning type of this attribute ( this is not the relation type ! )qualifier- the qualifier of the relation attributeotherEndItemType- the type of the other end of the new relationmodifiers- the attribute modifierslocalized- whether the relation is localized or not- Returns:
- the new
RelationDescriptor - Throws:
JaloDuplicateQualifierException- in case the owning type already got attribute with the given qualifier
-
createRelationDescriptor
@Deprecated(since="ages", forRemoval=false) protected RelationDescriptor createRelationDescriptor(PK pk, String relationName, ComposedType enclosingType, String qualifier, ComposedType otherEndItemType, int modifiers, boolean localized) throws JaloDuplicateQualifierException Deprecated.since ages - use proper service to create instancesCreates a relation attribute. This attribute is already typed as relation attribute but not connected to a relation type. Use this method only for creating new relation types.- Parameters:
pk- the pk for the new item; it will be equipped with type code additionally (- ) relationName- the name of the new relatonenclosingType- the owning type of this attribute ( this is not the relation type ! )qualifier- the qualifier of the relation attributeotherEndItemType- the type of the other end of the new relationmodifiers- the attribute modifierslocalized- whether the relation is localized or not- Returns:
- the new
RelationDescriptor - Throws:
JaloDuplicateQualifierException- in case the owning type already got attribute with the given qualifier
-
checkForRelationAttribute
Deprecated. -
getTypeManagerEJB
Deprecated. -
getRootComposedTypeForJaloClass
public ComposedType getRootComposedTypeForJaloClass(Class jaloClass) throws JaloItemNotFoundException Deprecated.- Throws:
JaloItemNotFoundException
-
getRestrictions
@Deprecated(since="ages", forRemoval=false) public Collection getRestrictions(Principal principal, ComposedType type) Deprecated.since ages - use SearchRestrictionService or FlexibleSearch instead -
createRelationAttribute
@Deprecated(since="ages", forRemoval=false) public RelationDescriptor createRelationAttribute(PK pkBase, String relationName, ComposedType enclosingType, String qualifier, ComposedType attributeType, int modifiers, boolean localized) throws JaloDuplicateQualifierException Deprecated.since ages - use proper service to create instances- Throws:
JaloDuplicateQualifierException
-
createRelationAttribute
@Deprecated(since="ages", forRemoval=false) public RelationDescriptor createRelationAttribute(PK pkBase, String relationName, ComposedType enclosingType, String qualifier, ComposedType attributeType, int modifiers, boolean localized, int typeOfCollection) throws JaloDuplicateQualifierException Deprecated.since ages - use proper service to create instances- Throws:
JaloDuplicateQualifierException
-
assureNoItem
Deprecated.- Throws:
JaloInvalidParameterException
-
writeReplace
Deprecated.- Specified by:
writeReplacein classManager- Throws:
ObjectStreamException
-
TypeDaoinstead