Class Metadata
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.sas.services.information.metadata.Metadata
- All Implemented Interfaces:
MetadataInterface,PublicObjectInterface,Serializable,Remote
- Direct Known Subclasses:
Content,Folder, com.sas.services.information.metadata.OMRConnection,OMRGridApplication,OMRHost,OMRPromptDefinition,OMRPromptGroup, com.sas.services.information.metadata.OMRSoftwareComponent,OMRTransformation,Remarks
public class Metadata
extends UnicastRemoteObject
implements PublicObjectInterface, MetadataInterface, Serializable
An abstract class to represent objects that can exist in multiple types of
repositories.
Users should avoid casting to this class. Instead, cast objects to
MetadataInterface.
- Since:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Mapprotected ArrayListprotected booleanprotected booleanprotected booleanprotected longprotected intprotected Dateprotected Dateprotected RepositoryInterfaceprotected intprotected Objectprotected longstatic final SimpleDateFormat[]Date formats using for Date parsing.protected static final TimeZoneGMT timezone.protected static final Stringstatic final intThe object is from a DAV Repository.static final intThe object is from OMI, using local jOMAstatic final intNo repository type has been set.static final intThe object is from an OMI Repository.protected static final StringFields inherited from class java.rmi.server.RemoteObject
refFields inherited from interface com.sas.services.information.metadata.MetadataInterface
METADATA_STATE_DELETED, METADATA_STATE_DESTROYED, METADATA_STATE_NEW, METADATA_STATE_NORMAL, PERMISSION_READMETADATA, PERMISSION_WRITEMETADATA -
Constructor Summary
ConstructorsModifierConstructorDescriptionMetadata()Default constructor.protectedMetadata(Class theClass) Constructs an instance using the specified class to determine appropriate RMI socket factories.Metadata(Object o) Construct a new Metadata object with Object o.protectedMetadata(Object o, Class theClass) Construct a new Metadata object with Object o. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd()Add a new metadata item to the repository.voidAdd an Access Control item to this object.voidaddAttribute(String key, String value) Add an attribute with the given name and valuevoidaddAttributes(Map attributeMap) Add a number of attributes - names and values are given in the map.voidAdd an associated Document to this object.voidaddExtension(String name, String value, String type) Add an extension to the current set of extensionsvoidaddGroup(GroupInterface group) Add this object to a group.voidaddImplementor(SoftwareComponentInterface softwareComponent) Add a SoftwareComponent as an implementor of this object.voidaddKeyword(String keyword) Add a keyword to this object.voidAdd an associated TextStore note to this object.addNoteTextStore(String name, String role, String type, String text) Creates a TextStore note and adds it to this object.voidaddObjectProperty(PropertyInterface property) Add a property to this object.voidaddObjectProperty(String name, String propertyName, String value, String type) Add a new property to this metadata object.voidaddPermissions(List identities, List permissions) Add a set of permissions for a set of identities for this metadata object.voidaddProcessorInterface(String interfaceClassName, ProcessorInterface actionInterface) Add an action interface to this class.voidaddPrompt(BaseOMRPromptInterface prompt) Add a prompt to this object.voidaddPropertySet(PropertySetInterface propertySet) Add a property set to this object.voidaddRemark(RemarksInterface remark) Add a remark to this smart objectvoidaddResponsibleParty(Responsibility newResponsibility) Add a new responsibleParty to this object.protected voidaddToList(List list, Object o) voidAdd a listener to receive event notifications when a transaction is committed or rolled back.voidaddUsedByPrototype(MetadataInterface prototyped) Add an object which uses this object as a prototype.voidcheckin()Check out the itemvoidcheckout()Check out the itemprotected voidcheckPulse(boolean dieOnDeleted) Check the state of this object instance.static voidvoidcommit()Commit changes that have been made to this object to the parent.copyTo(FolderInterface folder, String name) Make a copy of this object.intcountAssociatedObjects(String association) Count the objects associated to this one via a named association.voiddelete()Delete this object from its repository.voiddeleteAttribute(String key) Delete a specific attributevoiddeleteAttributes(List attributes) Delete a list of attributes.protected voiddeleteRootObject(com.sas.metadata.remote.Root object) voiddestroy()Destroy this object, clearing any object references, freeing any resources in use, and rendering it unusable for future use.static MetadataInterfacefromByteArray(RepositoryInterface ri, byte[] data) ListGet a list of the Access Controls on this object.StringgetAttribute(String key) Get the value of the attribute with the given key/name.MapGet a list of all the attributes.Obtain the AuthorizationUtil Interface for this objectReturns the container or parent object.DateGet a Date object representing the time the metadata was created.StringGets the name of the user that created the object.protected com.sas.storage.editableproperties.PropertyListStringGet the object description.ListGet the List of Documents associated with this object.StringGet the entity key for this item.StringGet a "standard" URL for a metadata object.ListGet the extensions for this object.ListGet the list of groups this object is a member of.StringgetGUID()Get a string representing a unique Identifier for this object.StringGet the unique ID of this object.ListGet all the identities that are associated to this metadata object through permissions.ListGet a List of the SoftwareComponent Implementors for this object.static InformationServiceInterfaceGet an instance of the Information Service.ListGet a list of keywords associated with this object.StringGet the value of the LockedBy attribute for a metadata object.StringGets the name of the user that modified the object.DateGet a Date object representing the time the metadata was last updated.StringgetName()Gets the name of the object.getNoteTextStore(String name, String textRole) Return a named TextStore note associated with this object or null if the TextStore does not exist.List<TextStoreInterface> Get the List of TextStore notes associated with this object.List<TextStoreInterface> getNoteTextStoresByRole(String textRoleFilter) Return a list of TextStore notes associated with this object filtered by TextRole.ListGet the Property objects associated with this metadata object.URIThis method is currently not being implemented and is reserved for future use.Return the FolderInterface that contains this object.StringgetParentPath(String rootFolderName) Get the parent path for this object.ListReturn a List of Folder objects that represent the parent(s) of this object in the hierarchy.StringgetPath(String rootFolderName) Get the path of this object from the root folder, including the object name.ListgetPaths(String rootFolderName) Deprecated.This method goes back to when there was not a single, canonical root in the metadata.Get the SBIP URL.getPathUrl(String rootTreeName) Get the SBIP URL.getPermission(IdentityInterface identity, PermissionInterface permission) Get a permission that matches the requested permission for the requested identity on this metadata object.ListgetPermissions(IdentityInterface identity) Get all the permissions that apply to this object.ListgetPermissions(IdentityInterface identity, String[] inheritedPermissions) Get all the permissions that apply to this object.ListGets a list of previous version namesGet this object's primary PropertyGroup object.ProcessorInterfacegetProcessorInterface(String interfaceClassName) Get the specified action interface.Get the first prompt on this object.ListGet the List of prompts associated with this object.PropertyBagInterfaceGet a "bag" of properties from the metadata object.ListGet a List of the property sets that are associated with this object.ListReturn a List of Remarks objects that represent the dicussion threads related to this object.StringGet the repository identifier for this object.Get the handle to the repository for this object.final ObjectGet the object that was returned directly from the repository.StringGet the repository name that this object resides in.StringGet a String that can be passed directly to a RepositoryInterface.fetch method.ListGet the responsible parties for this object.intgetState()Get the state of this metadata object.final intDeprecated.Tracking ids are no longer supported.static longGet the interval for keeping the parent tree information before forcing a trip to the server to refresh it.StringgetType()Get the object type.Get the type descriptor which should have the information from the Type Dictionary in metadata available for the clients.com.sas.util.UsageVersionReturn the usage version of the metadata.ListGet the List of objects which use this object as a prototype.Get the prototype which this object uses for description/validation.getVersion(String versionName) Return a smart object that represents a particular versioninthashCode()booleanisAuthorized(String permission) Check for a specific permission on this object by the user that owns the connection to the repository.booleanReturn a boolean indicating if this object is fully compatible with the version of the metadata.protected booleanisConnectionException(Throwable ex) booleanReturns true if the delete method has been called on this object.booleanReturns true if the backing connection, or infrastructure has been closed, rendering this object unusable.booleanisLoggingEnabled(org.apache.logging.log4j.Level level, String context) booleanCheck to be sure the object still exists in the metadata server.booleanReturn a boolean indicating if this object is read compatible with the version of the metadata.voidlogFormat(org.apache.logging.log4j.Level level, String context, ResourceBundle bundle, String key, Object arg0) voidlogFormat(org.apache.logging.log4j.Level level, String context, ResourceBundle bundle, String key, Object arg0, Object arg1) voidlogFormat(org.apache.logging.log4j.Level level, String context, ResourceBundle bundle, String key, Object arg0, Object arg1, Object arg2) voidlogFormat(org.apache.logging.log4j.Level level, String context, ResourceBundle bundle, String key, Object arg0, Object arg1, Object arg2, Object arg3) voidlogMessage(org.apache.logging.log4j.Level level, String message) voidlogMessage(org.apache.logging.log4j.Level level, String message, String context, Throwable t) voidlogThrowable(org.apache.logging.log4j.Level level, String message, String context, Throwable t) StringmapNameToFilesystem(int hostOS, String prefix, String suffix) Map the metadata object name to a file system path.StringmapUrlToFilesystem(int hostOS, String prefix, String suffix) Map the metadata object's SBIP Url to a file system path.voidmoveTo(FolderInterface folder) Move this object to a new folder.ObjectFor objects that support it, get an "active" interface for the metadata object.protected voidvoidrefresh()Refresh the data for this object from the repository.voidRemove an Access Control item from this object.voidRemove a document from this object's Documents association.voidremoveExtension(String name) Remove an Extension from the current extension set.protected voidremoveFromList(List list, Object o) voidremoveGroup(GroupInterface group) Remove this object from a group.voidremoveImplementor(SoftwareComponentInterface softwareComponent) Remove a SoftwareComponent from the list of implementors on this object.voidremoveKeyword(String keyword) Remove a keyword from this object.voidRemove a TextStore note from this object's Notes association.voidremoveObjectProperty(PropertyInterface property) Remove a Property from this object.voidremovePermissions(List identities, List permissions) Remove permissions matching the identities and permission list.voidremovePrompt(BaseOMRPromptInterface prompt) Remove a prompt from this object.voidremovePropertySet(PropertySetInterface propertySet) Remove a property set from this object.voidremoveResponsibleParty(Responsibility responsibility) Remove a responsible party from this metadata object.voidremoveResponsiblePartyByIdentity(Responsibility responsibility) Remove a responsible party from this metadata object.voidremoveUsedByPrototype(MetadataInterface prototyped) Remove an object from the list prototyped by this object.protected voidreset()voidrollback()Roll back changes to this object, and all objects that have been updated or created in the child repository.voidsetAttribute(String key, String value) Set the value of an attribute to the given valuevoidsetAttributes(Map attributeMap) Set a number of attributes - names and values are given in the mapprotected voidsetCompatibility(com.sas.util.UsageVersion oldestVersion, com.sas.util.UsageVersion currentVersion) protected voidsetDefaultLocalizableProperties(com.sas.storage.editableproperties.PropertyMap map) voidMark this object deleted.voidsetDescription(String description) Set the object description.voidsetDocuments(List docs) Set the list of Documents associated with this object.voidsetExtensions(List extensionList) Set the list of extensions on this metadata object.voidsetGroups(List groups) Set the list of groups this object belongs to.voidsetGUID(String guid) Set the GUID string for this object.voidsetKeywords(List keywords) Set the keyword collection on this object.voidsetName(String name) Set the name of the object.voidsetNoteTextStores(List<TextStoreInterface> notes) Set the list of TextStores associated as Notes for this object.voidsetObjectProperties(List propertyList) Set the collection of Properties associated with this object.voidsetPermission(IdentityInterface identity, PermissionInterface permission) Set a new permission on this metadata object.voidSet this object's primary property group object.voidsetPrompt(BaseOMRPromptInterface prompt) Set the prompt on this object.voidsetPrompts(List prompts) Set the List of Prompts on this object.voidsetRemarksList(List remarks) Sets the list of Remarks objects that represent the dicussion threads related to this object.voidsetRepository(RepositoryInterface repository) Set the repository that this item exists in.static voidsetTreeRefresh(long interval) Set the interval for keeping the parent tree information before forcing a trip to the server to refresh it.voidsetUsingPrototype(MetadataInterface prototype) Set the prototype which is used by this object for description/validation.Start a Transaction for this Metadata object.byte[]Write the state of the object to a byte array.StringtoString()voidNotify this object that a child transaction has completed either because of a commit or a rollback.voidCheck out the itemvoidupdate()Persist any changes to the object back to the repository.voidupdateFromBag(PropertyBagInterface propertyBag) protected voidvalidateNameAndFolder(FolderInterface targetFolder) protected voidvalidateNameAndFolder(FolderInterface targetFolder, MetadataNameConstraint constraint) voidversion()Version control the itemMethods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObjectMethods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLogMethods inherited from class java.rmi.server.RemoteObject
equals, getRef, toStubMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
REPOSITORY_NONE
public static final int REPOSITORY_NONENo repository type has been set. Probably the object is uninitialized.- See Also:
-
REPOSITORY_OMR
public static final int REPOSITORY_OMRThe object is from an OMI Repository.- See Also:
-
REPOSITORY_DAV
public static final int REPOSITORY_DAVThe object is from a DAV Repository.- See Also:
-
REPOSITORY_LOMR
public static final int REPOSITORY_LOMRThe object is from OMI, using local jOMA- See Also:
-
formats
public static final SimpleDateFormat[] formatsDate formats using for Date parsing. -
gmtZone
protected static final TimeZone gmtZoneGMT timezone. -
OMSOBJ_STRING
protected static final String OMSOBJ_STRING- See Also:
-
SLASH
protected static final String SLASH- See Also:
-
_repositoryFlag
protected int _repositoryFlag -
_repositoryObject
protected Object _repositoryObject -
_repository
-
_children
protected ArrayList _children -
_treeRefreshTime
protected long _treeRefreshTime -
_myRefreshInterval
protected long _myRefreshInterval -
_omrCreateDate
protected Date _omrCreateDate -
_omrModifyDate
protected Date _omrModifyDate -
_myState
protected int _myState -
_isDestroyPending
protected boolean _isDestroyPending -
_actionInterfaces
protected Map _actionInterfaces -
_isCompatible
protected boolean _isCompatible -
_isReadCompatible
protected boolean _isReadCompatible
-
-
Constructor Details
-
Metadata
protected Metadata(Class theClass) throws RemoteException Constructs an instance using the specified class to determine appropriate RMI socket factories.- Parameters:
theClass- Class which will be used to determine the appropriate RMI socket factories.- Throws:
RemoteException- if unable to export the remote object.
-
Metadata
public Metadata() throws RemoteExceptionDefault constructor. There's no entity or repository. This isn't an interesting object yet.- Throws:
RemoteException- if unable to export the remote object.
-
Metadata
protected Metadata(Object o, Class theClass) throws RemoteException Construct a new Metadata object with Object o. Figure out what kind of repository it came from to set the the repository flag.Use this constructor if you want to determine RMI socket factories using the subclass's class instead of this object's class. Use
Metadata(Object)if you want to employ RMI socket factories based on this class instead of the subclass's class.- Parameters:
o- The object used to initialize this object.theClass- The subclass's class which will be used to determine appropriate RMI socket factories.- Throws:
RemoteException- if unable to export a remote object.
-
Metadata
public Metadata(Object o) throws RemoteException Construct a new Metadata object with Object o. Figure out what kind of repository it came from to set the the repository flag.Use this constructor if you want to determine RMI socket factories using this object's class instead of the subsclass's class. Use
Metadata(Object, Class)if you want to employ RMI socket factories based on the subclass instead of this class.- Parameters:
o- The object used to initialize this object.- Throws:
RemoteException- in the event of remote object failure.
-
-
Method Details
-
setTreeRefresh
public static void setTreeRefresh(long interval) Set the interval for keeping the parent tree information before forcing a trip to the server to refresh it.- Parameters:
interval- The interval in milliseconds to keep the cached tree information
-
getTreeRefresh
public static long getTreeRefresh()Get the interval for keeping the parent tree information before forcing a trip to the server to refresh it.- Returns:
- The interval in milliseconds to keep the cached tree information.
-
getInformationService
Get an instance of the Information Service.- Returns:
- An InformationService instance.
- Throws:
ServiceException- in the event of a discovery error.
-
clearInformationService
public static void clearInformationService() -
getState
public int getState() throws RemoteExceptionGet the state of this metadata object.- Specified by:
getStatein interfaceMetadataInterface- Returns:
- An int represtenting the state of this object. Will be one of the MetadataInterface.METADATA_STATE_* statics.
- Throws:
RemoteException- in the event of remote object failure.
-
isDeleted
public boolean isDeleted() throws RemoteExceptionDescription copied from interface:MetadataInterfaceReturns true if the delete method has been called on this object.- Specified by:
isDeletedin interfaceMetadataInterface- Returns:
- True if delete has been called, false otherwise.
- Throws:
RemoteException
-
setDeleted
public void setDeleted() throws RemoteExceptionDescription copied from interface:MetadataInterfaceMark this object deleted. This gets done automatically if delete is called through the MetadataInterface, but if the object is deleted through some other mechanism, this will indicate that the smart object is no longer usable. Clients should generally not use this method. It doesn't actually delete the object. Use the delete method for that.- Specified by:
setDeletedin interfaceMetadataInterface- Throws:
RemoteException- In the event of remote object failure.
-
isDestroyed
public boolean isDestroyed() throws RemoteExceptionDescription copied from interface:MetadataInterfaceReturns true if the backing connection, or infrastructure has been closed, rendering this object unusable.- Specified by:
isDestroyedin interfaceMetadataInterface- Returns:
- True if the object has been destroyed.
- Throws:
RemoteException
-
destroy
public void destroy() throws RemoteExceptionDescription copied from interface:MetadataInterfaceDestroy this object, clearing any object references, freeing any resources in use, and rendering it unusable for future use.- Specified by:
destroyin interfaceMetadataInterface- Throws:
RemoteException
-
getLockedBy
Description copied from interface:MetadataInterfaceGet the value of the LockedBy attribute for a metadata object. This represents the user who has checked an object out. If the object is not checked out, this will return an empty string.- Specified by:
getLockedByin interfaceMetadataInterface- Returns:
- The user with the object checked out, or "".
- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
getName
public String getName() throws RemoteExceptionGets the name of the object.- Specified by:
getNamein interfacePublicObjectInterface- Returns:
- The name String for the object.
- Throws:
RemoteException- in the event of remote object failure.
-
setName
public void setName(String name) throws RemoteException Set the name of the object.- Specified by:
setNamein interfaceMetadataInterface- Parameters:
name- The name of the object in the repository.- Throws:
RuntimeException- If a rename would cause a naming collision in the parent folder.RemoteException- in the event of remote object failure.
-
getDescription
public String getDescription() throws RemoteExceptionGet the object description.- Specified by:
getDescriptionin interfaceMetadataInterface- Returns:
- The object description String.
- Throws:
RemoteException- in the event of remote object failure.
-
setDescription
public void setDescription(String description) throws RemoteException Set the object description.- Specified by:
setDescriptionin interfaceMetadataInterface- Parameters:
description- The description String for the object.- Throws:
RemoteException- in the event of remote object failure.
-
getGUID
public String getGUID() throws RemoteExceptionGet a string representing a unique Identifier for this object.- Specified by:
getGUIDin interfaceMetadataInterface- Returns:
- A unique identifier string for this object, or null if none was set.
- Throws:
RemoteException- in the event of remote object failure.
-
setGUID
public void setGUID(String guid) throws RemoteException, IllegalStateException Set the GUID string for this object.- Specified by:
setGUIDin interfaceMetadataInterface- Parameters:
guid- The guid string for this object.- Throws:
RemoteException- in the event of remote object failure.IllegalStateException- if the object already has an assigned GUID.
-
getReposId
public String getReposId() throws RemoteExceptionGet the repository identifier for this object. The repository ID uniquely identifies the object within the repository.- Specified by:
getReposIdin interfaceMetadataInterface- Returns:
- A String with the repository identifier.
- Throws:
RemoteException- in the event of remote object failure.
-
getRepositoryName
public String getRepositoryName() throws RemoteExceptionDescription copied from interface:MetadataInterfaceGet the repository name that this object resides in. If this is an OMR object, it returns the repository name, otherwise it returns the repository's Information Service configured name.- Specified by:
getRepositoryNamein interfaceMetadataInterface- Returns:
- The repository name.
- Throws:
RemoteException- In the event of remote object failure.
-
getReposKey
Get a String that can be passed directly to a RepositoryInterface.fetch method. This string will have the repository ID plus the type (separated by a "/").- Specified by:
getReposKeyin interfaceMetadataInterface- Returns:
- A String with the repository ID and type that can be passed to the fetch method.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getType
public String getType() throws RemoteExceptionGet the object type. Subclasses of Metadata will return a repository-neutral type string. If no subclass exists, Metadata returns the repository-specific type.- Specified by:
getTypein interfaceMetadataInterface- Returns:
- A type string for the object.
- Throws:
RemoteException- in the event of remote object failure
-
add
Add a new metadata item to the repository.- Specified by:
addin interfaceMetadataInterface- Throws:
ServiceException- If there's a repository error.RemoteException- in the event of a network error.
-
update
Persist any changes to the object back to the repository. This is not done automatically in most cases. Any change to metadata requires an update call to write it to the back end server.- Specified by:
updatein interfaceMetadataInterface- Throws:
ServiceException- if an error occurs in the repository.RemoteException- in the event of remote object failure
-
reset
- Throws:
ServiceExceptionRemoteException
-
refresh
Refresh the data for this object from the repository.- Specified by:
refreshin interfaceMetadataInterface- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
delete
Delete this object from its repository. This may be overridden by subclasses to perform clean up operations on other objects that may be dependent on this one.- Specified by:
deletein interfaceMetadataInterface- Throws:
ServiceException- in the event of a repository failure.RemoteException- in the event of a network failure.
-
deleteRootObject
protected void deleteRootObject(com.sas.metadata.remote.Root object) throws ServiceException, RemoteException - Throws:
ServiceExceptionRemoteException
-
getTrackingId
public final int getTrackingId() throws RemoteExceptionDeprecated.Tracking ids are no longer supported.Get the tracking ID for this object. This is generated on a per-JVM basis, and incremented for every MetadataInterface object that gets instantiated.- Specified by:
getTrackingIdin interfaceMetadataInterface- Returns:
- The tracking ID.
- Throws:
RemoteException- in the event of remote object failure
-
getRepositoryEntity
public final Object getRepositoryEntity() throws RemoteExceptionGet the object that was returned directly from the repository. In the case of OMR data, this will be a CMetadata subclass.- Specified by:
getRepositoryEntityin interfaceMetadataInterface- Returns:
- The repository-specific object.
- Throws:
RemoteException- in the event of remote object failure
-
getEntityKey
Get the entity key for this item. The key should have sufficient information to look up the object again at a later time.- Specified by:
getEntityKeyin interfaceMetadataInterface- Returns:
- The entity key.
- Throws:
IllegalStateException- If the repository hasn't been set on this object.ServiceException- If an error occurs getting the repository URL.RemoteException- in the event of remote object failure
-
getEntityURL
Get a "standard" URL for a metadata object. The entity key, while in a URL-ish format, has some extra stuff on it. This method returns a string that can be passed as-is to the Information Service fetchEntityByURL method.- Specified by:
getEntityURLin interfaceMetadataInterface- Returns:
- A URL string representing this metadata object.
- Throws:
ServiceException- In the event of a service failure.RemoteException- In the event of remote object failure.
-
getPathUrl
Get the SBIP URL. This is an object that contains the repository name, the path from a root to the object, the object's name and the object's type. In the SAS Metadata Server, an object is in a rooted Tree if it has a path to a Tree that's associated to a SoftwareComponent with a ClassIdentifier of "E5F27790-2149-11D6-8828-AA0004006D06", and a name of "BIP Service".- Specified by:
getPathUrlin interfacePublicObjectInterface- Returns:
- a
PathUrlvalue with the object's location in a rooted tree. If the object isn't in a rooted tree, null is returned. - Throws:
IllegalStateException- if the repository was never set on this object.ServiceException- if a repository error occurs.RemoteException- if a remote object error occurs.
-
getPathUrl
public PathUrl getPathUrl(String rootTreeName) throws IllegalStateException, ServiceException, RemoteException Get the SBIP URL. This is an object that contains the repository name, the path from a root to the object, the object's name and the object's type. In the SAS Metadata Server, an object is in a rooted Tree if it has a path to a Tree that's associated to a SoftwareComponent with a ClassIdentifier of "E5F27790-2149-11D6-8828-AA0004006D06", and a name of "BIP Service". This method looks for a path to a specific root folder.- Parameters:
rootTreeName- The name of the tree rooted at the BIP SoftwareComponent.- Returns:
- a
PathUrlvalue with the object's location in the rooted tree. If the object isn't in a tree with the given name, rooted at the BIP SoftwareComponent, null is returned. - Throws:
IllegalStateException- if the repository was never set on this object.ServiceException- if a repository error occurs.RemoteException- if a remote object error occurs.
-
setRepository
public void setRepository(RepositoryInterface repository) throws IllegalStateException, RemoteException Set the repository that this item exists in.- Specified by:
setRepositoryin interfaceMetadataInterface- Parameters:
repository- A handle to the repository for this object.- Throws:
IllegalStateException- If the repository has already been set.RemoteException- in the event of remote object failure
-
getRepository
Get the handle to the repository for this object.- Specified by:
getRepositoryin interfaceMetadataInterface- Returns:
- A handle to the repository this item exists in.
- Throws:
RemoteException- in the event of remote object failure
-
getKeywords
public List getKeywords() throws RemoteExceptionGet a list of keywords associated with this object.- Specified by:
getKeywordsin interfaceMetadataInterface- Returns:
- A List of String keywords.
- Throws:
RemoteException- in the event of remote object failure.
-
addKeyword
Add a keyword to this object.- Specified by:
addKeywordin interfaceMetadataInterface- Parameters:
keyword- a newStringto add as a keyword.- Throws:
ServiceException- if an error occurs in the repository.RemoteException- in the event of remote object failure
-
removeKeyword
public void removeKeyword(String keyword) throws RemoteException Remove a keyword from this object.- Specified by:
removeKeywordin interfaceMetadataInterface- Parameters:
keyword- The keyword to remove.- Throws:
RemoteException- in the event of remote object failure
-
setKeywords
Set the keyword collection on this object.- Specified by:
setKeywordsin interfaceMetadataInterface- Parameters:
keywords- The list of keywords to set on this object.- Throws:
ServiceException- In the event of repository failure.RemoteException- In the event of network failure.
-
getObjectProperties
Description copied from interface:MetadataInterfaceGet the Property objects associated with this metadata object. This method only returns the properties that are directly associated with this object, not through PropertySets or PropertGroups.- Specified by:
getObjectPropertiesin interfaceMetadataInterface- Returns:
- A List of PropertyInterface objects. If there are no properties associated with this object, an empty list will be returned.
- Throws:
ServiceException- In the event of repository errors.RemoteException- In the event of remote object failure.
-
addObjectProperty
Description copied from interface:MetadataInterfaceAdd a property to this object.- Specified by:
addObjectPropertyin interfaceMetadataInterface- Parameters:
property- The Property to add.- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
addObjectProperty
public void addObjectProperty(String name, String propertyName, String value, String type) throws ServiceException, RemoteException Description copied from interface:MetadataInterfaceAdd a new property to this metadata object. The new property metadata is created and associated to this metadata object.- Specified by:
addObjectPropertyin interfaceMetadataInterface- Parameters:
name- The name of the property object.propertyName- The PropertyName attribute of the property.value- The DefaultValue attribute of the property.type- The Type fromISDefs. This should be one of: PROPERTYTYPE_BOOLEAN, PROPERTYTYPE_INTEGER, PROPERTYTYPE_STRING, PROPERTYTYPE_MULTILINE, PROPERTYTYPE_FLOAT, PROPERTYTYPE_DATE, PROPERTYTYPE_COLOR, PROPERTYTYPE_FILENAME, PROPERTYTYPE_GENERIC.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
removeObjectProperty
public void removeObjectProperty(PropertyInterface property) throws ServiceException, RemoteException Description copied from interface:MetadataInterfaceRemove a Property from this object.- Specified by:
removeObjectPropertyin interfaceMetadataInterface- Parameters:
property- The Property to remove.- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
setObjectProperties
Set the collection of Properties associated with this object. Any properties currently associated with this object that aren't in the list will be deleted if they would be orphaned.- Specified by:
setObjectPropertiesin interfaceMetadataInterface- Parameters:
propertyList- The new List of Properties to associate with this object.- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
getPropertySets
Description copied from interface:MetadataInterfaceGet a List of the property sets that are associated with this object.- Specified by:
getPropertySetsin interfaceMetadataInterface- Returns:
- A List of PropertySetInterface objects. If no property sets are associated with this object, an empty list is returned.
- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
addPropertySet
public void addPropertySet(PropertySetInterface propertySet) throws ServiceException, RemoteException Description copied from interface:MetadataInterfaceAdd a property set to this object.- Specified by:
addPropertySetin interfaceMetadataInterface- Parameters:
propertySet- A PropertySetInterface to associate with this object.- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
removePropertySet
public void removePropertySet(PropertySetInterface propertySet) throws ServiceException, RemoteException Description copied from interface:MetadataInterfaceRemove a property set from this object.- Specified by:
removePropertySetin interfaceMetadataInterface- Parameters:
propertySet- The PropertySet to remote from this object.- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
getPath
Get the path of this object from the root folder, including the object name. Clients should consider using the getPathUrl method to get path information.- Specified by:
getPathin interfaceMetadataInterface- Parameters:
rootFolderName- The name of the root folder for the path. If null is passed in, the default BIP Tree name is used.- Returns:
- A String path or null if no valid path exists from the specified root folder to the current object.
- Throws:
ServiceException- in the event of repository failure.RemoteException- in the event of remote object failure.
-
getParentPath
Get the parent path for this object. It includes the path from the root tree object to the folder that contains this object. The object name itself isn't included. Clients should consider using the getPathUrl method to get path information.- Specified by:
getParentPathin interfaceMetadataInterface- Parameters:
rootFolderName- Name of the root folder for the path. If null is passed in, the default BIP tree name is used.- Returns:
- A string path or null if no valid path exists from the specified root folder to the current object.
- Throws:
ServiceException- in the event of repository errors.RemoteException- in the event of remote object failure.
-
getPaths
Deprecated.This method goes back to when there was not a single, canonical root in the metadata. Now that there is, there can only be one path. And since it had a guaranteed NPE for metadata objects I'm pretty sure no one is using it, so don't start.Get all valid paths for this object.- Specified by:
getPathsin interfaceMetadataInterface- Parameters:
rootFolderName- Name of the root folder for the path.- Returns:
- A List of String paths or null if no valid path exists from the specified root folder to the current object.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
newServiceObject
For objects that support it, get an "active" interface for the metadata object. For instance, com.sas.services.information.metadata.StoredProcess returns a com.sas.services.storedProcess.StoredProcess object.- Specified by:
newServiceObjectin interfaceMetadataInterface- Returns:
- The "active" object for this metadata.
- Throws:
ServiceException- if an error occursRemoteException- in the event of remote object failure
-
getParents
Return a List of Folder objects that represent the parent(s) of this object in the hierarchy.- Specified by:
getParentsin interfaceMetadataInterface- Returns:
- a
Listvalue - Throws:
ServiceException- if an error occursRemoteException- in the event of remote object failure
-
getParent
Description copied from interface:MetadataInterfaceReturn the FolderInterface that contains this object. For objects in the SAS Folder hierarchy, there should be exactly one parent folder.- Specified by:
getParentin interfaceMetadataInterface- Returns:
- The FolderInterface that contains this object as a member.
- Throws:
ServiceException- if an error occursRemoteException- if an error occurs
-
getCreateDate
Get a Date object representing the time the metadata was created.- Specified by:
getCreateDatein interfaceMetadataInterface- Returns:
- a Date with the date/time the metadata was created.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getCreatedBy
Description copied from interface:MetadataInterfaceGets the name of the user that created the object.- Specified by:
getCreatedByin interfaceMetadataInterface- Returns:
- created by name
- Throws:
ServiceExceptionRemoteException
-
getModifyDate
Get a Date object representing the time the metadata was last updated.- Specified by:
getModifyDatein interfaceMetadataInterface- Returns:
- a Date with the time the metadata was last updated.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getModifiedBy
Description copied from interface:MetadataInterfaceGets the name of the user that modified the object.- Specified by:
getModifiedByin interfaceMetadataInterface- Returns:
- modified by name
- Throws:
ServiceExceptionRemoteException
-
getRemarksList
Return a List of Remarks objects that represent the dicussion threads related to this object.- Specified by:
getRemarksListin interfaceMetadataInterface- Returns:
- List of Remarks. The discussion threads related to this object
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
setRemarksList
Sets the list of Remarks objects that represent the dicussion threads related to this object.- Specified by:
setRemarksListin interfaceMetadataInterface- Parameters:
remarks- The discussion threads related to this object- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getPermission
public PermissionInterface getPermission(IdentityInterface identity, PermissionInterface permission) throws ServiceException, RemoteException Get a permission that matches the requested permission for the requested identity on this metadata object. If none exists, return null.- Specified by:
getPermissionin interfaceMetadataInterface- Parameters:
identity- An IdentityInterface for the identity to find the permission for.permission- The permission to look for.- Returns:
- A matching Permission, or null if none was found.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
setPermission
public void setPermission(IdentityInterface identity, PermissionInterface permission) throws ServiceException, RemoteException Set a new permission on this metadata object.- Specified by:
setPermissionin interfaceMetadataInterface- Parameters:
identity- An IdentityInterface for the identity for the new permission.permission- The new permission to add.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getPermissions
Get all the permissions that apply to this object.- Specified by:
getPermissionsin interfaceMetadataInterface- Parameters:
identity- The identity to get permissions for.- Returns:
- a List of com.sas.services.security.Permission objects that apply to this object.
- Throws:
ServiceException- in the event of repository error.RemoteException- in the event of remote object failure.
-
getPermissions
public List getPermissions(IdentityInterface identity, String[] inheritedPermissions) throws ServiceException, RemoteException Get all the permissions that apply to this object.- Specified by:
getPermissionsin interfaceMetadataInterface- Parameters:
identity- The identity to get permissions for.inheritedPermissions- An array of Strings containing the inherited permissions to look for.- Returns:
- a List of com.sas.services.security.Permission objects that apply to this object.
- Throws:
ServiceException- in the event of repository error.RemoteException- in the event of remote object failure.
-
getIdentities
Get all the identities that are associated to this metadata object through permissions.- Specified by:
getIdentitiesin interfaceMetadataInterface- Returns:
- a List of IdentityInterface objects that have some permission defined for this object.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
addPermissions
public void addPermissions(List identities, List permissions) throws ServiceException, RemoteException Add a set of permissions for a set of identities for this metadata object. All the identities in the List will get all the permissions provided.- Specified by:
addPermissionsin interfaceMetadataInterface- Parameters:
identities- A List of IdentityInterface objects for whom to set the provided permissions.permissions- a List of com.sas.services.security.Permission objects that specify the permissions to set for these identities.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
removePermissions
public void removePermissions(List identities, List permissions) throws ServiceException, RemoteException Remove permissions matching the identities and permission list.- Specified by:
removePermissionsin interfaceMetadataInterface- Parameters:
identities- A List of com.sas.services.information.metadata.IdentityInterface objects for whom to remove the permissions.permissions- A List of com.sas.services.security.PermissionInterface objects to remove for the identities.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getAccessControls
Get a list of the Access Controls on this object.- Specified by:
getAccessControlsin interfaceMetadataInterface- Returns:
- A List of AccessControlEntryInterface objects.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
addAccessControl
public void addAccessControl(AccessControlEntryInterface ace) throws ServiceException, RemoteException Add an Access Control item to this object.- Specified by:
addAccessControlin interfaceMetadataInterface- Parameters:
ace- An AccessControlInterface object to add to this object.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
removeAccessControl
public void removeAccessControl(AccessControlEntryInterface ace) throws ServiceException, RemoteException Remove an Access Control item from this object.- Specified by:
removeAccessControlin interfaceMetadataInterface- Parameters:
ace- An AccessControl object to remove from this object.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
moveTo
Move this object to a new folder. Any current parent folders will be removed, and replaced with the one provided. If folder is null, no action will be taken.- Specified by:
moveToin interfaceMetadataInterface- Parameters:
folder- The new parent Folder of this object.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
copyTo
public MetadataInterface copyTo(FolderInterface folder, String name) throws ServiceException, RemoteException Make a copy of this object. A new object will be created with all attributes, and keywords copied from the original. The new object's name will be set from the name argument. If the folder is null, if this object has only one parent, the new object will have the same parent Folder. If it has no parent, or more than one, the new object will not have a parent.- Specified by:
copyToin interfaceMetadataInterface- Parameters:
folder- The folder to be the parent of the new object.name- The name of the new object.- Returns:
- The new copy of this object.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getExtensions
Get the extensions for this object.- Specified by:
getExtensionsin interfaceMetadataInterface- Returns:
- a List of
ExtensionInterfaceobjects. - Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
addExtension
public void addExtension(String name, String value, String type) throws ServiceException, RemoteException Add an extension to the current set of extensions- Specified by:
addExtensionin interfaceMetadataInterface- Parameters:
name- The new extension name.value- The new extension value.type- The new extension value type.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
removeExtension
Remove an Extension from the current extension set.- Specified by:
removeExtensionin interfaceMetadataInterface- Parameters:
name- The name of the extension to remove.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
setExtensions
Set the list of extensions on this metadata object. All existing extensions are deleted, and the new set is added.- Specified by:
setExtensionsin interfaceMetadataInterface- Parameters:
extensionList- A List ofExtensionInterfaceobjects. The order of creation needs to be create all of the Extensions, then call this method, then call update.- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
isAuthorized
Check for a specific permission on this object by the user that owns the connection to the repository.- Specified by:
isAuthorizedin interfaceMetadataInterface- Parameters:
permission- The permission string to check for.- Returns:
- true if the permission is granted by the server, false otherwise.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
countAssociatedObjects
Description copied from interface:MetadataInterfaceCount the objects associated to this one via a named association. This count is done without security checks on.- Specified by:
countAssociatedObjectsin interfaceMetadataInterface- Parameters:
association- The association name to count.- Returns:
- The count of objects in the association.
- Throws:
ServiceExceptionRemoteException
-
startTransaction
Start a Transaction for this Metadata object. This will create a child repository to the current repository, move a copy of this object to the child, and return the new MetadataInterface object. This new object can be updated without changing the current cache. The updates can be committed, or rolled back.- Specified by:
startTransactionin interfaceMetadataInterface- Returns:
- a new MetadataInterface object that exists in the temporary child repository.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
commit
Commit changes that have been made to this object to the parent. This will update the parent cache and disable the child repository that this object is using. If this object isn't in a child repository, a ServiceException will be thrown. If an exception is thrown during the commit, you must perform a rollback to close the transaction.- Specified by:
commitin interfaceMetadataInterface- Throws:
ServiceException- if a repository error occurs. If a ServiceException is thrown, you must perform a rollback to close the transaction.RemoteException- in the event of remote object failure.
-
rollback
Roll back changes to this object, and all objects that have been updated or created in the child repository. This will dispose of the changes and disable the child repository. If this object isn't in a child repository, a ServiceException will be thrown.- Specified by:
rollbackin interfaceMetadataInterface- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
transactionEvent
Description copied from interface:MetadataInterfaceNotify this object that a child transaction has completed either because of a commit or a rollback.- Specified by:
transactionEventin interfaceMetadataInterface- Parameters:
mi- The child object that has completed its transaction.- Throws:
RemoteException- In the event of remote object failure.
-
addTransactionListener
Description copied from interface:MetadataInterfaceAdd a listener to receive event notifications when a transaction is committed or rolled back. This method is intended for use by the Metadata class, and should not be used by external classes.- Specified by:
addTransactionListenerin interfaceMetadataInterface- Parameters:
mi- The metadata object to alert that a transaction has committed or rolled back.- Throws:
RemoteException- In the event of remote object failure.
-
notifyTransactionListeners
protected void notifyTransactionListeners() throws RemoteException- Throws:
RemoteException
-
logMessage
public void logMessage(org.apache.logging.log4j.Level level, String message, String context, Throwable t) throws RemoteException - Throws:
RemoteException
-
logThrowable
public void logThrowable(org.apache.logging.log4j.Level level, String message, String context, Throwable t) throws RemoteException - Throws:
RemoteException
-
logFormat
public void logFormat(org.apache.logging.log4j.Level level, String context, ResourceBundle bundle, String key, Object arg0) throws RemoteException - Throws:
RemoteException
-
logFormat
public void logFormat(org.apache.logging.log4j.Level level, String context, ResourceBundle bundle, String key, Object arg0, Object arg1) throws RemoteException - Throws:
RemoteException
-
logFormat
public void logFormat(org.apache.logging.log4j.Level level, String context, ResourceBundle bundle, String key, Object arg0, Object arg1, Object arg2) throws RemoteException - Throws:
RemoteException
-
logFormat
public void logFormat(org.apache.logging.log4j.Level level, String context, ResourceBundle bundle, String key, Object arg0, Object arg1, Object arg2, Object arg3) throws RemoteException - Throws:
RemoteException
-
logMessage
public void logMessage(org.apache.logging.log4j.Level level, String message) throws RemoteException - Throws:
RemoteException
-
addRemark
Description copied from interface:MetadataInterfaceAdd a remark to this smart object- Specified by:
addRemarkin interfaceMetadataInterface- Parameters:
remark- The remark to be added to this smart object- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
isLoggingEnabled
public boolean isLoggingEnabled(org.apache.logging.log4j.Level level, String context) throws RemoteException - Throws:
RemoteException
-
mapNameToFilesystem
public String mapNameToFilesystem(int hostOS, String prefix, String suffix) throws RemoteException, IllegalArgumentException Map the metadata object name to a file system path.- Specified by:
mapNameToFilesystemin interfaceMetadataInterface- Parameters:
hostOS- The host operating system. Valid values includeNames.UNKNOWN,Names.WINDOWS,Names.UNIX,Names.ZOS_HFS,Names.ZOS_PDSandNames.WEBDAV.prefix- The prefix to use when creating the file system path.suffix- The suffix to use when creating the file system path.- Returns:
StringThe file system path.- Throws:
RemoteException- In the event of remote object failure.IllegalArgumentException- If anullname is specified or if an invalid host operating system value is specified.
-
mapUrlToFilesystem
public String mapUrlToFilesystem(int hostOS, String prefix, String suffix) throws ServiceException, RemoteException, IllegalArgumentException Map the metadata object's SBIP Url to a file system path.- Specified by:
mapUrlToFilesystemin interfaceMetadataInterface- Parameters:
hostOS- The host operating system. Valid values includeNames.UNKNOWN,Names.WINDOWS,Names.UNIX,Names.ZOS_HFS,Names.ZOS_PDSandNames.WEBDAV.prefix- The prefix to use when creating the file system path.suffix- The suffix to use when creating the file system path.- Returns:
StringThe file system path.- Throws:
ServiceException- if a repository error occurs.RemoteException- In the event of remote object failure.IllegalArgumentException- If anullname is specified or if an invalid host operating system value is specified.
-
getPropertyBag
Description copied from interface:MetadataInterfaceGet a "bag" of properties from the metadata object. A Map contains the attributes applicable to the metadata object. The default implementation is to load the map with the default simple attributes. All the values are String objects. Subclasses may override this and return complex objects.- Specified by:
getPropertyBagin interfaceMetadataInterface- Returns:
- A Map of attributes for this object.
- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
updateFromBag
public void updateFromBag(PropertyBagInterface propertyBag) throws ServiceException, RemoteException - Specified by:
updateFromBagin interfaceMetadataInterface- Throws:
ServiceExceptionRemoteException
-
addToList
protected void addToList(List list, Object o) -
removeFromList
protected void removeFromList(List list, Object o) -
toString
public String toString()- Overrides:
toStringin classRemoteObject
-
hashCode
public int hashCode()- Overrides:
hashCodein classRemoteObject
-
checkPulse
protected void checkPulse(boolean dieOnDeleted) throws IllegalStateException Check the state of this object instance. If it's been destroyed, throw an IllegalStateException which will get surfaced to the client application and hopefully handled.- Parameters:
dieOnDeleted- Throw IllegalStateException if the object has been deleted.- Throws:
IllegalStateException- if the instance has been destroyed.
-
getAttribute
Get the value of the attribute with the given key/name.- Specified by:
getAttributein interfaceMetadataInterface- Parameters:
key- The name of the attribute to return.- Returns:
- The value of the named attribute. Null if none exists.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getAttributes
Get a list of all the attributes.- Specified by:
getAttributesin interfaceMetadataInterface- Returns:
- A Map of all the attributes of this object.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
setAttribute
Set the value of an attribute to the given value- Specified by:
setAttributein interfaceMetadataInterface- Parameters:
key- The attribute name to set.value- The value to set on the attribute.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
addAttribute
Add an attribute with the given name and value- Specified by:
addAttributein interfaceMetadataInterface- Parameters:
key- The name of the attribute to set.value- The value to set on the attribute.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
deleteAttribute
Delete a specific attribute- Specified by:
deleteAttributein interfaceMetadataInterface- Parameters:
key- The name of the attribute to delete.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
setAttributes
Set a number of attributes - names and values are given in the map- Specified by:
setAttributesin interfaceMetadataInterface- Parameters:
attributeMap- A Map of attributes to set on the object.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
addAttributes
Add a number of attributes - names and values are given in the map.- Specified by:
addAttributesin interfaceMetadataInterface- Parameters:
attributeMap- A Map of attributes to add to the object.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
deleteAttributes
Delete a list of attributes.- Specified by:
deleteAttributesin interfaceMetadataInterface- Parameters:
attributes- List (of String) property names- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
toByteArray
public byte[] toByteArray() throws RemoteExceptionDescription copied from interface:MetadataInterfaceWrite the state of the object to a byte array.- Specified by:
toByteArrayin interfaceMetadataInterface- Returns:
- The byte array containing the state of the object.
- Throws:
RemoteException- In the event of remote object failure.
-
fromByteArray
public static MetadataInterface fromByteArray(RepositoryInterface ri, byte[] data) throws RemoteException, ServiceException - Throws:
RemoteExceptionServiceException
-
version
Version control the item- Specified by:
versionin interfaceMetadataInterface- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
checkout
Check out the item- Specified by:
checkoutin interfaceMetadataInterface- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
checkin
Check out the item- Specified by:
checkinin interfaceMetadataInterface- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
uncheckout
Check out the item- Specified by:
uncheckoutin interfaceMetadataInterface- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getPreviousVersionNames
Gets a list of previous version names- Specified by:
getPreviousVersionNamesin interfaceMetadataInterface- Returns:
- List of previous version names
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getVersion
Return a smart object that represents a particular version- Specified by:
getVersionin interfaceMetadataInterface- Parameters:
versionName- The name of the version to return- Returns:
- MetadataInterface A smart object representing the requested version
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
addDocument
Description copied from interface:MetadataInterfaceAdd an associated Document to this object.- Specified by:
addDocumentin interfaceMetadataInterface- Parameters:
doc- The document to associate with this object.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
removeDocument
Description copied from interface:MetadataInterfaceRemove a document from this object's Documents association.- Specified by:
removeDocumentin interfaceMetadataInterface- Parameters:
doc- The document to remove from the Documents association.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
setDocuments
Description copied from interface:MetadataInterfaceSet the list of Documents associated with this object.- Specified by:
setDocumentsin interfaceMetadataInterface- Parameters:
docs- A List of DocumentInterface objects to associate with this object.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getDocuments
Description copied from interface:MetadataInterfaceGet the List of Documents associated with this object.- Specified by:
getDocumentsin interfaceMetadataInterface- Returns:
- A List of DocumentInterface objects.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
addNoteTextStore
Description copied from interface:MetadataInterfaceAdd an associated TextStore note to this object.- Specified by:
addNoteTextStorein interfaceMetadataInterface- Parameters:
note- The TextStore to associate with this object.- Throws:
ServiceException- If a service level error occurs or if a TextStore with the same Name and TextRole already exists on this object.RemoteException- In the event of remote object failure.
-
addNoteTextStore
public TextStoreInterface addNoteTextStore(String name, String role, String type, String text) throws ServiceException, RemoteException Description copied from interface:MetadataInterfaceCreates a TextStore note and adds it to this object.- Specified by:
addNoteTextStorein interfaceMetadataInterface- Parameters:
name- note namerole- note TextRoletype- note TextTypetext- note text- Returns:
- TextStoreInterface for new note
- Throws:
ServiceException- If a service level error occurs or if a TextStore with the same Name and TextRole already exists on this object.RemoteException- In the event of remote object failure.
-
removeNoteTextStore
Description copied from interface:MetadataInterfaceRemove a TextStore note from this object's Notes association.- Specified by:
removeNoteTextStorein interfaceMetadataInterface- Parameters:
note- The TextStore to remove from the Notes association.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
setNoteTextStores
public void setNoteTextStores(List<TextStoreInterface> notes) throws ServiceException, RemoteException Description copied from interface:MetadataInterfaceSet the list of TextStores associated as Notes for this object.- Specified by:
setNoteTextStoresin interfaceMetadataInterface- Parameters:
notes- A List of TextStoreInterface objects to associate with this object.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getNoteTextStores
Description copied from interface:MetadataInterfaceGet the List of TextStore notes associated with this object.- Specified by:
getNoteTextStoresin interfaceMetadataInterface- Returns:
- A List of TextStoreInterface objects.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getNoteTextStoresByRole
public List<TextStoreInterface> getNoteTextStoresByRole(String textRoleFilter) throws ServiceException, RemoteException Description copied from interface:MetadataInterfaceReturn a list of TextStore notes associated with this object filtered by TextRole.- Specified by:
getNoteTextStoresByRolein interfaceMetadataInterface- Parameters:
textRoleFilter- returned TextStore notes must have the specified TextRole attribute.- Returns:
- A list of TextStoreInterface objects.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getNoteTextStore
public TextStoreInterface getNoteTextStore(String name, String textRole) throws ServiceException, RemoteException Description copied from interface:MetadataInterfaceReturn a named TextStore note associated with this object or null if the TextStore does not exist. The first matched TextStore is returned if more than one matching TextStore is found.- Specified by:
getNoteTextStorein interfaceMetadataInterface- Parameters:
name- name of the TextStore note.textRole- TextRole attribute of the named TextStore note. May be null if the TextRole value is not known.- Returns:
- named TextStore note
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
addGroup
Description copied from interface:MetadataInterfaceAdd this object to a group.- Specified by:
addGroupin interfaceMetadataInterface- Parameters:
group- The group to add this object to.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
removeGroup
Description copied from interface:MetadataInterfaceRemove this object from a group.- Specified by:
removeGroupin interfaceMetadataInterface- Parameters:
group- The group to remove this object from.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
setGroups
Description copied from interface:MetadataInterfaceSet the list of groups this object belongs to.- Specified by:
setGroupsin interfaceMetadataInterface- Parameters:
groups- The set of groups this object belongs to. Upon successful completion, this object will be a member of the listed groups, and no others. If this list is empty, or null, the object will be removed from all groups.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getGroups
Description copied from interface:MetadataInterfaceGet the list of groups this object is a member of.- Specified by:
getGroupsin interfaceMetadataInterface- Returns:
- The List of GroupInterface objects this object is a member of.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getPrimaryPropertyGroup
Description copied from interface:MetadataInterfaceGet this object's primary PropertyGroup object.- Specified by:
getPrimaryPropertyGroupin interfaceMetadataInterface- Returns:
- A
PropertyGroupInterfaceobject; this object's primary property group. - Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
setPrimaryPropertyGroup
public void setPrimaryPropertyGroup(PropertyGroupInterface pgroup) throws ServiceException, RemoteException Description copied from interface:MetadataInterfaceSet this object's primary property group object.- Specified by:
setPrimaryPropertyGroupin interfaceMetadataInterface- Parameters:
pgroup- ThePropertyGroupInterfaceobject which is this object's primary property group.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getImplementors
Get a List of the SoftwareComponent Implementors for this object.- Specified by:
getImplementorsin interfaceMetadataInterface- Returns:
- A List of
SoftwareComponentInterfaceobjects associated to this object as Implementors. - Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
addImplementor
public void addImplementor(SoftwareComponentInterface softwareComponent) throws ServiceException, RemoteException Add a SoftwareComponent as an implementor of this object.- Specified by:
addImplementorin interfaceMetadataInterface- Parameters:
softwareComponent- The SoftwareComponent implementor.- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
removeImplementor
public void removeImplementor(SoftwareComponentInterface softwareComponent) throws ServiceException, RemoteException Remove a SoftwareComponent from the list of implementors on this object.- Specified by:
removeImplementorin interfaceMetadataInterface- Parameters:
softwareComponent- TheSoftwareComponentInterfaceto remove from the implementors list.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
getUsingPrototype
Get the prototype which this object uses for description/validation.- Specified by:
getUsingPrototypein interfaceMetadataInterface- Returns:
- A
PrototypeInterfaceobject which this object uses for its definition. - Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
setUsingPrototype
Set the prototype which is used by this object for description/validation.- Specified by:
setUsingPrototypein interfaceMetadataInterface- Parameters:
prototype- TheMetadataInterfaceobject which defines the parameters, associations, and properties appropriate to this object.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
getUsedByPrototypes
Get the List of objects which use this object as a prototype.- Specified by:
getUsedByPrototypesin interfaceMetadataInterface- Returns:
- A List of objects that use this object as a prototype.
- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
addUsedByPrototype
public void addUsedByPrototype(MetadataInterface prototyped) throws ServiceException, RemoteException Add an object which uses this object as a prototype.- Specified by:
addUsedByPrototypein interfaceMetadataInterface- Parameters:
prototyped- An object which is prototyped by this object.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
removeUsedByPrototype
public void removeUsedByPrototype(MetadataInterface prototyped) throws ServiceException, RemoteException Remove an object from the list prototyped by this object.- Specified by:
removeUsedByPrototypein interfaceMetadataInterface- Parameters:
prototyped- The object which is no longer prototyped by this object.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
getPrompts
Get the List of prompts associated with this object.- Specified by:
getPromptsin interfaceMetadataInterface- Returns:
- A List of
BaseOMRPromptInterfaceobjects associated with this object. - Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
setPrompts
Set the List of Prompts on this object.- Specified by:
setPromptsin interfaceMetadataInterface- Parameters:
prompts- A List ofBaseOMRPromptInterfaceobjects.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
addPrompt
Add a prompt to this object.- Specified by:
addPromptin interfaceMetadataInterface- Parameters:
prompt- ABaseOMRPromptInterfaceobject to add to this object.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
removePrompt
Remove a prompt from this object.- Specified by:
removePromptin interfaceMetadataInterface- Parameters:
prompt- TheBaseOMRPromptInterfaceto remove from this object.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
getPrompt
Get the first prompt on this object. If more than one prompt is associated to this object, only the first one is returned.- Specified by:
getPromptin interfaceMetadataInterface- Returns:
- The first prompt associated to this object.
- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
setPrompt
Set the prompt on this object. If there are already prompts associated with this object, they are removed and only this prompt will be associated to the object.- Specified by:
setPromptin interfaceMetadataInterface- Parameters:
prompt- The prompt object to associate to this object.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
addProcessorInterface
public void addProcessorInterface(String interfaceClassName, ProcessorInterface actionInterface) throws ServiceException Add an action interface to this class.- Specified by:
addProcessorInterfacein interfacePublicObjectInterface- Parameters:
interfaceClassName-actionInterface-- Throws:
ServiceException
-
getProcessorInterface
public ProcessorInterface getProcessorInterface(String interfaceClassName) throws ServiceException, RemoteException Get the specified action interface.- Specified by:
getProcessorInterfacein interfacePublicObjectInterface- Parameters:
interfaceClassName-- Returns:
- Processor.
- Throws:
ServiceExceptionRemoteException
-
getIdentifier
Description copied from interface:PublicObjectInterfaceGet the unique ID of this object.- Specified by:
getIdentifierin interfacePublicObjectInterface- Returns:
- String
- Throws:
ServiceExceptionRemoteException
-
getContainer
Returns the container or parent object. In most cases, this method will return the parent folder that contains this object. However, this method should be overridden by any object type that is contained by a non-folder object.- Specified by:
getContainerin interfacePublicObjectInterface- Returns:
- PublicObjectContainerInterface
- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
getTypeDescriptor
Description copied from interface:PublicObjectInterfaceGet the type descriptor which should have the information from the Type Dictionary in metadata available for the clients.- Specified by:
getTypeDescriptorin interfacePublicObjectInterface- Returns:
- TypeDescriptorInterface
- Throws:
ServiceExceptionRemoteException
-
getObjectURI
Description copied from interface:PublicObjectInterfaceThis method is currently not being implemented and is reserved for future use.Get the location of this object in the SAS Tree. This should be of the form sasds://xxx/xxx/xxx/
- Specified by:
getObjectURIin interfacePublicObjectInterface- Returns:
- java.net.URI
- Throws:
ServiceException
-
getResponsibleParties
Description copied from interface:MetadataInterfaceGet the responsible parties for this object.- Specified by:
getResponsiblePartiesin interfaceMetadataInterface- Returns:
- A List of
Responsibilityobjects representing the responsible parties for this object. - Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
addResponsibleParty
public void addResponsibleParty(Responsibility newResponsibility) throws ServiceException, RemoteException Description copied from interface:MetadataInterfaceAdd a new responsibleParty to this object.- Specified by:
addResponsiblePartyin interfaceMetadataInterface- Parameters:
newResponsibility- The new responsible party to add.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
removeResponsibleParty
public void removeResponsibleParty(Responsibility responsibility) throws ServiceException, RemoteException Description copied from interface:MetadataInterfaceRemove a responsible party from this metadata object.- Specified by:
removeResponsiblePartyin interfaceMetadataInterface- Parameters:
responsibility- The responsible party to remove.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
removeResponsiblePartyByIdentity
public void removeResponsiblePartyByIdentity(Responsibility responsibility) throws ServiceException, RemoteException Description copied from interface:MetadataInterfaceRemove a responsible party from this metadata object. The identity of the responsibility as well as the role must match a responsible party in metadata for it to be removed.- Specified by:
removeResponsiblePartyByIdentityin interfaceMetadataInterface- Parameters:
responsibility- The responsible party to remove.- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
isCompatible
public boolean isCompatible() throws RemoteExceptionDescription copied from interface:MetadataInterfaceReturn a boolean indicating if this object is fully compatible with the version of the metadata.- Specified by:
isCompatiblein interfaceMetadataInterface- Returns:
- true if the metadata and object are fully compatible, false otherwise.
- Throws:
RemoteException- In the event of remote object failure.
-
isReadCompatible
public boolean isReadCompatible() throws RemoteExceptionDescription copied from interface:MetadataInterfaceReturn a boolean indicating if this object is read compatible with the version of the metadata. Read compatibility is a subset of full compatibility. A fully compatible object is always read compatible, but a read compatible object is not always fully compatible.- Specified by:
isReadCompatiblein interfaceMetadataInterface- Returns:
- true if the metadata and object are read compatible, false otherwise.
- Throws:
RemoteException- In the event of remote object failure.
-
getUsageVersion
public com.sas.util.UsageVersion getUsageVersion() throws RemoteExceptionDescription copied from interface:MetadataInterfaceReturn the usage version of the metadata.- Specified by:
getUsageVersionin interfaceMetadataInterface- Returns:
- The metadata usage version.
- Throws:
RemoteException- In the event of remote object failure.
-
setCompatibility
protected void setCompatibility(com.sas.util.UsageVersion oldestVersion, com.sas.util.UsageVersion currentVersion) throws RemoteException - Throws:
RemoteException
-
isConnectionException
protected boolean isConnectionException(Throwable ex) -
getDefaultLocalizableProperties
protected com.sas.storage.editableproperties.PropertyList getDefaultLocalizableProperties() -
setDefaultLocalizableProperties
protected void setDefaultLocalizableProperties(com.sas.storage.editableproperties.PropertyMap map) -
isObjectAlive
Description copied from interface:MetadataInterfaceCheck to be sure the object still exists in the metadata server. This forces a trip to the server, but does not update the object in memory. If you want to refresh the object, use refresh. It only checks to see if the object is still there, but not that the user can still read it.- Specified by:
isObjectAlivein interfaceMetadataInterface- Returns:
- true if the object is found. False otherwise.
- Throws:
ServiceException- In the event of repository failure.RemoteException- In the event of remote object failure.
-
validateNameAndFolder
protected void validateNameAndFolder(FolderInterface targetFolder) throws ServiceException, RemoteException - Throws:
ServiceExceptionRemoteException
-
validateNameAndFolder
protected void validateNameAndFolder(FolderInterface targetFolder, MetadataNameConstraint constraint) throws ServiceException, RemoteException - Throws:
ServiceExceptionRemoteException
-
getAuthorizationUtil
Obtain the AuthorizationUtil Interface for this object- Specified by:
getAuthorizationUtilin interfaceMetadataInterface- Returns:
- an AuthorizationUtilInterface
- Throws:
ServiceException- If a metadata server error occurs.RemoteException- In the event of remote object failure.
-