|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.information.metadata.MetadataBuilder<T,J,B>
T
- Information service object class created by this builderJ
- Metadata object class used to represent this objectB
- Concrete builder classpublic abstract class MetadataBuilder<T extends MetadataInterface,J extends com.sas.metadata.remote.PrimaryType,B extends MetadataBuilder<T,J,B>>
Abstract base class for a metadata object builder. The object builder pattern supports defining
metadata objects using a simple sequence of methods specifying attributes. See
LASRServerUtil
for an example of a concrete
builder class.
Field Summary | |
---|---|
protected J |
built
|
protected T |
builtSmartObject
|
protected java.lang.String |
desc
|
protected OMIServer |
metadataServer
|
protected java.lang.String |
name
|
protected java.util.Map<java.lang.String,java.lang.String> |
options
|
protected static java.lang.String |
OTHER_OPTIONS_PROPERTY
|
protected com.sas.metadata.remote.Prototype |
prototype
|
protected java.lang.String |
prototypeName
|
protected java.util.Map<java.lang.String,com.sas.metadata.remote.Property> |
prototypeProperties
|
protected RepositoryInterface |
repository
|
protected java.lang.String |
repositoryName
|
protected UserContextInterface |
user
|
Constructor Summary | |
---|---|
protected |
MetadataBuilder(java.lang.Class<J> metadataType,
java.lang.String publicType,
double usageVersion)
|
Method Summary | ||
---|---|---|
protected T |
buildInternal(UserContextInterface user)
Build the object. |
|
protected void |
buildSetup(UserContextInterface user)
|
|
protected
|
createMetadata(java.lang.String name,
java.lang.Class<M> type)
|
|
protected void |
createObject()
|
|
protected com.sas.metadata.remote.Property |
createProperty(java.lang.String name,
java.lang.String propertyName,
java.lang.String delimiter,
java.lang.String value)
|
|
protected com.sas.metadata.remote.Property |
createPropertyFromPrototype(com.sas.metadata.remote.Property prototype,
java.lang.String value)
|
|
B |
desc(java.lang.String desc)
Defines descriptive text. |
|
B |
extendedAttribute(java.lang.String name,
java.lang.String value,
java.lang.String description)
Defines an extended attribute. |
|
protected
|
findMetadata(java.lang.String search,
java.lang.Class<M> type)
|
|
protected
|
findMetadataByName(java.lang.String name,
java.lang.Class<M> type)
|
|
B |
keyword(java.lang.String keyword)
Defines a keyword. |
|
protected void |
loadPrototypeProperties()
|
|
B |
name(java.lang.String name)
Defines object name. |
|
B |
option(java.lang.String optionName)
Defines a valueless option on the object. |
|
B |
option(java.lang.String optionName,
java.lang.String optionValue)
Defines an option on the object. |
|
void |
validate(UserContextInterface user)
Validates the builder state without building the object. |
Field Detail |
---|
protected java.lang.String prototypeName
protected com.sas.metadata.remote.Prototype prototype
protected java.util.Map<java.lang.String,com.sas.metadata.remote.Property> prototypeProperties
protected UserContextInterface user
protected OMIServer metadataServer
protected RepositoryInterface repository
protected java.lang.String repositoryName
protected java.lang.String name
protected java.lang.String desc
protected java.util.Map<java.lang.String,java.lang.String> options
protected static final java.lang.String OTHER_OPTIONS_PROPERTY
protected J extends com.sas.metadata.remote.PrimaryType built
protected T extends MetadataInterface builtSmartObject
Constructor Detail |
---|
protected MetadataBuilder(java.lang.Class<J> metadataType, java.lang.String publicType, double usageVersion)
Method Detail |
---|
public B name(java.lang.String name)
name
- object name
java.lang.IllegalArgumentException
- for invalid names
java.lang.NullPointerException
public B desc(java.lang.String desc)
desc
- description
java.lang.NullPointerException
- if desc is nullpublic B keyword(java.lang.String keyword)
keyword
- keyword
public B option(java.lang.String optionName)
optionName
- option name
public B option(java.lang.String optionName, java.lang.String optionValue)
optionName
- option nameoptionValue
- option value
public B extendedAttribute(java.lang.String name, java.lang.String value, java.lang.String description)
name
- attribute namevalue
- attribute valuedescription
- optional attribute description
java.lang.NullPointerException
- if name or value is nullpublic void validate(UserContextInterface user) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, ItemAlreadyExistsException, ServiceException
#build(UserContextInterface)
before attempting to create the object.
This method is typically overridden by any concrete builder class.
user
- user context
java.lang.IllegalArgumentException
- illegal value was specified to the builder
java.lang.IllegalStateException
- the builder has conflicting or missing definitions
ItemAlreadyExistsException
- an object with the same name or path already exists
ServiceException
protected T buildInternal(UserContextInterface user) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, ItemAlreadyExistsException, ServiceException
user
- user context
java.lang.IllegalArgumentException
- illegal value was specified to the builder
java.lang.IllegalStateException
- the builder has conflicting or missing definitions
ItemAlreadyExistsException
- an object with the same name or path already exists
ServiceException
protected final void buildSetup(UserContextInterface user) throws ServiceException
ServiceException
protected void createObject() throws java.rmi.RemoteException, com.sas.metadata.remote.MdException, ServiceException
java.rmi.RemoteException
com.sas.metadata.remote.MdException
ServiceException
protected void loadPrototypeProperties() throws java.rmi.RemoteException, com.sas.metadata.remote.MdException
java.rmi.RemoteException
com.sas.metadata.remote.MdException
protected final <M extends com.sas.metadata.remote.Root> M createMetadata(java.lang.String name, java.lang.Class<M> type) throws java.rmi.RemoteException
java.rmi.RemoteException
protected final com.sas.metadata.remote.Property createProperty(java.lang.String name, java.lang.String propertyName, java.lang.String delimiter, java.lang.String value) throws java.rmi.RemoteException
java.rmi.RemoteException
protected final com.sas.metadata.remote.Property createPropertyFromPrototype(com.sas.metadata.remote.Property prototype, java.lang.String value) throws java.rmi.RemoteException
java.rmi.RemoteException
protected final <M extends com.sas.metadata.remote.Root> M findMetadataByName(java.lang.String name, java.lang.Class<M> type) throws java.rmi.RemoteException, com.sas.metadata.remote.MdException
java.rmi.RemoteException
com.sas.metadata.remote.MdException
protected final <M extends com.sas.metadata.remote.Root> M findMetadata(java.lang.String search, java.lang.Class<M> type) throws java.rmi.RemoteException, com.sas.metadata.remote.MdException
java.rmi.RemoteException
com.sas.metadata.remote.MdException
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |