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 - - useTypeDao
insteadBasic functionality for creating and searching for types.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
TypeManager.TypeManagerSerializableDTO
Deprecated.-
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.String
BEAN_NAME
Deprecated.
-
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 void
assureNoItem(java.lang.Class c)
Deprecated.protected void
checkBeforeItemRemoval(SessionContext ctx, Item item)
Deprecated.Avoiding calls to ejb layer except forAttributeDescriptor
andType
instances.protected void
checkForRelationAttribute(boolean localized, AttributeDescriptor fd)
Deprecated.AtomicType
createAtomicType(PK pkBase, AtomicType superType, java.lang.Class javaClass)
Deprecated.since ages - use ModelService.create to create instancesAtomicType
createAtomicType(PK pkBase, AtomicType superType, java.lang.String code)
Deprecated.since ages - use ModelService.create to create instancesAtomicType
createAtomicType(PK pkBase, java.lang.Class javaClass)
Deprecated.since ages - use ModelService.create to create instancesAtomicType
createAtomicType(AtomicType superType, java.lang.Class javaClass)
Deprecated.since ages - use ModelService.create to create instancesAtomicType
createAtomicType(AtomicType superType, java.lang.String code)
Deprecated.since ages - use ModelService.create to create instancesAtomicType
createAtomicType(java.lang.Class javaClass)
Deprecated.since ages - use ModelService.create to create instancesCollectionType
createCollectionType(PK pk, java.lang.String code, Type type)
Deprecated.since ages - use ModelService.create to create instancesCollectionType
createCollectionType(PK pkBase, java.lang.String code, Type type, int typeOfCollection)
Deprecated.since ages - use ModelService.create to create instancesCollectionType
createCollectionType(java.lang.String code, Type type)
Deprecated.since ages - use ModelService.create to create instancesCollectionType
createCollectionType(java.lang.String code, Type type, int typeOfCollection)
Deprecated.since ages - use ModelService.create to create instancesComposedType
createComposedType(PK pkBase, ComposedType superType, java.lang.String code)
Deprecated.since ages - use ModelService.create to create instancesComposedType
createComposedType(ComposedType superType, java.lang.String code)
Deprecated.since ages - use ModelService.create to create instancesMapType
createMapType(PK pkBase, java.lang.String code, Type argumentType, Type returnType)
Deprecated.since ages - use ModelService.create to create instancesMapType
createMapType(java.lang.String code, Type argumentType, Type returnType)
Deprecated.since ages - use ModelService.create to create instancesRelationDescriptor
createRelationAttribute(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 instancesRelationDescriptor
createRelationAttribute(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 RelationDescriptor
createRelationDescriptor(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 RelationDescriptor
createRelationDescriptor(java.lang.String relationName, ComposedType enclosingType, java.lang.String qualifier, ComposedType otherEndItemType, int modifiers, boolean localized)
Deprecated.since ages - use proper service to create instancesRelationType
createRelationType(PK pk, java.lang.String relationName, boolean localized, AttributeDescriptor sourceFD, AttributeDescriptor targetFD)
Deprecated.since ages - use proper service to create instancesRelationType
createRelationType(java.lang.String relationName, boolean localized, AttributeDescriptor sourceFD, AttributeDescriptor targetFD)
Deprecated.since ages - use proper service to create instancesSearchRestriction
createRestriction(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.Set
getAllTypes()
Deprecated.since ages - - write own flexible search to fetch desired typesjava.util.Set
getAtomicTypesForJavaClass(java.lang.Class javaClass)
Deprecated.since ages - use TypeService instead.ComposedType
getComposedType(java.lang.Class jaloClass)
Deprecated.since ages - use TypeService instead.ComposedType
getComposedType(java.lang.String code)
Deprecated.since ages - use TypeService insteadstatic TypeManager
getInstance()
Deprecated.java.lang.Class
getRemoteManagerClass()
Deprecated.java.util.Collection
getRestrictions(Principal principal, ComposedType type)
Deprecated.since ages - use SearchRestrictionService or FlexibleSearch insteadAtomicType
getRootAtomicType(java.lang.Class javaClass)
Deprecated.ComposedType
getRootComposedType(int typeCode)
Deprecated.The type matching an item ejb typecode.ComposedType
getRootComposedType(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 ).ComposedType
getRootComposedTypeForJaloClass(java.lang.Class jaloClass)
Deprecated.SearchRestriction
getSearchRestriction(ComposedType ct, java.lang.String code)
Deprecated.since ages - use SearchRestrictionService or FlexibleSearch insteadjava.util.Collection
getSearchRestrictions(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)
Type
getType(java.lang.String code)
Deprecated.since ages - use TypeService.getTypeForCode() instead.protected TypeManagerEJB
getTypeManagerEJB()
Deprecated.void
init()
Deprecated.called once for each tenant, so this method fits best to perform some initialization stuffprotected void
notifyItemRemoval(SessionContext ctx, Item item)
Deprecated.Superclass method overridden to avoid call to ajb layer.java.lang.Object
writeReplace()
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:Manager
called once for each tenant, so this method fits best to perform some initialization stuff
-
getRemoteManagerClass
public java.lang.Class getRemoteManagerClass()
Deprecated.- Overrides:
getRemoteManagerClass
in 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
Type
with the given code. - Throws:
JaloItemNotFoundException
- if there is noType
with the given code.
-
checkBeforeItemRemoval
protected void checkBeforeItemRemoval(SessionContext ctx, Item item) throws ConsistencyCheckException
Deprecated.Avoiding calls to ejb layer except forAttributeDescriptor
andType
instances.- Overrides:
checkBeforeItemRemoval
in 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 allrestrictions
for aPrincipal
which is going to be removed.- Overrides:
notifyItemRemoval
in 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 newAtomicType
for the given class.- Parameters:
javaClass
- the class of theAtomicType
which should be created- Returns:
- the new
AtomicType
- Throws:
JaloInvalidParameterException
- if the given class is not a valid class for anAtomicType
JaloDuplicateCodeException
- if the already exists aAtomicType
with 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 newAtomicType
for the given class.- Parameters:
pkBase
- the pk for the new item; it will be equipped with type code additionally (- ) javaClass
- the class of theAtomicType
which should be created- Returns:
- the new
AtomicType
- Throws:
JaloInvalidParameterException
- if the given class is not a valid class for anAtomicType
JaloDuplicateCodeException
- if the already exists aAtomicType
with 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 newAtomicType
for the given class.- Parameters:
superType
- the super type of theAtomicType
which should be createdjavaClass
- the class of theAtomicType
which should be created- Returns:
- the new
AtomicType
- Throws:
JaloInvalidParameterException
- if the given class is not a valid class for anAtomicType
JaloDuplicateCodeException
- if the already exists aAtomicType
with 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 newAtomicType
for the given class.- Parameters:
pkBase
- the pk for the new item; it will be equipped with type code additionally (- ) superType
- the super type of theAtomicType
which should be createdjavaClass
- the class of theAtomicType
which should be created- Returns:
- the new
AtomicType
- Throws:
JaloInvalidParameterException
- if the given class is not a valid class for anAtomicType
JaloDuplicateCodeException
- if the already exists aAtomicType
with 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 newAtomicType
for the given class.- Parameters:
superType
- the super type of theAtomicType
which should be createdcode
- the code of theAtomicType
which should be created- Returns:
- the new
AtomicType
- Throws:
JaloInvalidParameterException
- if any of the parameters isnull
JaloDuplicateCodeException
- if the already exists aAtomicType
with 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 newAtomicType
for the given class.- Parameters:
pkBase
- the pk for the new item; it will be equipped with type code additionally (- ) superType
- the super type of theAtomicType
which should be createdcode
- the code of theAtomicType
which should be created- Returns:
- the new
AtomicType
- Throws:
JaloInvalidParameterException
- if any of the parameters isnull
JaloDuplicateCodeException
- if the already exists aAtomicType
with 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
- thePrincipal
restrictedType
- the restrictedComposedType
- Returns:
- a
Collection
of all restrictions for the givenPrincipal
on 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
- thePrincipal
type
- the restrictedComposedType
includeGroups
- 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
Collection
of all restrictions for the givenPrincipal
on 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 JaloInvalidParameterException
Deprecated.- Throws:
JaloInvalidParameterException
-
writeReplace
public java.lang.Object writeReplace() throws java.io.ObjectStreamException
Deprecated.- Specified by:
writeReplace
in classManager
- Throws:
java.io.ObjectStreamException
-
-