|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ca.commons.datamodel.concurrent.ConcurrentNamespace
public final class ConcurrentNamespace
| Field Summary |
|---|
| Fields inherited from interface com.ca.commons.datamodel.DataModelItem |
|---|
NAME_DELIMITER |
| Method Summary | ||
|---|---|---|
com.ca.commons.datamodel.concurrent.ConcurrentProperty |
addMetaDataProperty(String name)
Create an empty metadata property on this item with provided name and type, if one does not already exist. |
|
ConcurrentNamespace |
clone()
|
|
String |
getAbsoluteName()
|
|
DataModelItem |
getContainer()
|
|
ConcurrentModelClass |
getDataModelClass(String name)
|
|
Collection<ConcurrentModelClass> |
getDataModelClasses()
|
|
String |
getDocumentation()
|
|
com.ca.commons.datamodel.concurrent.ConcurrentEnumDef |
getEnumDef(String name)
|
|
Collection<com.ca.commons.datamodel.concurrent.ConcurrentEnumDef> |
getEnumDefs()
|
|
ConcurrentModelClass |
getMetadataClass(String name)
|
|
Collection<ConcurrentModelClass> |
getMetadataClasses()
Don't expect clients to call these methods as metadata classes (and the inheritance heirachy for normal classes) are merely a transient mechanism used to attach all the properties and metadata settings to the right classes. |
|
Collection<com.ca.commons.datamodel.concurrent.ConcurrentProperty> |
getMetaDataProperties()
Returns collection of DataModelPropertys describing metadata. |
|
com.ca.commons.datamodel.concurrent.ConcurrentProperty |
getMetaDataProperty(String name)
|
|
boolean |
getMetaDataPropertyBool(String boolPropName,
boolean def)
Helper function which returns boolean value for contained property with name boolPropName or
def if no such property exists. |
|
String |
getMetaDataPropertyStr(String strPropName,
String def)
Helper function which returns String value for contained property with name strPropName or
def if no such property exists. |
|
DataModel |
getModel()
|
|
String |
getName()
|
|
boolean |
isMetadata()
Classes and properties can represent datamodel or metamodel. |
|
Object |
mdObject(String mdName,
Object defaultValue)
Returns the untyped value of a metadata item. |
|
String |
mdString(String mdName,
String defaultValue)
Returns the string value of a metadata item. |
|
com.ca.commons.functional.Option<DataModelValue> |
mdValue(String mdName)
|
|
|
mdValue(String mdName,
T defaultValue)
Tries to retrieve the value of the metadata item as a particular type. |
|
|
mdValue(String mdName,
T defaultValue,
Class<? extends T> type)
Tries to retrieve the value of a metadata item as a particular type. |
|
void |
setDocumentation(String doc)
|
|
void |
setMetaDataPropertyBool(String boolPropName,
boolean b)
Helper function to ensure that the named metadata property is set to the provided value on this item. |
|
void |
setMetaDataPropertyStr(String strPropName,
String s)
Helper function to ensure that the named metadata property is set to the provided value on this item. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ca.commons.datamodel.DataModelItem |
|---|
addMetaDataProperty, getAbsoluteName, getContainer, getDocumentation, getMetaDataProperties, getMetaDataProperty, getMetaDataPropertyBool, getMetaDataPropertyStr, getModel, getName, isMetadata, setDocumentation, setMetaDataPropertyBool, setMetaDataPropertyStr |
| Methods inherited from interface com.ca.commons.datamodel.HasMetadata |
|---|
mdObject, mdString, mdValue, mdValue, mdValue |
| Method Detail |
|---|
@NotNull public ConcurrentNamespace clone()
@NotNull public Collection<com.ca.commons.datamodel.concurrent.ConcurrentEnumDef> getEnumDefs()
getEnumDefs in interface DataModelNamespace
public com.ca.commons.datamodel.concurrent.ConcurrentEnumDef getEnumDef(@NotNull
String name)
throws DataModelException
getEnumDef in interface DataModelNamespaceDataModelException@NotNull public Collection<ConcurrentModelClass> getDataModelClasses()
getDataModelClasses in interface DataModelNamespaceDataModelClass for normal classes.
@Nullable
public ConcurrentModelClass getDataModelClass(@NotNull
String name)
throws DataModelException
getDataModelClass in interface DataModelNamespaceDataModelException@NotNull public Collection<ConcurrentModelClass> getMetadataClasses()
DataModelNamespace
getMetadataClasses in interface DataModelNamespaceDataModelClass for metadata classes.
@Nullable
public ConcurrentModelClass getMetadataClass(String name)
throws DataModelException
getMetadataClass in interface DataModelNamespaceDataModelException@NotNull public DataModel getModel()
getModel in interface DataModelItem@NotNull public final String getAbsoluteName()
getAbsoluteName in interface DataModelItem@NotNull public final String getName()
getName in interface DataModelItempublic boolean isMetadata()
DataModelItem
isMetadata in interface DataModelItem@NotNull public Collection<com.ca.commons.datamodel.concurrent.ConcurrentProperty> getMetaDataProperties()
DataModelItemDataModelPropertys describing metadata.
getMetaDataProperties in interface DataModelItem
@Nullable
public com.ca.commons.datamodel.concurrent.ConcurrentProperty getMetaDataProperty(String name)
throws DataModelException
getMetaDataProperty in interface DataModelItemDataModelException
@Nullable
public final DataModelItem getContainer()
throws DataModelException
getContainer in interface DataModelItemDataModelException@NotNull public final String getDocumentation()
getDocumentation in interface DataModelItem
public void setDocumentation(@NotNull
String doc)
setDocumentation in interface DataModelItem
@NotNull
public com.ca.commons.datamodel.concurrent.ConcurrentProperty addMetaDataProperty(@NotNull
String name)
DataModelItem
addMetaDataProperty in interface DataModelItem
public void setMetaDataPropertyBool(@NotNull
String boolPropName,
boolean b)
DataModelItem
setMetaDataPropertyBool in interface DataModelItem
@Nullable
public Object mdObject(@NotNull
String mdName,
@Nullable
Object defaultValue)
HasMetadatamdValue(mdName, defaultValue, Object.class).
mdObject in interface HasMetadatamdName - The name of the metadata item.defaultValue - A default value to return if the named item is not found.
HasMetadata.mdValue(String, Object, Class)
@Nullable
public String mdString(@NotNull
String mdName,
@Nullable
String defaultValue)
HasMetadatamdValue(mdName, defaultValue, String.class).
mdString in interface HasMetadatamdName - The name of the metadata item.defaultValue - A default value to return if the named item is
not found, or its value is not a string.
HasMetadata.mdValue(String, Object, Class)
@NotNull
public <T> T mdValue(@NotNull
String mdName,
@NotNull
T defaultValue)
HasMetadatamdValue(mdName, defaultValue, defaultValue.getClass()).
mdValue in interface HasMetadatamdName - The name of the metadata item to retrieve.defaultValue - The default value to return if the metadata item
cannot be retrieved. Also indicates the type of value expected
by the caller.
HasMetadata.mdValue(String, Object, Class)
@Nullable
public <T> T mdValue(@NotNull
String mdName,
@Nullable
T defaultValue,
@NotNull
Class<? extends T> type)
HasMetadata
mdValue in interface HasMetadatamdName - The name of the metadata item to retrieve.defaultValue - The default value to return if the metadata item
cannot be retrieved.type - A class object indicating the type of the value that
is expected.
type.isInstance(returnedValue)
is always true.
@NotNull
public com.ca.commons.functional.Option<DataModelValue> mdValue(@NotNull
String mdName)
mdValue in interface HasMetadatapublic String toString()
toString in class Object
public final boolean getMetaDataPropertyBool(String boolPropName,
boolean def)
DataModelItemboolPropName or
def if no such property exists.
getMetaDataPropertyBool in interface DataModelItem
public String getMetaDataPropertyStr(String strPropName,
String def)
DataModelItemstrPropName or
def if no such property exists.
getMetaDataPropertyStr in interface DataModelItem
public void setMetaDataPropertyStr(String strPropName,
String s)
DataModelItem
setMetaDataPropertyStr in interface DataModelItem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||