Class AttributeDescriptor
- java.lang.Object
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable
- Direct Known Subclasses:
ConfigAttributeDescriptor,ExpressionAttributeDescriptor,GeneratedVariantAttributeDescriptor,RelationDescriptor,ViewAttributeDescriptor
public class AttributeDescriptor extends Descriptor
The attribute descriptor describes item attributes. It describes its value type as well as its persistence implementation. Each attribute descriptor belongs to oneComposedTypeexclusively.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAttributeDescriptor.AttributeDescriptorImplThe persistence layer interface.-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.type.Descriptor
Descriptor.DescriptorImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.type.TypeManagerManaged
TypeManagerManaged.TypeManagerManagedImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LocalizableItem.LocalizableItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.ExtensibleItem
ExtensibleItem.ExtensibleItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.Item
Item.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException
-
-
Field Summary
Fields Modifier and Type Field Description static intALLAll flags combined.static intALL_PUBLICAll publicly changeable flags combined.static java.lang.StringATTRIBUTE_HANDLERThe attributeHandler string attribute constant.static java.lang.StringDATABASECOLUMNThe database column name string attribute constant.static java.lang.StringDECLARING_ENCLOSING_TYPEThe declaring enclosing type string attribute constant.static java.lang.StringDEFAULTVALUEThe default value attribute constant.static java.lang.StringDEFAULTVALUE_DEFINITIONSTRINGThe default value definiton string attribute constant.static java.lang.StringDESCRIPTIONThe description string attribute constant.static java.lang.StringENCLOSING_TYPEThe enclosing type string attribute constant.static java.lang.StringENCRYPTEDThe encrypted string attribute constant.static intENCRYPTED_FLAGThe encrypted -Flag used bygetModifiers().static java.lang.StringINHERITEDThe inherited string attribute constant.static intINHERITED_FLAGThe inherited -Flag used bygetModifiers().static java.lang.StringINITIALThe initial string attribute constant.static intINITIAL_FLAGThe initial -Flag used bygetModifiers().static java.lang.StringLOCALIZEDThe localized string attribute constant.static intLOCALIZED_FLAGThe localized -Flag used bygetModifiers().static java.lang.StringMODIFIERSThe modifiers string attribute constant.static java.lang.StringOPTIONALThe optional string attribute constant.static intOPTIONAL_FLAGThe optional -Flag used bygetModifiers().static java.lang.StringPARTOFThe part of string attribute constant.static intPARTOF_FLAGThe partOf -Flag used bygetModifiers().static java.lang.StringPERSISTENCE_CLASSThe persistence class string attribute constant.static java.lang.StringPERSISTENCETYPEThe persistence type string attribute constant.static java.lang.StringPRIMITIVEThe primitive string attribute constant.static intPRIMITIVE_FLAGThe primitive-Flag used bygetModifiers().static java.lang.StringPRIVATEThe private string attribute constant.static intPRIVATE_FLAGThe private -Flag used bygetModifiers().static java.lang.StringPROPERTYThe property string attribute constant.static intPROPERTY_FLAGThe property -Flag used bygetModifiers().static java.lang.StringPROPOSED_DATABASE_COLUMNThe proposed database column name string attribute constant.static java.lang.StringREADDeprecated.since ages - please useREADABLEinsteadstatic intREAD_FLAGThe read -Flag used bygetModifiers().static java.lang.StringREADABLEThe readable string attribute constant.static java.lang.StringREMOVABLEThe removable string attribute constant.static java.lang.StringREMOVEDeprecated.since ages - please useREMOVABLEinsteadstatic intREMOVE_FLAGThe remove -Flag used bygetModifiers().static java.lang.StringSEARCHThe search string attribute constant.static intSEARCH_FLAGThe search -Flag used bygetModifiers().static java.lang.StringTIM_IGNOREThe do not optimize string attribute constant.static intTIM_IGNORE_FLAGThe dontOptimize -Flag used bygetModifiers().static java.lang.StringUNIQUEThe unique string attribute constant.static java.lang.StringWRITABLEThe writable string attribute constant.static java.lang.StringWRITEDeprecated.since ages - please useWRITABLEinsteadstatic intWRITE_FLAGThe write -Flag used bygetModifiers().-
Fields inherited from class de.hybris.platform.jalo.type.Descriptor
ATTRIBUTETYPE, QUALIFIER
-
Fields inherited from class de.hybris.platform.jalo.type.TypeManagerManaged
AUTOCREATE, DEPRECATED, EXTENSION_NAME, GENERATE, NAME
-
Fields inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LANGUAGE_FALLBACK_ENABLED
-
Fields inherited from class de.hybris.platform.jalo.Item
_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, HJMPTS, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPE
-
Fields inherited from class de.hybris.platform.util.BridgeAbstraction
impl, tenant
-
-
Constructor Summary
Constructors Constructor Description AttributeDescriptor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidcheckDefaultValueAssignability(SessionContext ctx, java.lang.Object newVal)Internal - checks compatibility of default value with attribute value type.protected voidcheckLocalizedChange(boolean newLoc)Internal localization flag change check.protected voidcheckPartOfChange(boolean newPartOf)Internal: checks partOf flag change.protected voidcheckPropertyChange(boolean newProp)Internal property flag change check.protected voidcheckSearchableChange(boolean newSearchable)Internal - for checking whether an attribute can be made searchable or not.protected voidcheckSelectionOfDescriptor(AttributeDescriptor newSelect)Internal - compatibility check for selection of sttributes.protected voidcheckTypeChange(Type newType)Internal - do not use.booleancheckTypePermission(Principal p, UserRight right)Checks the type permission upon this attribute of the given principal.booleancheckTypePermission(UserRight right)Checks the type permission upon this attribute of the current session user.protected ItemcreateItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes)Creator method for generic creation of attribute descriptor.java.lang.StringexportXMLDefinition(org.znerd.xmlenc.XMLOutputter xout)protected voidexportXMLDefinitionDefaultValue(org.znerd.xmlenc.XMLOutputter xout)java.util.MapgetAllDescriptions()java.util.MapgetAllDescriptions(SessionContext ctx)java.util.MapgetAllNames()Returns all names of this attribute descriptor as map.java.util.Set<AttributeDescriptor>getAllSubAttributeDescriptors()Returns all sub attribute descriptors of this attribute.protected AttributeDescriptor.AttributeDescriptorImplgetAttributeDescriptorImpl()Internal - access to persistence layer implementation.java.lang.StringgetAttributeHandler()java.lang.StringgetDatabaseColumn()ComposedTypegetDeclaringEnclosingType()If the attribute has been inherited this returns the type which originally declared this attribute.java.lang.ObjectgetDefaultValue()Returns the default value of this attribute descriptor ornullif no value was set and there is no default value defined for the attribute value type.java.lang.ObjectgetDefaultValue(SessionContext ctx)Returns the default value of this attribute descriptor ornullif no value was set and there is no default value defined for the attribute value type.java.lang.StringgetDefaultValueDefinitionString()Returns the defaul value definition fromitems.xmlin case this attribute was declared there having a<defaultvalue>tag.java.lang.StringgetDescription()java.lang.StringgetDescription(SessionContext ctx)booleangetDontOptimize()Tells whether this attribute descriptor has an "optimized" database layout or is stored in the dump table (dontOptimize=true).ComposedTypegetEnclosingType()The composed type which owns this attribute descriptor.protected intgetIntModifiersFromMap(java.util.Map allAttributes)Internal - converts single flag attributes into int constants combinations for generic creation process.intgetModifiers()Returns the attribute settings as combination of:READ_FLAGWRITE_FLAGOPTIONAL_FLAGREMOVE_FLAGPARTOF_FLAGINITIAL_FLAGPRIVATE_FLAGPROPERTY_FLAGSEARCH_FLAGTIM_IGNORE_FLAGENCRYPTED_FLAGjava.lang.StringgetName(SessionContext ctx)Returns the name of this attribute descriptor.protected Item.ItemAttributeMapgetNonInitialAttributes(SessionContext ctx, Item.ItemAttributeMap allAttributes)Cuts the following attributes from value map since these values have been set during creation:ENCLOSING_TYPEDescriptor.QUALIFIERDescriptor.ATTRIBUTETYPEjava.lang.ClassgetPersistenceClass()java.lang.StringgetPersistenceQualifier()If the attribute is backed by a EJB CMP field this method returns the CMP field name.AtomicTypegetPersistenceType()java.lang.StringgetProposedDatabaseColumn()Since all attributes created after initialization are not mapped to a own database column this method provides a column name proposal.AttributeDescriptorgetSelectionOf()Returns the selection-of attribute descriptor.java.util.Set<AttributeDescriptor>getSubAttributeDescriptors()Returns direct sub attribute descriptors of this attribute.protected java.util.MapgetXMLCustomProperties()Override to add custom properties to this type's xml definition.java.lang.StringgetXMLDefinition()Assembles the attribute descriptors XML definition required foritems.xml.protected java.lang.ObjectinterpretAndReplaceDefaultValue(java.lang.Object current)booleanisEncrypted()Tells whether this attribute should be stored in an encrypted waybooleanisInherited()Tells whether an attribute descriptor was inherited or not.booleanisInitial()Tells whether an attribute is initial or not.booleanisLocalized()Tells whether an attribute is localized or not.booleanisOptional()Tells whether or not the described attribute has to be provided with a non-null value when creating a new item instance viaComposedType.newInstance(Map).booleanisPartOf()Tells whether this attribute descriptor describes a part-of relation or not.booleanisPrimitive()Tells whether this attribute represents a java primitive type.booleanisPrivate()Tells whether an attribute is private or not.booleanisProperty()Tells whether the attribute is realized as property or not.booleanisReadable()booleanisRedeclared()Tells whether a inherited attribute descriptor has different modifiers and/or a different value type than its super attribute descriptor.booleanisRemovable()Tells whether or not this attribute is is allowed to be removed.booleanisSearchable()Tells whether a attribute is searchable or not.booleanisUnique()Tells whether this attribute is unique.booleanisWritable()Returnstrueif the attribute is writable.booleanisWriteable()Deprecated.since ages - useisWritable()voidredeclareAttributeType(Type type, int modifiers)Deprecated.since ages - please usesetAttributeType(Type)insteadjava.lang.ObjectremoveLocalizedProperty(SessionContext ctx, java.lang.String name)Removes a localized property.protected java.lang.ObjectremoveLocalizedPropertyNonRecursively(SessionContext ctx, java.lang.String name)Removes a localized property without removing it from sub attributes too.java.lang.ObjectremoveProperty(SessionContext ctx, java.lang.String name)Removes a property.protected java.lang.ObjectremovePropertyNonRecursively(SessionContext ctx, java.lang.String name)Removes a property without removing it from sub attributes too.voidsetAllDescriptions(SessionContext ctx, java.util.Map descriptions)Changes all localized attribute descriptions by providing a language-to-description map.voidsetAllDescriptions(java.util.Map descriptions)Changes all localized attribute descriptions by providing a language-to-description map.voidsetAttributeHandler(java.lang.String attributeHandler)voidsetAttributeType(Type type)Changes the value type of this attribute descriptor.voidsetDatabaseColumn(java.lang.String col)Changes the database column of this attribute.voidsetDefaultValue(SessionContext ctx, java.lang.Object value)Changes the default value of this attribute.voidsetDefaultValue(java.lang.Object value)Changes the default value of this attribute.voidsetDescription(SessionContext ctx, java.lang.String description)Changes the attribute description text for the specified languag.voidsetDescription(java.lang.String description)Changes the attribute description text for the current session languag.voidsetDontOptimize(boolean dontopt)Changes the optimize flag of this attribute descriptor.voidsetEncrypted(boolean encrypt)Changes the encrypted flag of this attribute descriptor.voidsetInitial(boolean initial)Changes the initial flag of this attribute descriptor.voidsetLocalized(boolean localized)Changes localized flag of this attribute descriptor.java.lang.ObjectsetLocalizedProperty(SessionContext ctx, java.lang.String name, java.lang.Object value)Sets a localized property and copies the new value down to all sub attribute descriptors.protected java.lang.ObjectsetLocalizedPropertyNonRecursively(SessionContext ctx, java.lang.String name, java.lang.Object value)Sets a localized property without copying it down to all sub attribute descriptors.voidsetModifiers(int modifiers)voidsetOptional(boolean optional)Changes whether or not the described attribute has to be provided with a non-null value when creating a new item instance viaComposedType.newInstance(Map).voidsetPartOf(boolean partOf)Changes the partOf flag of this attribute descriptor.voidsetPrimitive(boolean primitive)Changes the primitive flag of this attribute descriptor.voidsetPrivate(boolean priv)Changes the private flag of this attribute descriptor.voidsetProperty(boolean isProperty)Changes the property flag of this attribute descriptor.java.lang.ObjectsetProperty(SessionContext ctx, java.lang.String name, java.lang.Object value)Sets a property and copies the new value down to all sub attribute descriptors.protected java.lang.ObjectsetPropertyNonRecursively(SessionContext ctx, java.lang.String name, java.lang.Object value)Sets a property without copying it down to all sub attribute descriptors.voidsetReadable(boolean readable)Changes the attribute describtor's readable status.voidsetRemovable(boolean removable)Changes whether or not this attribute is is allowed to be removed.voidsetSearchable(boolean searchable)Changes the searchable flag of this attribute descriptor.voidsetSelectionOf(AttributeDescriptor descriptor)Changes the selection-of attribute.voidsetUnique(boolean unique)Changes the unique flag of this attribute descriptor.voidsetWritable(boolean writable)Changes the attribute describtor's writable status.java.lang.StringtoString()The string represenation of this attribute descriptor.static java.lang.StringtoString(int modifiers)protected voidwriteDefaultValueTagAtomic(org.znerd.xmlenc.XMLOutputter xout, java.lang.String atomictype, java.lang.String value)-
Methods inherited from class de.hybris.platform.jalo.type.Descriptor
compareTo, getAttributeType, getAttributeType, getContextAdjustedAttributeType, getDescriptorImpl, getQualifier, getRealAttributeType
-
Methods inherited from class de.hybris.platform.jalo.type.TypeManagerManaged
getAllNames, getExtensionName, getImpl, getName, isAutocreate, isDeprecated, isGenerate, setAllNames, setAllNames, setAutocreate, setExtensionName, setGenerate, setName, setName
-
Methods inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty
-
Methods inherited from class de.hybris.platform.jalo.ExtensibleItem
createNonClassAccessor, getAllProperties, getAllProperties, getImplementation, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, setAllProperties, setAllProperties, setProperty
-
Methods inherited from class de.hybris.platform.jalo.Item
addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, checkRemovable, clearPermission, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getDefaultAttributeModes, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRelatedItems, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isMarkModifiedDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, notifyManagerAboutItemRemoval, readResolve, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setRelatedItems, setTransientObject, setUseTA, useTA, writeReplace
-
Methods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
-
-
-
Field Detail
-
DEFAULTVALUE
public static final java.lang.String DEFAULTVALUE
The default value attribute constant.
-
DEFAULTVALUE_DEFINITIONSTRING
public static final java.lang.String DEFAULTVALUE_DEFINITIONSTRING
The default value definiton string attribute constant.
-
DESCRIPTION
public static final java.lang.String DESCRIPTION
The description string attribute constant.
-
ENCLOSING_TYPE
public static final java.lang.String ENCLOSING_TYPE
The enclosing type string attribute constant.
-
DECLARING_ENCLOSING_TYPE
public static final java.lang.String DECLARING_ENCLOSING_TYPE
The declaring enclosing type string attribute constant.
-
WRITABLE
public static final java.lang.String WRITABLE
The writable string attribute constant.
-
READABLE
public static final java.lang.String READABLE
The readable string attribute constant.
-
REMOVABLE
public static final java.lang.String REMOVABLE
The removable string attribute constant.
-
OPTIONAL
public static final java.lang.String OPTIONAL
The optional string attribute constant.
-
SEARCH
public static final java.lang.String SEARCH
The search string attribute constant.
-
PARTOF
public static final java.lang.String PARTOF
The part of string attribute constant.
-
PRIVATE
public static final java.lang.String PRIVATE
The private string attribute constant.
-
PROPERTY
public static final java.lang.String PROPERTY
The property string attribute constant.
-
LOCALIZED
public static final java.lang.String LOCALIZED
The localized string attribute constant.
-
INHERITED
public static final java.lang.String INHERITED
The inherited string attribute constant.
-
UNIQUE
public static final java.lang.String UNIQUE
The unique string attribute constant.
-
INITIAL
public static final java.lang.String INITIAL
The initial string attribute constant.
-
TIM_IGNORE
public static final java.lang.String TIM_IGNORE
The do not optimize string attribute constant.
-
MODIFIERS
public static final java.lang.String MODIFIERS
The modifiers string attribute constant.
-
DATABASECOLUMN
public static final java.lang.String DATABASECOLUMN
The database column name string attribute constant.
-
PERSISTENCETYPE
public static final java.lang.String PERSISTENCETYPE
The persistence type string attribute constant.
-
ATTRIBUTE_HANDLER
public static final java.lang.String ATTRIBUTE_HANDLER
The attributeHandler string attribute constant.
-
PROPOSED_DATABASE_COLUMN
public static final java.lang.String PROPOSED_DATABASE_COLUMN
The proposed database column name string attribute constant.
-
PERSISTENCE_CLASS
public static final java.lang.String PERSISTENCE_CLASS
The persistence class string attribute constant.
-
ENCRYPTED
public static final java.lang.String ENCRYPTED
The encrypted string attribute constant.
-
PRIMITIVE
public static final java.lang.String PRIMITIVE
The primitive string attribute constant.
-
READ
@Deprecated public static final java.lang.String READ
Deprecated.since ages - please useREADABLEinstead
-
WRITE
@Deprecated public static final java.lang.String WRITE
Deprecated.since ages - please useWRITABLEinstead
-
REMOVE
@Deprecated public static final java.lang.String REMOVE
Deprecated.since ages - please useREMOVABLEinstead
-
READ_FLAG
public static final int READ_FLAG
The read -Flag used bygetModifiers().- See Also:
- Constant Field Values
-
WRITE_FLAG
public static final int WRITE_FLAG
The write -Flag used bygetModifiers().- See Also:
- Constant Field Values
-
REMOVE_FLAG
public static final int REMOVE_FLAG
The remove -Flag used bygetModifiers().- See Also:
- Constant Field Values
-
OPTIONAL_FLAG
public static final int OPTIONAL_FLAG
The optional -Flag used bygetModifiers().- See Also:
- Constant Field Values
-
SEARCH_FLAG
public static final int SEARCH_FLAG
The search -Flag used bygetModifiers().- See Also:
- Constant Field Values
-
PARTOF_FLAG
public static final int PARTOF_FLAG
The partOf -Flag used bygetModifiers().- See Also:
- Constant Field Values
-
PRIVATE_FLAG
public static final int PRIVATE_FLAG
The private -Flag used bygetModifiers().- See Also:
- Constant Field Values
-
PROPERTY_FLAG
public static final int PROPERTY_FLAG
The property -Flag used bygetModifiers().- See Also:
- Constant Field Values
-
LOCALIZED_FLAG
public static final int LOCALIZED_FLAG
The localized -Flag used bygetModifiers().- See Also:
- Constant Field Values
-
INHERITED_FLAG
public static final int INHERITED_FLAG
The inherited -Flag used bygetModifiers().- See Also:
- Constant Field Values
-
INITIAL_FLAG
public static final int INITIAL_FLAG
The initial -Flag used bygetModifiers().- See Also:
- Constant Field Values
-
TIM_IGNORE_FLAG
public static final int TIM_IGNORE_FLAG
The dontOptimize -Flag used bygetModifiers().- See Also:
- Constant Field Values
-
ENCRYPTED_FLAG
public static final int ENCRYPTED_FLAG
The encrypted -Flag used bygetModifiers().- See Also:
- Constant Field Values
-
PRIMITIVE_FLAG
public static final int PRIMITIVE_FLAG
The primitive-Flag used bygetModifiers().- See Also:
- Constant Field Values
-
ALL
public static final int ALL
All flags combined. Use for bit wise operations.- See Also:
- Constant Field Values
-
ALL_PUBLIC
public static final int ALL_PUBLIC
All publicly changeable flags combined. Use for bit wise operations.- See Also:
- Constant Field Values
-
-
Method Detail
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
Creator method for generic creation of attribute descriptor. The following attributes are required:- Specified by:
createItemin classItem- Parameters:
ctx- the current session context which this item is created withintype- the actual item type ( since subtypes may not provide a own jalo class this may be different from the type which this method was implemented for )- Returns:
- the new item instance
- Throws:
JaloBusinessException- indicates an error during creation - any changes will be rollbacked
-
getNonInitialAttributes
protected Item.ItemAttributeMap getNonInitialAttributes(SessionContext ctx, Item.ItemAttributeMap allAttributes)
Cuts the following attributes from value map since these values have been set during creation:- Overrides:
getNonInitialAttributesin classItem- Parameters:
ctx- session context with language = NULLallAttributes- aItemAttributeMapcontaning attribute values.- Returns:
- a
ItemAttributeMapcontaining all attribute values, which belong to non-initial attributes.
-
setProperty
public java.lang.Object setProperty(SessionContext ctx, java.lang.String name, java.lang.Object value)
Sets a property and copies the new value down to all sub attribute descriptors.- Overrides:
setPropertyin classExtensibleItem- Parameters:
ctx- the session contextname- the property namevalue- the new value- Returns:
- the old value
- See Also:
setPropertyNonRecursively(SessionContext, String, Object)
-
setPropertyNonRecursively
protected java.lang.Object setPropertyNonRecursively(SessionContext ctx, java.lang.String name, java.lang.Object value)
Sets a property without copying it down to all sub attribute descriptors.- Parameters:
ctx- the session contextname- the property namevalue- the new value- Returns:
- the old value
- Since:
- 2.10 (previous method name contained a typo)
- See Also:
setProperty(SessionContext, String, Object)
-
setLocalizedProperty
public java.lang.Object setLocalizedProperty(SessionContext ctx, java.lang.String name, java.lang.Object value)
Sets a localized property and copies the new value down to all sub attribute descriptors.- Overrides:
setLocalizedPropertyin classLocalizableItem- Parameters:
ctx- the session context defining the languagename- the property namevalue- the new value- Returns:
- the old value
- See Also:
setLocalizedPropertyNonRecursively(SessionContext, String, Object)
-
setLocalizedPropertyNonRecursively
protected java.lang.Object setLocalizedPropertyNonRecursively(SessionContext ctx, java.lang.String name, java.lang.Object value)
Sets a localized property without copying it down to all sub attribute descriptors.- Parameters:
ctx- the session context defining the languagename- the property namevalue- the new value- Returns:
- the old value
- Since:
- 2.10 (previous method name contained a typo)
- See Also:
setLocalizedProperty(SessionContext, String, Object)
-
removeLocalizedProperty
public java.lang.Object removeLocalizedProperty(SessionContext ctx, java.lang.String name)
Removes a localized property. The property is also removed from all subattributes.- Overrides:
removeLocalizedPropertyin classLocalizableItem- Parameters:
ctx- the session context defining the languagename- the property name- Returns:
- the localized property value which was removed
-
removeLocalizedPropertyNonRecursively
protected java.lang.Object removeLocalizedPropertyNonRecursively(SessionContext ctx, java.lang.String name)
Removes a localized property without removing it from sub attributes too.- Parameters:
ctx- the session context defining the languagename- the property name- Since:
- 2.10 (previous method name contained a typo)
-
removeProperty
public java.lang.Object removeProperty(SessionContext ctx, java.lang.String name)
Removes a property. The property is also removed from all subattributes.- Overrides:
removePropertyin classExtensibleItem- Parameters:
ctx- the session contextname- the property name- Returns:
- the property that was bound to the name before removal or
nullif there was no property.
-
removePropertyNonRecursively
protected java.lang.Object removePropertyNonRecursively(SessionContext ctx, java.lang.String name)
Removes a property without removing it from sub attributes too.- Parameters:
ctx- the session contextname- the property name- Since:
- 2.10 (previous method name contained a typo)
-
getSubAttributeDescriptors
public java.util.Set<AttributeDescriptor> getSubAttributeDescriptors()
Returns direct sub attribute descriptors of this attribute. These are the attribute descriptors copied for direct subtypes of this attribute descriptor's enclosing type.
-
getAllSubAttributeDescriptors
public java.util.Set<AttributeDescriptor> getAllSubAttributeDescriptors()
Returns all sub attribute descriptors of this attribute. These are the attribute descriptors copied for all subtypes of this attribute descriptor's enclosing type.
-
getName
public java.lang.String getName(SessionContext ctx)
Returns the name of this attribute descriptor. In case no name was set and the attribute descriptor has been inherited it tries to fetch the name from its super attribute descriptior(s).- Overrides:
getNamein classTypeManagerManaged- Parameters:
ctx- the session context defining the language to get the name for- Returns:
- the name of this type system item localized for the specified session context
-
getAllNames
public java.util.Map getAllNames()
Returns all names of this attribute descriptor as map. In case some names were not set and the attribute descriptor has been inherited it tries to fill the names map from its super attribute descriptior(s).- Overrides:
getAllNamesin classTypeManagerManaged
-
checkTypeChange
protected void checkTypeChange(Type newType) throws JaloInvalidParameterException
Internal - do not use.- Parameters:
newType-- Throws:
JaloInvalidParameterException
-
setAttributeType
public void setAttributeType(Type type) throws JaloInvalidParameterException
Changes the value type of this attribute descriptor.This functionality should be used rarely since attribute type changes may impose different handling of item instances by all applications using this type. Generally attribute type changes should be done during system initialization or similar steps.
- Parameters:
type- the new value type- Throws:
JaloInvalidParameterException- in case the previous type was not assignable from the new one; if the attribute has been inherited the previous type is taken from the super attribute
-
redeclareAttributeType
@Deprecated public void redeclareAttributeType(Type type, int modifiers) throws JaloInvalidParameterException
Deprecated.since ages - please usesetAttributeType(Type)instead- Throws:
JaloInvalidParameterException
-
getDeclaringEnclosingType
public ComposedType getDeclaringEnclosingType()
If the attribute has been inherited this returns the type which originally declared this attribute. Otherwise it just returns the own enclosing type.
-
getEnclosingType
public ComposedType getEnclosingType()
The composed type which owns this attribute descriptor.
-
getModifiers
public int getModifiers()
Returns the attribute settings as combination of:
-
setModifiers
public void setModifiers(int modifiers)
-
isReadable
public boolean isReadable()
- Returns:
- true if the attribute is readable.
- See Also:
setReadable(boolean)
-
setReadable
public void setReadable(boolean readable) throws JaloInvalidParameterExceptionChanges the attribute describtor's readable status.Please note that changing an attribute descritors readability cannot affect the actual implementation ( see
AttributeAccess). If an implementation does not allow reading the value setting the attribute descriptor readable doesnt make much sense.- Throws:
JaloInvalidParameterException- See Also:
isReadable()
-
isWriteable
@Deprecated public boolean isWriteable()
Deprecated.since ages - useisWritable()- Returns:
- true if the attribute is writable.
- See Also:
setWritable(boolean)
-
isWritable
public boolean isWritable()
Returnstrueif the attribute is writable.- See Also:
setWritable(boolean)
-
setWritable
public void setWritable(boolean writable) throws JaloInvalidParameterExceptionChanges the attribute describtor's writable status.Please note that changing an attribute descritors writability cannot affect the actual implementation ( see
AttributeAccess). If an implementation does not allow writing the value setting the attribute descriptor writable doesnt make much sense.- Throws:
JaloInvalidParameterException- See Also:
isWritable()
-
isRemovable
public boolean isRemovable()
Tells whether or not this attribute is is allowed to be removed. Only removable attribute descriptors are allowed to be removed viaItem.remove().The remove flag is intented to provide a certain safety for the type system designer to mark all required attribute as non-removable contrary to attribute descriptors created during system runtime which may be removed again.
- See Also:
setRemovable(boolean)
-
setRemovable
public void setRemovable(boolean removable) throws JaloInvalidParameterExceptionChanges whether or not this attribute is is allowed to be removed. Only removable attribute descriptors are allowed to be removed viaItem.remove().The remove flag is intented to provide a certain safety for the type system designer to mark all required attribute as non-removable contrary to attribute descriptors created during system runtime which may be removed again.
- Throws:
JaloInvalidParameterException- See Also:
isRemovable()
-
isOptional
public boolean isOptional()
Tells whether or not the described attribute has to be provided with a non-null value when creating a new item instance viaComposedType.newInstance(Map).Since the actual item creation logic is coded in
Item.createItem(SessionContext, ComposedType, Item.ItemAttributeMap)it is very likely that some attributes are always required so setting their attribute descriptors to be optional doesnt make much sense, even if it's possible.
-
setOptional
public void setOptional(boolean optional) throws JaloInvalidParameterExceptionChanges whether or not the described attribute has to be provided with a non-null value when creating a new item instance viaComposedType.newInstance(Map).Since the actual item creation logic is coded in
Item.createItem(SessionContext, ComposedType, Item.ItemAttributeMap)it is very likely that some attributes are always required so setting their attribute descriptors to be optional doesnt make much sense, even if it's possible.- Throws:
JaloInvalidParameterException
-
isSearchable
public boolean isSearchable()
Tells whether a attribute is searchable or not. Usually this may only be true if the attribute has got persistence informations likegetDatabaseColumn()andgetPersistenceClass().
-
setSearchable
public void setSearchable(boolean searchable) throws JaloInvalidParameterExceptionChanges the searchable flag of this attribute descriptor.Please note that setting an attribute descriptor searchable which does not have persistence informations doesnt make much sense ( unless the FlexibleSearch was replaced by a search engine which is capable of searching such fields ).
- Throws:
JaloInvalidParameterException- in case the persistence information does not allow this attribute to be made searchable
-
checkSearchableChange
protected void checkSearchableChange(boolean newSearchable) throws JaloInvalidParameterExceptionInternal - for checking whether an attribute can be made searchable or not.- Throws:
JaloInvalidParameterException- if it cannot become searchable
-
isPartOf
public boolean isPartOf()
Tells whether this attribute descriptor describes a part-of relation or not.Part-of attributes describe fields which store references to items which belong to the owner of the attribute.
To name one example:
AbstractOrder.entrieswhere the AbstractOrder instance owns a collection of AbstractOrderEntry instances. Since one entry belongs to this order exclusively theentriesattribute is marked as being part of .- See Also:
setPartOf(boolean)
-
getDontOptimize
public boolean getDontOptimize()
Tells whether this attribute descriptor has an "optimized" database layout or is stored in the dump table (dontOptimize=true).- See Also:
setDontOptimize(boolean)
-
isEncrypted
public boolean isEncrypted()
Tells whether this attribute should be stored in an encrypted way- See Also:
setEncrypted(boolean)
-
isPrimitive
public boolean isPrimitive()
Tells whether this attribute represents a java primitive type.
-
setPartOf
public void setPartOf(boolean partOf) throws JaloInvalidParameterExceptionChanges the partOf flag of this attribute descriptor.- Throws:
JaloInvalidParameterException- if the attribute does not hold Items but other objects and it is tried to be set partOf- See Also:
isPartOf()
-
checkPartOfChange
protected void checkPartOfChange(boolean newPartOf) throws JaloInvalidParameterExceptionInternal: checks partOf flag change.- Throws:
JaloInvalidParameterException- in case change is not allowed
-
isPrivate
public boolean isPrivate()
Tells whether an attribute is private or not.Private attributes are intented for internal use and therefore hidden from general methods like
ComposedType.getAttributeDescriptors()- they may only be found usingComposedType.getEveryAttributeDescriptor(String).
Apart from that private attributes behave like non-private ones.- Returns:
- true if the attribute is private
- See Also:
setPrivate(boolean)
-
setPrivate
public void setPrivate(boolean priv)
Changes the private flag of this attribute descriptor.- Parameters:
priv- the new private status- See Also:
isPrivate()
-
setDontOptimize
public void setDontOptimize(boolean dontopt)
Changes the optimize flag of this attribute descriptor.- Parameters:
dontopt- the new dont optimize status- See Also:
getDontOptimize()
-
setEncrypted
public void setEncrypted(boolean encrypt)
Changes the encrypted flag of this attribute descriptor.- Parameters:
encrypt- the new encrypt status- See Also:
isEncrypted()
-
setPrimitive
public void setPrimitive(boolean primitive)
Changes the primitive flag of this attribute descriptor.- Parameters:
primitive- the new primitive status
-
isLocalized
public boolean isLocalized()
Tells whether an attribute is localized or not. Localized attributes hold multiple values, one per language. Therefore the attribute descriptor's value type must be aMapTypehaving the language item type as argument type and the actual attribute value type as return type.An example:
TypeManager tm = jaloSession.getTypeManager(); // we like to define a new localized attribute holding users ComposedType userType = tm.getComposedType( User.class ); ComposedType langType = tm.getComposedType( Language.class ); ComposedType myType = ... myType.createAttributeDescriptor( "myAttribute", tm.createMapType("locUserType", langType, userType), AttributeDescriptor.READ_FLAG + AttributeDescriptor.WRITE_FLAG + AttributeDescriptor.OPTIONAL_FLAG + AttributeDescriptor.PROPERTY_FLAG );Another diference between unlocalized and localized attributes is the result of
Item.getAttribute(SessionContext, String). As long as the specified session context contains a session language the result will be the value mapped to this language. If no language is specified the result will contain all values in form of a map containing language-to-value mappings!
The same rule applies toItem.setAttribute(SessionContext, String, Object).- See Also:
setLocalized(boolean)
-
setLocalized
public void setLocalized(boolean localized) throws JaloInvalidParameterExceptionChanges localized flag of this attribute descriptor. Only attributes holding aMapTypewith a language composed type as their argumenttype as attribute value type may become localized.Generally changing an attribute's localization status should seldom be necessary since during attribute creation the persistence settings have been chosen anyway which defines clearly if the field is localized or not.
- Parameters:
localized- the new localized status- Throws:
JaloInvalidParameterException- in case the attribute value type doesnt allow attribute to be localized.
-
checkLocalizedChange
protected void checkLocalizedChange(boolean newLoc) throws JaloInvalidParameterExceptionInternal localization flag change check.- Throws:
JaloInvalidParameterException- in case localized flag change is allowed
-
isInherited
public boolean isInherited()
Tells whether an attribute descriptor was inherited or not. Inherited attribute descriptors are copies of the same attribute descriptor belonging to the direct supertype of its enclosing type.
-
isInitial
public boolean isInitial()
Tells whether an attribute is initial or not.More precisely this flag would be named initially writable which means the attribute value may be written during instance creation. Usually it is used in combination with setting the writable flag to false which describes a field which has to be filled during creation but cannot be changed afterwards.
-
setInitial
public void setInitial(boolean initial)
Changes the initial flag of this attribute descriptor.- Parameters:
initial- the new initial flag
-
isProperty
public boolean isProperty()
Tells whether the attribute is realized as property or not.A attribute realized as property may always be accessed via
ExtensibleItem.getProperty(String)andExtensibleItem.setProperty(String, Object)as well as the generic way.Due to the fact that only
ExtensibleItemsubclasses can have properties the enclosing type cannot describe a jalo item which is not.- See Also:
setProperty(boolean)
-
setProperty
public void setProperty(boolean isProperty) throws JaloInvalidParameterExceptionChanges the property flag of this attribute descriptor.If true the attribute is backed by a property field. Each property attribute owns automatically a
AttributeAccesswhich redirects to property getter and setter methods. Nevertheless it is possible to register a own access for this attribute as well.Please note that setting this flag to
falserequires that a ownAttributeAccessis registered. Otherwise each access to this attribute will raise an exception from now on.- Parameters:
isProperty- the new property flag status- Throws:
JaloInvalidParameterException- in case the enclosing type does not describe a subclass ofExtensibleItem- See Also:
isProperty()
-
checkPropertyChange
protected void checkPropertyChange(boolean newProp) throws JaloInvalidParameterExceptionInternal property flag change check.- Throws:
JaloInvalidParameterException- in case the enclosing type does not belong to a subclass of extensible item- See Also:
setProperty(boolean)
-
isUnique
public boolean isUnique()
Tells whether this attribute is unique.Unique attributes describe the fact that no two instances (of the enclosing type) may hold the same value within this attribute.
Please note that right now there is no automatic check built in hybris platform - each
AttributeAccesswill need to implement its own check. This may change in future releases.
-
setUnique
public void setUnique(boolean unique)
Changes the unique flag of this attribute descriptor.- Parameters:
unique- the new unique status.
-
setAttributeHandler
public void setAttributeHandler(java.lang.String attributeHandler)
-
getAttributeHandler
public java.lang.String getAttributeHandler()
-
getDefaultValueDefinitionString
public java.lang.String getDefaultValueDefinitionString()
Returns the defaul value definition fromitems.xmlin case this attribute was declared there having a<defaultvalue>tag. Otherwisenullis returned.- See Also:
getXMLDefinition()
-
getDefaultValue
public java.lang.Object getDefaultValue()
Returns the default value of this attribute descriptor ornullif no value was set and there is no default value defined for the attribute value type. If the value provides a default value this one is taken if the attribute doesnt provide a own value.Please note that the default value for the current session context is retrieved: for localized attributes the value belonging to the current session language!
-
getDefaultValue
public java.lang.Object getDefaultValue(SessionContext ctx)
Returns the default value of this attribute descriptor ornullif no value was set and there is no default value defined for the attribute value type. If the value provides a default value this one is taken if the attribute doesnt provide a own value.Please note that the default value for the specified session context is retrieved: for localized attributes the value belonging to the current session language! If no language is set or the context is
nullall localized values are returned in form of a map holding language-to-value mappings.- Parameters:
ctx- the session context specifying the language ( affect for localized attributes only )- See Also:
setDefaultValue(Object),setDefaultValue(SessionContext, Object)
-
interpretAndReplaceDefaultValue
protected java.lang.Object interpretAndReplaceDefaultValue(java.lang.Object current)
-
setDefaultValue
public void setDefaultValue(java.lang.Object value) throws JaloInvalidParameterExceptionChanges the default value of this attribute.Please note that the value is set using the current session context. For localized attributes this means the value belonging to the current session language is changed - all other stay unchanged. Non-localized attributes are not affected by session context.
- Parameters:
value- the new default value- Throws:
JaloInvalidParameterException- in case the new value is not compatible with the attribute value type.- See Also:
getDefaultValue(),getDefaultValue(SessionContext),setDefaultValue(SessionContext, Object)
-
setDefaultValue
public void setDefaultValue(SessionContext ctx, java.lang.Object value) throws JaloInvalidParameterException
Changes the default value of this attribute.Please note that the value is set using the specified session context. For localized attributes this means the value belonging to the current session language is changed - all other stay unchanged. If no language is set the value must be a map containing all localized values as language-to-value mappings.
Unlocalized attributes are not affected by session context.- Parameters:
ctx- the session context specifying the languagevalue- the new default value- Throws:
JaloInvalidParameterException- in case the new value is not compatible with the attribute value type.- See Also:
getDefaultValue(),getDefaultValue(SessionContext),setDefaultValue(Object)
-
checkDefaultValueAssignability
protected void checkDefaultValueAssignability(SessionContext ctx, java.lang.Object newVal) throws JaloInvalidParameterException
Internal - checks compatibility of default value with attribute value type.- Parameters:
newVal- the new value- Throws:
JaloInvalidParameterException- in case the value is not compatible- See Also:
setDefaultValue(SessionContext, Object)
-
getDescription
public java.lang.String getDescription()
- Returns:
- the attribute description text localized for the current session language.
-
getDescription
public java.lang.String getDescription(SessionContext ctx)
- Parameters:
ctx- the session context specifying the language to get the localized description for- Returns:
- the attribute description text localized as spcified by the given session context
-
setDescription
public void setDescription(java.lang.String description)
Changes the attribute description text for the current session languag.- Parameters:
description- the new (localized) description
-
setDescription
public void setDescription(SessionContext ctx, java.lang.String description)
Changes the attribute description text for the specified languag.- Parameters:
ctx- the session contex specifying the language to change the description fordescription- the new (localized) description
-
getAllDescriptions
public java.util.Map getAllDescriptions()
- Returns:
- all localized attribute descriptions as language-to-description map
-
getAllDescriptions
public java.util.Map getAllDescriptions(SessionContext ctx)
- Returns:
- all localized attribute descriptions as language-to-description map
-
setAllDescriptions
public void setAllDescriptions(java.util.Map descriptions)
Changes all localized attribute descriptions by providing a language-to-description map.
-
setAllDescriptions
public void setAllDescriptions(SessionContext ctx, java.util.Map descriptions)
Changes all localized attribute descriptions by providing a language-to-description map.
-
getSelectionOf
public AttributeDescriptor getSelectionOf()
Returns the selection-of attribute descriptor.Attributes which own a selection-of attribute descriptor must to choose their values from the values readable from the selecion-of attribute.
Usually selection-of attribute descriptors describe collection attributes so that there are multiple values to chose from.
Of course the attribute value types have to be compatible.
-
setSelectionOf
public void setSelectionOf(AttributeDescriptor descriptor) throws JaloInvalidParameterException
Changes the selection-of attribute.- Parameters:
descriptor- the new selection-of attribute- Throws:
JaloInvalidParameterException- if- the attribute equals this attribute
- the attribute does not belong to the same enclosing type
- the value type of the selection attribute is incompatible with this attributes value type
- See Also:
getSelectionOf()
-
checkSelectionOfDescriptor
protected void checkSelectionOfDescriptor(AttributeDescriptor newSelect) throws JaloInvalidParameterException
Internal - compatibility check for selection of sttributes.- Throws:
JaloInvalidParameterException- if- the attribute equals this attribute
- the attribute does not belong to the same enclosing type
- the value type of the selection attribute is incompatible with this attributes value type
- See Also:
setSelectionOf(AttributeDescriptor)
-
getDatabaseColumn
public java.lang.String getDatabaseColumn()
- Returns:
- the database column of this attribute or
nullif the attribute has no persistence representation.
-
setDatabaseColumn
public void setDatabaseColumn(java.lang.String col)
Changes the database column of this attribute.This change will be only effective after server restart ! Also note that you have to make sure the column exists since it is not atomatically created due to some database ALTER TABLE limitations.
- Parameters:
col- the new column name
-
getProposedDatabaseColumn
public java.lang.String getProposedDatabaseColumn()
Since all attributes created after initialization are not mapped to a own database column this method provides a column name proposal.Such a property attribute can be mapped to a own column as follows:
- set the column name (as proposed or any other possible name) by
setDatabaseColumn(String) - shutdown all hybris platform instances
- create this column manually in the proper database table (use
ComposedType.getTable()to get item table name; for localized attributes use table itemtable +'LP' instead) - start the hybris platform again
- the attribute should be read from and stored into the new column now
- Returns:
- the proposed column name
- set the column name (as proposed or any other possible name) by
-
getPersistenceClass
public java.lang.Class getPersistenceClass()
- Returns:
- the java class describing this attribute's persistence type.
- See Also:
getPersistenceType()
-
getPersistenceType
public AtomicType getPersistenceType()
- Returns:
- the atomic type describing this attributes persistence type.
- See Also:
getPersistenceClass()
-
getAttributeDescriptorImpl
protected AttributeDescriptor.AttributeDescriptorImpl getAttributeDescriptorImpl()
Internal - access to persistence layer implementation.
-
getIntModifiersFromMap
protected int getIntModifiersFromMap(java.util.Map allAttributes)
Internal - converts single flag attributes into int constants combinations for generic creation process.- Parameters:
allAttributes- the attribute values- Returns:
- a combination of:
-
toString
public java.lang.String toString()
The string represenation of this attribute descriptor.- Overrides:
toStringin classDescriptor- Returns:
- the
Stringrepresentation of this item.
-
toString
public static java.lang.String toString(int modifiers)
-
getPersistenceQualifier
public java.lang.String getPersistenceQualifier()
If the attribute is backed by a EJB CMP field this method returns the CMP field name. Otherwisenullis returned.
-
isRedeclared
public boolean isRedeclared()
Tells whether a inherited attribute descriptor has different modifiers and/or a different value type than its super attribute descriptor.A redeclared attribute will be included in the XML definition of its type even though it was originally declared in one of its supertypes.
-
getXMLCustomProperties
protected java.util.Map getXMLCustomProperties()
Override to add custom properties to this type's xml definition.
-
getXMLDefinition
public java.lang.String getXMLDefinition()
Assembles the attribute descriptors XML definition required foritems.xml. This definiton will be included in the XML definition of its enclosing type if the attribute has been declarded by it or has been redeclared.
-
exportXMLDefinition
public java.lang.String exportXMLDefinition(org.znerd.xmlenc.XMLOutputter xout)
- Specified by:
exportXMLDefinitionin classTypeManagerManaged
-
exportXMLDefinitionDefaultValue
protected void exportXMLDefinitionDefaultValue(org.znerd.xmlenc.XMLOutputter xout) throws java.io.IOException- Throws:
java.io.IOException
-
writeDefaultValueTagAtomic
protected void writeDefaultValueTagAtomic(org.znerd.xmlenc.XMLOutputter xout, java.lang.String atomictype, java.lang.String value)
-
checkTypePermission
public boolean checkTypePermission(UserRight right)
Checks the type permission upon this attribute of the current session user.Works similar to
Item.checkPermission(UserRight)except that the permissions of the enclosing type and super attribute are evaluated in case no permission is set for this attribute.The evaluation first checks the enclosing type and in case no permission is defined there too just checks the super attribute recursively.
- Parameters:
right- the user right to check
-
checkTypePermission
public boolean checkTypePermission(Principal p, UserRight right)
Checks the type permission upon this attribute of the given principal.Works similar to
Item.checkPermission(UserRight)except that the permissions of the enclosing type and super attribute are evaluated in case no permission is set for this attribute.The evaluation first checks the enclosing type and in case no permission is defined there too just checks the super attribute recursively.
- Parameters:
p- the principal to checkright- the user right to check
-
-