Package com.iizix.prop
Class AssetReferences
- All Implemented Interfaces:
- EventListener,- IGProp<String>,- IReferencingGProp,- Cloneable
- Direct Known Subclasses:
- CSSAssetReferences
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_INCLUDE_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
- Constructor SummaryConstructorsModifierConstructorDescription- protectedCreates 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 SummaryModifier and TypeMethodDescription- void- assignServerAppFiles- (FileURIPropCnr[] serverFiles, String[] clientResourcePaths) The files when running in the server in a loaded app, null otherwise.- clone()Clones this property.- protected boolean- equalsErrors- (PropError pe1, PropError pe2, int how) Processes error property verification.- protected voidCall this method to inform a listener.Gets the client resource URLs to the files when loaded from Jar in server.Gets the resources associates with the references.- final IGProp<?>Gets the single-referenced target.- final Set<FileURIPropCnr>Gets the properties that this referencing property directly references.Gets the properties that this referencing property directly references.- protected abstract String- getErrorMessage- (String fullPathOrURL) Gets the error message for an invalid file extension.- protected abstract StringThe file type description.Gets the reference Type.- String[]Gets all the resource reference strings.- final booleanGets if this referencing property is of single-reference type or that can have between zero and many references.- protected abstract booleanValidates each asset file for correct file extension.- void- onEventSelf- (GEvent event) Called when a property event is send to this property.- protected voidCalled when a project name has been changed.- protected voidProperty disposed of: dispose of reference.- protected voidCalled to perform reference resolving.- boolean- verify- (PropVerification verification) Verifies this property.- Methods inherited from class com.iizix.prop.StringProp- appendPropValue, getPropValue0, getString, getString, getValueClasses, initializeValue, setPropValue, toNativeValue0, validatePropType- Methods inherited from class com.iizix.prop.GProp- addPropError, addPropListener, appendProp, convertPropError, dispose, equals, equals, equalsObj, equalsPropValue, equalsTree, equalValues, 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, isSibling, 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, 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- AssetReferencesprotected AssetReferences()Creates a Asset References property with no name and with a null value.
- AssetReferencesCreates a Asset References property with the specified name with a null value.- Parameters:
- propertyAtom- the property atom.
 
- AssetReferencesCreates 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- cloneClones this property.- Overrides:
- clonein class- StringProp
- Returns:
- An AssetReferences instance.
 
- onPropDisposeprotected void onPropDispose()Property disposed of: dispose of reference.- Overrides:
- onPropDisposein class- GProp<String>
 
- equalsErrorsProcesses error property verification. The default processing is to verify the two error properties- pe1and- pe2for equality if- includeErrorsis 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:
- equalsErrorsin class- GProp<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 includeErrorsvalue.
 
- getReferenceTypeGets the reference Type.- Specified by:
- getReferenceTypein interface- IReferencingGProp
- Returns:
- IPropReference.RefType.AssetsFile.
 
- onEventSelfCalled 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:
- onEventSelfin interface- IGProp<String>
- Overrides:
- onEventSelfin class- GProp<String>
- Parameters:
- event- The property event.
 
- onReferenceEventCalled 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 - PropCnrneeds to call- super.onReferenceEvent(ResolveReferenceEvent event).- Overrides:
- onReferenceEventin class- GProp<String>
- Parameters:
- event- The resolve references event.
 
- onProjectNameChangedCalled when a project name has been changed.- Parameters:
- event- The project name event.
 
- getAllFilesGets the resources associates with the references. The array may contain- nullmembers in which case that reference is not resolved.- Returns:
- The array returned is never null but may be of length zero.
 
- getResourceReferencesGets all the resource reference strings.- Returns:
- An array of string resources.
 
- fireChangedprotected void fireChanged()Call this method to inform a listener.
- isReferencingMultipleTargetspublic final boolean isReferencingMultipleTargets()Gets if this referencing property is of single-reference type or that can have between zero and many references.- Specified by:
- isReferencingMultipleTargetsin interface- IReferencingGProp
- Returns:
- trueas there can be multiple references.
 
- getDirectReferencedTargetGets the single-referenced target. Referencing properties that can have multiple targets should ALWAYS return- nullfor this method and use the method- getDirectReferencedTargetSet()instead.- Specified by:
- getDirectReferencedTargetin interface- IReferencingGProp
- Returns:
- Always nullas there can be multiple references.
 
- getDirectReferencedTargetSetGets the properties that this referencing property directly references. Referencing properties that only has a single target should ALWAYS return- nullfor this method and use the method- getDirectReferencedTarget()instead.- Specified by:
- getDirectReferencedTargetSetin interface- IReferencingGProp
- Returns:
- A list of properties, or nullfor none. All properties returned are of FileURIPropCnr types.
 
- getDirectReferencedTargetFilesGets the properties that this referencing property directly references. Referencing properties that only has a single target should ALWAYS return- nullfor this method and use the method- getDirectReferencedTarget()instead.- Returns:
- A list of target FileURIPropCnr's, or nullfor none.
 
- assignServerAppFilesThe files when running in the server in a loaded app, null otherwise.- This method cannot be called from elsewhere than the server app loader, and once only. - Parameters:
- fixedServerFiles- The server files to assign.
- clientResourcePaths- The client resource paths.
- Throws:
- IllegalStateException- In case this is not done from the server app loader.
 
- fixedClientResourceURLsGets the client resource URLs to the files when loaded from Jar in server. The list is not modifiable.- Returns:
- The list of client resource URLs, or nullwhen app is not loaded from a Jar in the server.
 
- isValidFileExtensionValidates each asset file for correct file extension.- Parameters:
- ext- The asset file extension to verify, without the "." prefix, meaning if there is no file extension, then an empty string is passed.
- Returns:
- trueif extension is valid,- falseotherwise.
 
- getFileTypeDescrThe file type description.- Returns:
- The file type description, e.g. "CSS file".
 
- getErrorMessageGets the error message for an invalid file extension.- Parameters:
- fullPathOrURL- The full file name or URL path.
- Returns:
- The error message.
 
- verifyVerifies this property. The check performed is the extension of classes and that no circular reference is present.