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,java.io.Serializable
@Deprecated public class TypeManager extends Manager
Deprecated.since ages - - useTypeDaoinsteadBasic functionality for creating and searching for types.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classTypeManager.TypeManagerSerializableDTODeprecated.-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.Manager
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBEAN_NAMEDeprecated.
-
Constructor Summary
Constructors Constructor Description TypeManager()Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidassureNoItem(java.lang.Class c)Deprecated.protected voidcheckBeforeItemRemoval(SessionContext ctx, Item item)Deprecated.Avoiding calls to ejb layer except forAttributeDescriptorandTypeinstances.protected voidcheckForRelationAttribute(boolean localized, AttributeDescriptor fd)Deprecated.AtomicTypecreateAtomicType(PK pkBase, AtomicType superType, java.lang.Class javaClass)Deprecated.since ages - use ModelService.create to create instancesAtomicTypecreateAtomicType(PK pkBase, AtomicType superType, java.lang.String code)Deprecated.since ages - use ModelService.create to create instancesAtomicTypecreateAtomicType(PK pkBase, java.lang.Class javaClass)Deprecated.since ages - use ModelService.create to create instancesAtomicTypecreateAtomicType(AtomicType superType, java.lang.Class javaClass)Deprecated.since ages - use ModelService.create to create instancesAtomicTypecreateAtomicType(AtomicType superType, java.lang.String code)Deprecated.since ages - use ModelService.create to create instancesAtomicTypecreateAtomicType(java.lang.Class javaClass)Deprecated.since ages - use ModelService.create to create instancesCollectionTypecreateCollectionType(PK pk, java.lang.String code, Type type)Deprecated.since ages - use ModelService.create to create instancesCollectionTypecreateCollectionType(PK pkBase, java.lang.String code, Type type, int typeOfCollection)Deprecated.since ages - use ModelService.create to create instancesCollectionTypecreateCollectionType(java.lang.String code, Type type)Deprecated.since ages - use ModelService.create to create instancesCollectionTypecreateCollectionType(java.lang.String code, Type type, int typeOfCollection)Deprecated.since ages - use ModelService.create to create instancesComposedTypecreateComposedType(PK pkBase, ComposedType superType, java.lang.String code)Deprecated.since ages - use ModelService.create to create instancesComposedTypecreateComposedType(ComposedType superType, java.lang.String code)Deprecated.since ages - use ModelService.create to create instancesMapTypecreateMapType(PK pkBase, java.lang.String code, Type argumentType, Type returnType)Deprecated.since ages - use ModelService.create to create instancesMapTypecreateMapType(java.lang.String code, Type argumentType, Type returnType)Deprecated.since ages - use ModelService.create to create instancesRelationDescriptorcreateRelationAttribute(PK pkBase, java.lang.String relationName, ComposedType enclosingType, java.lang.String qualifier, ComposedType attributeType, int modifiers, boolean localized)Deprecated.since ages - use proper service to create instancesRelationDescriptorcreateRelationAttribute(PK pkBase, java.lang.String relationName, ComposedType enclosingType, java.lang.String qualifier, ComposedType attributeType, int modifiers, boolean localized, int typeOfCollection)Deprecated.since ages - use proper service to create instancesprotected RelationDescriptorcreateRelationDescriptor(PK pk, java.lang.String relationName, ComposedType enclosingType, java.lang.String qualifier, ComposedType otherEndItemType, int modifiers, boolean localized)Deprecated.since ages - use proper service to create instancesprotected RelationDescriptorcreateRelationDescriptor(java.lang.String relationName, ComposedType enclosingType, java.lang.String qualifier, ComposedType otherEndItemType, int modifiers, boolean localized)Deprecated.since ages - use proper service to create instancesRelationTypecreateRelationType(PK pk, java.lang.String relationName, boolean localized, AttributeDescriptor sourceFD, AttributeDescriptor targetFD)Deprecated.since ages - use proper service to create instancesRelationTypecreateRelationType(java.lang.String relationName, boolean localized, AttributeDescriptor sourceFD, AttributeDescriptor targetFD)Deprecated.since ages - use proper service to create instancesSearchRestrictioncreateRestriction(java.lang.String code, Principal principal, ComposedType restrictedType, java.lang.String query)Deprecated.since ages - use ModelService.create to create instancesjava.util.Set<? extends AtomicType>getAllAtomicTypes()Deprecated.since ages - - write own flexible search to fetch desired typesjava.util.Set<? extends CollectionType>getAllCollectionTypes()Deprecated.since ages - - write own flexible search to fetch desired typesjava.util.Set<? extends ComposedType>getAllComposedTypes()Deprecated.since ages - - write own flexible search to fetch desired typesjava.util.Set<? extends MapType>getAllMapTypes()Deprecated.since ages - - write own flexible search to fetch desired typesjava.util.SetgetAllTypes()Deprecated.since ages - - write own flexible search to fetch desired typesjava.util.SetgetAtomicTypesForJavaClass(java.lang.Class javaClass)Deprecated.since ages - use TypeService instead.ComposedTypegetComposedType(java.lang.Class jaloClass)Deprecated.since ages - use TypeService instead.ComposedTypegetComposedType(java.lang.String code)Deprecated.since ages - use TypeService insteadstatic TypeManagergetInstance()Deprecated.java.lang.ClassgetRemoteManagerClass()Deprecated.java.util.CollectiongetRestrictions(Principal principal, ComposedType type)Deprecated.since ages - use SearchRestrictionService or FlexibleSearch insteadAtomicTypegetRootAtomicType(java.lang.Class javaClass)Deprecated.ComposedTypegetRootComposedType(int typeCode)Deprecated.The type matching an item ejb typecode.ComposedTypegetRootComposedType(java.lang.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 ).ComposedTypegetRootComposedTypeForJaloClass(java.lang.Class jaloClass)Deprecated.SearchRestrictiongetSearchRestriction(ComposedType ct, java.lang.String code)Deprecated.since ages - use SearchRestrictionService or FlexibleSearch insteadjava.util.CollectiongetSearchRestrictions(Principal principal, ComposedType restrictedType)Deprecated.since ages - replaced byFlexibleSearch.getQueryFilters(Principal, ComposedType, boolean, boolean, boolean)java.util.Collection<SearchRestriction>getSearchRestrictions(Principal principal, ComposedType type, boolean includeGroups, boolean includeSuperTypes, boolean includeSubtypes)Deprecated.since ages - replaced byFlexibleSearch.getQueryFilters(Principal, ComposedType, boolean, boolean, boolean)TypegetType(java.lang.String code)Deprecated.since ages - use TypeService.getTypeForCode() instead.protected TypeManagerEJBgetTypeManagerEJB()Deprecated.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.java.lang.ObjectwriteReplace()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 Detail
-
BEAN_NAME
public static final java.lang.String BEAN_NAME
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
public java.lang.Class getRemoteManagerClass()
Deprecated.- Overrides:
getRemoteManagerClassin classManager
-
getInstance
public static TypeManager getInstance()
Deprecated.- Returns:
- instance of this manager
-
getType
@Deprecated public Type getType(java.lang.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
protected void notifyItemRemoval(SessionContext ctx, Item item)
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 public java.util.Set getAllTypes()
Deprecated.since ages - - write own flexible search to fetch desired types- Returns:
- all atomic, collection, map, composed and product types
-
getAllAtomicTypes
@Deprecated public java.util.Set<? extends AtomicType> getAllAtomicTypes()
Deprecated.since ages - - write own flexible search to fetch desired types- Returns:
- all atomic types
-
getAllComposedTypes
@Deprecated public java.util.Set<? extends ComposedType> getAllComposedTypes()
Deprecated.since ages - - write own flexible search to fetch desired types- Returns:
- all composed types
-
getAllCollectionTypes
@Deprecated public java.util.Set<? extends CollectionType> getAllCollectionTypes()
Deprecated.since ages - - write own flexible search to fetch desired types- Returns:
- all collection types
-
getAllMapTypes
@Deprecated public java.util.Set<? extends MapType> getAllMapTypes()
Deprecated.since ages - - write own flexible search to fetch desired types- Returns:
- all map types
-
getAtomicTypesForJavaClass
@Deprecated public java.util.Set getAtomicTypesForJavaClass(java.lang.Class javaClass)
Deprecated.since ages - use TypeService instead.
-
getRootAtomicType
public AtomicType getRootAtomicType(java.lang.Class javaClass) throws JaloItemNotFoundException
Deprecated.- Throws:
JaloItemNotFoundException
-
getComposedType
@Deprecated public ComposedType getComposedType(java.lang.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
public ComposedType getRootComposedType(java.lang.Class jaloClass) throws JaloItemNotFoundException
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
public ComposedType getRootComposedType(int typeCode) throws JaloItemNotFoundException
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 public ComposedType getComposedType(java.lang.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 public AtomicType createAtomicType(java.lang.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 public AtomicType createAtomicType(PK pkBase, java.lang.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 public AtomicType createAtomicType(AtomicType superType, java.lang.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 public AtomicType createAtomicType(PK pkBase, AtomicType superType, java.lang.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 public AtomicType createAtomicType(AtomicType superType, java.lang.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 public AtomicType createAtomicType(PK pkBase, AtomicType superType, java.lang.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 public ComposedType createComposedType(ComposedType superType, java.lang.String code) throws JaloInvalidParameterException, JaloDuplicateCodeException
Deprecated.since ages - use ModelService.create to create instances
-
createComposedType
@Deprecated public ComposedType createComposedType(PK pkBase, ComposedType superType, java.lang.String code) throws JaloDuplicateCodeException, JaloInvalidParameterException
Deprecated.since ages - use ModelService.create to create instances
-
createCollectionType
@Deprecated public CollectionType createCollectionType(java.lang.String code, Type type) throws JaloInvalidParameterException, JaloDuplicateCodeException
Deprecated.since ages - use ModelService.create to create instances
-
createCollectionType
@Deprecated public CollectionType createCollectionType(PK pk, java.lang.String code, Type type) throws JaloInvalidParameterException, JaloDuplicateCodeException
Deprecated.since ages - use ModelService.create to create instances
-
createCollectionType
@Deprecated public CollectionType createCollectionType(java.lang.String code, Type type, int typeOfCollection) throws JaloInvalidParameterException, JaloDuplicateCodeException
Deprecated.since ages - use ModelService.create to create instances
-
createCollectionType
@Deprecated public CollectionType createCollectionType(PK pkBase, java.lang.String code, Type type, int typeOfCollection) throws JaloDuplicateCodeException, JaloInvalidParameterException
Deprecated.since ages - use ModelService.create to create instances
-
createMapType
@Deprecated public MapType createMapType(java.lang.String code, Type argumentType, Type returnType) throws JaloInvalidParameterException, JaloDuplicateCodeException
Deprecated.since ages - use ModelService.create to create instances
-
createMapType
@Deprecated public MapType createMapType(PK pkBase, java.lang.String code, Type argumentType, Type returnType) throws JaloDuplicateCodeException, JaloInvalidParameterException
Deprecated.since ages - use ModelService.create to create instances
-
createRestriction
@Deprecated public SearchRestriction createRestriction(java.lang.String code, Principal principal, ComposedType restrictedType, java.lang.String query) throws JaloInvalidParameterException
Deprecated.since ages - use ModelService.create to create instances- Throws:
JaloInvalidParameterException
-
getSearchRestriction
@Deprecated public SearchRestriction getSearchRestriction(ComposedType ct, java.lang.String code)
Deprecated.since ages - use SearchRestrictionService or FlexibleSearch instead- Since:
- 2.10
-
getSearchRestrictions
@Deprecated public java.util.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 public java.util.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 public RelationType createRelationType(java.lang.String relationName, boolean localized, AttributeDescriptor sourceFD, AttributeDescriptor targetFD) throws JaloInvalidParameterException, JaloDuplicateCodeException, JaloDuplicateQualifierException
Deprecated.since ages - use proper service to create instances
-
createRelationType
@Deprecated public RelationType createRelationType(PK pk, java.lang.String relationName, boolean localized, AttributeDescriptor sourceFD, AttributeDescriptor targetFD) throws JaloInvalidParameterException, JaloDuplicateCodeException, JaloDuplicateQualifierException
Deprecated.since ages - use proper service to create instances
-
createRelationDescriptor
@Deprecated protected RelationDescriptor createRelationDescriptor(java.lang.String relationName, ComposedType enclosingType, java.lang.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 protected RelationDescriptor createRelationDescriptor(PK pk, java.lang.String relationName, ComposedType enclosingType, java.lang.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
protected void checkForRelationAttribute(boolean localized, AttributeDescriptor fd)Deprecated.
-
getTypeManagerEJB
protected TypeManagerEJB getTypeManagerEJB()
Deprecated.
-
getRootComposedTypeForJaloClass
public ComposedType getRootComposedTypeForJaloClass(java.lang.Class jaloClass) throws JaloItemNotFoundException
Deprecated.- Throws:
JaloItemNotFoundException
-
getRestrictions
@Deprecated public java.util.Collection getRestrictions(Principal principal, ComposedType type)
Deprecated.since ages - use SearchRestrictionService or FlexibleSearch instead
-
createRelationAttribute
@Deprecated public RelationDescriptor createRelationAttribute(PK pkBase, java.lang.String relationName, ComposedType enclosingType, java.lang.String qualifier, ComposedType attributeType, int modifiers, boolean localized) throws JaloDuplicateQualifierException
Deprecated.since ages - use proper service to create instances- Throws:
JaloDuplicateQualifierException
-
createRelationAttribute
@Deprecated public RelationDescriptor createRelationAttribute(PK pkBase, java.lang.String relationName, ComposedType enclosingType, java.lang.String qualifier, ComposedType attributeType, int modifiers, boolean localized, int typeOfCollection) throws JaloDuplicateQualifierException
Deprecated.since ages - use proper service to create instances- Throws:
JaloDuplicateQualifierException
-
assureNoItem
protected void assureNoItem(java.lang.Class c) throws JaloInvalidParameterExceptionDeprecated.- Throws:
JaloInvalidParameterException
-
writeReplace
public java.lang.Object writeReplace() throws java.io.ObjectStreamExceptionDeprecated.- Specified by:
writeReplacein classManager- Throws:
java.io.ObjectStreamException
-
-