Package com.iizix.prop
Class AssetReferences
- All Implemented Interfaces:
EventListener
,IGProp<String>
,IReferencingGProp
,Cloneable
The Asset References property class hold the references to zero or more FileURIPropCnr property containers. The reference names are separated by comma in the string.
- Author:
- Christopher Mindus
Field Summary
Fields inherited from class com.iizix.prop.GProp
GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_USER_1, PROP_USER_2
Fields inherited from interface com.iizix.prop.IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a Asset References property with no name and with a null value.AssetReferences
(Atom propertyAtom) Creates a Asset References property with the specified name with a null value.AssetReferences
(Atom propertyAtom, String newValue) Creates a Asset References property with the specified name and value.Method Summary
Modifier and TypeMethodDescriptionprotected boolean
equalsErrors
(PropError pe1, PropError pe2, int how) Processes error property verification.protected void
Call this method to inform a listener.Gets the Styles associates with the references.final IGProp<?>
Gets the single-referenced target.Gets the properties that this referencing property directly references.Gets the reference Type.final boolean
Gets if this referencing property is of single-reference type or that can have between zero and many references.void
onEventSelf
(GEvent event) Called when a property event is send to this property.protected void
Called when a project name has been changed.protected void
Property disposed of: dispose of reference.protected void
Called to perform reference resolving.Methods inherited from class com.iizix.prop.StringProp
appendPropValue, clone, getPropValue0, getString, getString, getValueClasses, initializeValue, setPropValue, toNativeValue0, validatePropType
Methods inherited from class com.iizix.prop.GProp
addPropError, addPropListener, convertPropError, dispose, equals, equals, equalsObj, equalsPropValue, equalsTree, equalValues, extendsClone, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, getVSReference, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeElement, initializeGElement, initializeGProp, initializeProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropNullable, isPropPrivate, isPropPrivateAtCreation, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, list, list, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onPrepare, onPropInvalidateCache, onPropParentChanged, onPropTreeInitialized, onPropValueSet, onRemoteEvent, onVirtualizationCompleted, paramString, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setCreateRequiredProp, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toElementString, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropValue, verify, virtualize, warning, warning, warning
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.iizix.prop.IReferencingGProp
getParent, getReferencingOwner
Constructor Details
AssetReferences
protected AssetReferences()Creates a Asset References property with no name and with a null value.AssetReferences
Creates a Asset References property with the specified name with a null value.- Parameters:
propertyAtom
- the property atom.
AssetReferences
Creates a Asset References property with the specified name and value.- Parameters:
propertyAtom
- the property atom.newValue
- the new string value for the property.- Throws:
PropValidateException
- When the constraints are not met.
Method Details
onPropDispose
protected void onPropDispose()Property disposed of: dispose of reference.- Overrides:
onPropDispose
in classGProp<String>
equalsErrors
Processes error property verification. The default processing is to verify the two error propertiespe1
andpe2
for equality ifincludeErrors
is 0 or 1, and returns true if the value is 2=no comparison with error properties.Override to verify property errors for reference properties.
- Overrides:
equalsErrors
in classGProp<String>
- Parameters:
pe1
- The first error property, may be null.pe2
- The second error property, may be null.how
- Flags EQC_* values for equal checking.- Returns:
- Equality flag depending on
includeErrors
value.
getReferenceType
Gets the reference Type.- Specified by:
getReferenceType
in interfaceIReferencingGProp
- Returns:
IPropReference.RefType.AssetsFile
.
onEventSelf
Called when a property event is send to this property.A subclass can override this method to perform appropriate processing and is not required to call
super.onEventSelf(e)
.- Specified by:
onEventSelf
in interfaceIGProp<String>
- Overrides:
onEventSelf
in classGProp<String>
- Parameters:
event
- The property event.
onReferenceEvent
Called to perform reference resolving. A property should override this method if it needs to perform reference resolving and validation.Subclasses override this method and only subclasses extending
PropCnr
needs to callsuper.onReferenceEvent(ResolveReferenceEvent event)
.- Overrides:
onReferenceEvent
in classGProp<String>
- Parameters:
event
- The resolve references event.
onProjectNameChanged
Called when a project name has been changed.- Parameters:
event
- The project name event.
getAllFiles
Gets the Styles associates with the references. The array may containnull
members in which case that reference is not resolved.- Returns:
- The array returned is never null but may be of length zero.
fireChanged
protected void fireChanged()Call this method to inform a listener.isReferencingMultipleTargets
public final boolean isReferencingMultipleTargets()Gets if this referencing property is of single-reference type or that can have between zero and many references.- Specified by:
isReferencingMultipleTargets
in interfaceIReferencingGProp
- Returns:
true
as there can be multiple references.
getDirectReferencedTarget
Gets the single-referenced target. Referencing properties that can have multiple targets should ALWAYS returnnull
for this method and use the methodgetDirectReferencedTargetSet()
instead.- Specified by:
getDirectReferencedTarget
in interfaceIReferencingGProp
- Returns:
- Always
null
as there can be multiple references.
getDirectReferencedTargetSet
Gets the properties that this referencing property directly references. Referencing properties that only has a single target should ALWAYS returnnull
for this method and use the methodgetDirectReferencedTarget()
instead.- Specified by:
getDirectReferencedTargetSet
in interfaceIReferencingGProp
- Returns:
- A list of properties, or
null
for none. The default is that this method returnsnull
unless overridden.