Class Folder
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.sas.services.information.metadata.Metadata
com.sas.services.information.metadata.Folder
- All Implemented Interfaces:
FolderInterface,MetadataInterface,MutableContainerInterface,PublicObjectContainerInterface,PublicObjectInterface, com.sas.services.util.UpgradeInterface,com.sas.storage.editableproperties.LocalizableProperties,Serializable,Remote
- Direct Known Subclasses:
DavPerson,FilteredFolder,MyDocuments,MyInbox,MyResults,PersonalRepository
public class Folder
extends Metadata
implements FolderInterface, com.sas.storage.editableproperties.LocalizableProperties, Serializable, UpgradeInterface
This class implements the FolderInterface. It allows manipulation of a
folder, getting, adding, removing or deleting contents (items) or subfolders.
Client code should avoid casting to this class. Instead, cast to FolderInterface.
- Since:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final com.sas.util.UsageVersionstatic final Stringstatic final com.sas.util.UsageVersionstatic final StringDeprecated.Fields inherited from class com.sas.services.information.metadata.Metadata
_actionInterfaces, _children, _isCompatible, _isDestroyPending, _isReadCompatible, _myRefreshInterval, _myState, _omrCreateDate, _omrModifyDate, _repository, _repositoryFlag, _repositoryObject, _treeRefreshTime, formats, gmtZone, OMSOBJ_STRING, REPOSITORY_DAV, REPOSITORY_LOMR, REPOSITORY_NONE, REPOSITORY_OMR, SLASHFields inherited from class java.rmi.server.RemoteObject
refFields inherited from interface com.sas.services.information.metadata.FolderInterface
FOLDER_TYPE_BIPFields inherited from interface com.sas.storage.editableproperties.LocalizableProperties
PROPERTY_DESCRIPTION, PROPERTY_NAMEFields 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
ConstructorsModifierConstructorDescriptionFolder()Default constructor.Folder(com.sas.metadata.remote.impl.TreeImpl o) Folder(com.sas.metadata.remote.impl.TreeImpl_Stub o) Folder(com.sas.metadata.remote.Tree o) Folder(RepositoryInterface repos, String name, FolderInterface parent) Construct a new Folder metadata object using the Repository name and parent folder.protectedFolder(Class c) Folder(Object o) Construct a folder given an object to initialize with.protectedFolder(Object o, Class theClass) Construct a folder given an object to initialize with. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(PublicObjectInterface newChild) Add a child to this container.voidaddItem(MetadataInterface item) Add an item to the folder.protected voidaddItem(MetadataInterface item, int index) addNewItem(String name, String type) Create a new metadata object to add to the folder.voidaddSubfolder(FolderInterface folder) Add an existing folder to this one as a subfolder.protected voidaddSubfolder(FolderInterface folder, int index) copyTo(FolderInterface folder, String name) Make a copy of this object.voiddelete()Delete this object from its repository.voiddeleteItem(MetadataInterface item) Delete an item from this folder.voiddeleteSubfolder(String name) Delete a subfolder.getChildAt(int index) Returns a child item at the specified locationintReturns the number of children within this container.ListGet a List of the children of this container.ListgetChildren(String type) Get a list of children of a specific type.DateGet the content create date.Returns theContentInfoobject corresponding to the root of the given PathUrl.DateGet the content modification date.static longGet the interval for keeping cached subfolder information before forcing a trip to the server to refresh it.StringGet the folder type.getItem(String name) Get a named item from the folder.getItemByClass(String name, Class itemClass) Get a named item from the folder.getItemByType(String name, String metadataType) Get a named item from the folder.static longGet the interval to keep member item information before forcing a trip to the server to refresh it.ListgetItems()List all items in the folder.ListgetItemsByClass(Class itemClass) List the items in the folder that match the Class passed in as a parameter.ListgetItemsByType(String metadataType) Get a list of items in the folder of a specific type.ListgetItemSublist(int start, int end) Get a sublist of items from this folderListgetItemSublist(int start, int end, String sort) Get a sublist of items from this folder which are sorted.com.sas.storage.editableproperties.PropertyListGet parent folder.StringgetPath()Get the path string for this Folder.getPublicTypeItem(String name, String type) Find an item in this Folder with the given name and type.getSubfolder(String name) Get a named subfolder.ListGet all the folders immediately below this one in the hiearchy.intGet the total number of items in this folderStringgetType()Return a type string to identify this object.booleanbooleanbooleanhasDuplicate(String name, String type) Check if there's a duplicate object in this folder with the same name and of the same type.booleanhasDuplicateSubfolder(String name) Determines if this folder already has a subfolder with the given name.booleanhasDuplicateSubfolder(String name, FolderInterface subFolderToExclude) Determines if this folder already has a subfolder with the given name excluding the specified subfolder.voidinsertChild(PublicObjectInterface child, int index) Inserts a child into the parent container at the specified index.booleanisEmpty()Returns true if this folder has no subfolders and no member objects.booleanisItemNameUnique(MetadataInterface member) Validate that the name of the metadata object is unique within the Folder.makeSubfolder(String name) Makes a subfolder under the current folder.makeSubfolder(String name, String type) Create a new Folder with the given name of the given type and make it a new subfolder of this folder.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.booleanCheck for too many objects in a folder.voidmoveTo(FolderInterface folder) Move this object to a new folder.newChild(String type, String name) Create a new metadata object and add it to the container.ObjectFor objects that support it, get an "active" interface for the metadata object.voidrefresh()Refresh the data for this object from the repository.voidremoveChild(PublicObjectInterface child) Remove a child from this container.voidremoveItem(MetadataInterface item) Remove an item from the folder.voidremoveSubfolder(String name) Remove a subfolder from the current folder.voidsetContentCreateDate(Date date) Set the Date that the content folder was created.voidsetContentModifyDate(Date date) Set the date when an object was last added to or removed from this folder.static voidsetFolderRefresh(long interval) Set the interval for keeping cached subfolder information before forcing a trip to the server to refresh it.voidsetFolderType(String type) Set the folder type.static voidsetItemRefresh(long interval) Set the interval to keep member item information before forcing a trip to the server to refresh it.voidsetLocalizableProperties(com.sas.storage.editableproperties.PropertyMap map) voidsetName(String name) Set the name of the object.voidSet the repository that this item exists in.voidUpgrades an object from a previous version to the most current version supported.Methods inherited from class com.sas.services.information.metadata.Metadata
add, addAccessControl, addAttribute, addAttributes, addDocument, addExtension, addGroup, addImplementor, addKeyword, addNoteTextStore, addNoteTextStore, addObjectProperty, addObjectProperty, addPermissions, addProcessorInterface, addPrompt, addPropertySet, addRemark, addResponsibleParty, addToList, addTransactionListener, addUsedByPrototype, checkin, checkout, checkPulse, clearInformationService, commit, countAssociatedObjects, deleteAttribute, deleteAttributes, deleteRootObject, destroy, fromByteArray, getAccessControls, getAttribute, getAttributes, getAuthorizationUtil, getContainer, getCreateDate, getCreatedBy, getDefaultLocalizableProperties, getDescription, getDocuments, getEntityKey, getEntityURL, getExtensions, getGroups, getGUID, getIdentifier, getIdentities, getImplementors, getInformationService, getKeywords, getLockedBy, getModifiedBy, getModifyDate, getName, getNoteTextStore, getNoteTextStores, getNoteTextStoresByRole, getObjectProperties, getObjectURI, getParentPath, getParents, getPath, getPaths, getPathUrl, getPathUrl, getPermission, getPermissions, getPermissions, getPreviousVersionNames, getPrimaryPropertyGroup, getProcessorInterface, getPrompt, getPrompts, getPropertyBag, getPropertySets, getRemarksList, getReposId, getRepository, getRepositoryEntity, getRepositoryName, getReposKey, getResponsibleParties, getState, getTrackingId, getTreeRefresh, getTypeDescriptor, getUsageVersion, getUsedByPrototypes, getUsingPrototype, getVersion, hashCode, isAuthorized, isCompatible, isConnectionException, isDeleted, isDestroyed, isLoggingEnabled, isObjectAlive, isReadCompatible, logFormat, logFormat, logFormat, logFormat, logMessage, logMessage, logThrowable, notifyTransactionListeners, removeAccessControl, removeDocument, removeExtension, removeFromList, removeGroup, removeImplementor, removeKeyword, removeNoteTextStore, removeObjectProperty, removePermissions, removePrompt, removePropertySet, removeResponsibleParty, removeResponsiblePartyByIdentity, removeUsedByPrototype, reset, rollback, setAttribute, setAttributes, setCompatibility, setDefaultLocalizableProperties, setDeleted, setDescription, setDocuments, setExtensions, setGroups, setGUID, setKeywords, setNoteTextStores, setObjectProperties, setPermission, setPrimaryPropertyGroup, setPrompt, setPrompts, setRemarksList, setTreeRefresh, setUsingPrototype, startTransaction, toByteArray, toString, transactionEvent, uncheckout, update, updateFromBag, validateNameAndFolder, validateNameAndFolder, versionMethods 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, waitMethods inherited from interface com.sas.services.information.metadata.MetadataInterface
add, addAccessControl, addAttribute, addAttributes, addDocument, addExtension, addGroup, addImplementor, addKeyword, addNoteTextStore, addNoteTextStore, addObjectProperty, addObjectProperty, addPermissions, addPrompt, addPropertySet, addRemark, addResponsibleParty, addTransactionListener, addUsedByPrototype, checkin, checkout, commit, countAssociatedObjects, deleteAttribute, deleteAttributes, destroy, getAccessControls, getAttribute, getAttributes, getAuthorizationUtil, getCreateDate, getCreatedBy, getDescription, getDocuments, getEntityKey, getEntityURL, getExtensions, getGroups, getGUID, getIdentities, getImplementors, getKeywords, getLockedBy, getModifiedBy, getModifyDate, getNoteTextStore, getNoteTextStores, getNoteTextStoresByRole, getObjectProperties, getParentPath, getParents, getPath, getPaths, getPermission, getPermissions, getPermissions, getPreviousVersionNames, getPrimaryPropertyGroup, getPrompt, getPrompts, getPropertyBag, getPropertySets, getRemarksList, getReposId, getRepository, getRepositoryEntity, getRepositoryName, getReposKey, getResponsibleParties, getState, getTrackingId, getUsageVersion, getUsedByPrototypes, getUsingPrototype, getVersion, isAuthorized, isCompatible, isDeleted, isDestroyed, isObjectAlive, isReadCompatible, removeAccessControl, removeDocument, removeExtension, removeGroup, removeImplementor, removeKeyword, removeNoteTextStore, removeObjectProperty, removePermissions, removePrompt, removePropertySet, removeResponsibleParty, removeResponsiblePartyByIdentity, removeUsedByPrototype, rollback, setAttribute, setAttributes, setDeleted, setDescription, setDocuments, setExtensions, setGroups, setGUID, setKeywords, setNoteTextStores, setObjectProperties, setPermission, setPrimaryPropertyGroup, setPrompt, setPrompts, setRemarksList, setUsingPrototype, startTransaction, toByteArray, transactionEvent, uncheckout, update, updateFromBag, versionMethods inherited from interface com.sas.services.information.publicobject.PublicObjectInterface
addProcessorInterface, getContainer, getIdentifier, getName, getObjectURI, getPathUrl, getProcessorInterface, getTypeDescriptor
-
Field Details
-
REPOSITORY_CONTENT_MAPPING
@Deprecated public static final String REPOSITORY_CONTENT_MAPPINGDeprecated.- See Also:
-
CREATION_DATE
public static final String CREATION_DATE- See Also:
-
MODIFIED_DATE
public static final String MODIFIED_DATE- See Also:
-
OLDEST_VERSION
public static final com.sas.util.UsageVersion OLDEST_VERSION -
CURRENT_VERSION
public static final com.sas.util.UsageVersion CURRENT_VERSION
-
-
Constructor Details
-
Folder
public Folder() throws RemoteExceptionDefault constructor.- Throws:
RemoteException- in the event of remote object failure.
-
Folder
protected Folder(Class c) throws RemoteException - Throws:
RemoteException
-
Folder
public Folder(Object o) throws RemoteException Construct a folder given an object to initialize with.- Parameters:
o- The repository object to initialize with.- Throws:
RemoteException- in the event of remote object failure.
-
Folder
protected Folder(Object o, Class theClass) throws RemoteException Construct a folder given an object to initialize with.- Parameters:
o- The repository object to initialize with.theClass- Class which will be used to determine the appropriate RMI socket factories.- Throws:
RemoteException- in the event of remote object failure.
-
Folder
public Folder(com.sas.metadata.remote.Tree o) throws RemoteException - Throws:
RemoteException
-
Folder
public Folder(com.sas.metadata.remote.impl.TreeImpl o) throws RemoteException - Throws:
RemoteException
-
Folder
public Folder(com.sas.metadata.remote.impl.TreeImpl_Stub o) throws RemoteException - Throws:
RemoteException
-
Folder
public Folder(RepositoryInterface repos, String name, FolderInterface parent) throws RemoteException Construct a new Folder metadata object using the Repository name and parent folder.- Parameters:
repos- The Repository in which this object resides.name- The name of the new Folder.parent-- Throws:
RemoteException
-
-
Method Details
-
setFolderRefresh
public static void setFolderRefresh(long interval) Set the interval for keeping cached subfolder information before forcing a trip to the server to refresh it.- Parameters:
interval- The interval in milliseconds to keep the cached subfolder information.
-
getFolderRefresh
public static long getFolderRefresh()Get the interval for keeping cached subfolder information before forcing a trip to the server to refresh it.- Returns:
- The interval in milliseconds to keep the cached subfolder information.
-
setItemRefresh
public static void setItemRefresh(long interval) Set the interval to keep member item information before forcing a trip to the server to refresh it.- Parameters:
interval- The interval in milliseconds to keep the cached member item information.
-
getItemRefresh
public static long getItemRefresh()Get the interval to keep member item information before forcing a trip to the server to refresh it.- Returns:
- The interval in milliseconds to keep member item information.
-
getType
public String getType() throws RemoteExceptionReturn a type string to identify this object.- Specified by:
getTypein interfaceMetadataInterface- Overrides:
getTypein classMetadata- Returns:
- The type string ("Folder").
- Throws:
RemoteException- in the event of remote object failure.
-
getPath
public String getPath() throws RemoteExceptionGet the path string for this Folder.- Specified by:
getPathin interfaceFolderInterface- Returns:
- The String with the path from the BIP root to this folder.
- Throws:
RemoteException- in the event of remote object failure.
-
getItems
List all items in the folder. These are only the individual items. Subfolders will be returned separately.- Specified by:
getItemsin interfaceFolderInterface- Returns:
- A List of MetadataInterface objects in this folder. If this folder has no items, an empty List is returned.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getItemsByType
Get a list of items in the folder of a specific type.- Specified by:
getItemsByTypein interfaceFolderInterface- Parameters:
metadataType- A String that will match the output from the object's getType method.- Returns:
- A List of MetadataInterface objects whose getType() method returns the string specified by metadataType. If no matching objects are found, an empty List is returned.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getItemsByClass
List the items in the folder that match the Class passed in as a parameter. This Class should be a subclass of MetadataInterface.- Specified by:
getItemsByClassin interfaceFolderInterface- Parameters:
itemClass- The Class used to filter the folder objects to return.- Returns:
- A List of MetadataInterface objects that match the itemClass. If no objects matching the class are found, an empty List is returned.
- Throws:
ServiceException- If a repository error occurs.RemoteException- in the event of remote object failure.
-
getItem
Get a named item from the folder. With only a name, we can't guarantee that the object coming back will be the one the user wants. Even if we ask for a type, name collisions can occur.- Specified by:
getItemin interfaceFolderInterface- Parameters:
name- The name of the object to return.- Returns:
- A MetadataInterface object matching name, or null if no such object is found.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getPublicTypeItem
public MetadataInterface getPublicTypeItem(String name, String type) throws ServiceException, RemoteException Find an item in this Folder with the given name and type. This will use search to get the item, so it will always go to the server to find the object.- Specified by:
getPublicTypeItemin interfaceFolderInterface- Parameters:
name- The name of the object to find. If null, a null is returned.type- The public type name of the object type. If this is null, a null is returned. If the type is not recognized as a public type, a ServiceException will be thrown- Returns:
- The matching item in this folder, or null if none exists.
- Throws:
ServiceException- if the type is not a public type, or if a repository error occurs.RemoteException- in the event of remote object failure.
-
getItemByType
public MetadataInterface getItemByType(String name, String metadataType) throws ServiceException, RemoteException Get a named item from the folder. With only a name, we can't guarantee that the object coming back will be the one the user wants. Even if we ask for a type, name collisions can occur.- Specified by:
getItemByTypein interfaceFolderInterface- Parameters:
name- The name of the object to return.metadataType- The type of object to return.- Returns:
- A MetadataInterface object that matches the name and type requested, or null if none is found.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getItemByClass
public MetadataInterface getItemByClass(String name, Class itemClass) throws ServiceException, RemoteException Get a named item from the folder. It must match both the name and the Class provided. If no Class is provided on the call, the first object matching the name is retuned. If no match is found, null is returned.- Specified by:
getItemByClassin interfaceFolderInterface- Parameters:
name- The name of the object to return.itemClass- The Class of the object to return.- Returns:
- A MetadataInterface object in the folder that matches the name and Class requested, or null if no such object is found.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getSubfolders
Get all the folders immediately below this one in the hiearchy.- Specified by:
getSubfoldersin interfaceFolderInterface- Returns:
- A List of FolderInterface objects that are members of this folder. If this folder has no subfolders, an empty List is returned.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getSubfolder
Get a named subfolder.- Specified by:
getSubfolderin interfaceFolderInterface- Parameters:
name- The name of the folder to return.- Returns:
- A FolderInterface object with the name requested, or null if it doesn't exist.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
addItem
Add an item to the folder. The item should already exist. This method makes the association that puts it in this folder, but doesn't create the item in the store.- Specified by:
addItemin interfaceFolderInterface- Parameters:
item- The item to add to this folder.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
addItem
- Throws:
ServiceExceptionRemoteException
-
addNewItem
public MetadataInterface addNewItem(String name, String type) throws ServiceException, RemoteException Create a new metadata object to add to the folder.- Specified by:
addNewItemin interfaceFolderInterface- Parameters:
name- The name of the new object.type- The repository-specific type of the new object.- Returns:
- The new metadata object.
- Throws:
ServiceException- In the event of repository failure.RemoteException- In the event of remote object failure.
-
removeItem
Remove an item from the folder. This call just breaks the association with the item, and leaves it otherwise undisturbed in the repository.- Specified by:
removeItemin interfaceFolderInterface- Parameters:
item- The item to remove from this folder.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
deleteItem
Delete an item from this folder. This method deletes the item from the repository as well as removing it from the folder.- Specified by:
deleteItemin interfaceFolderInterface- Parameters:
item- The item to delete from this folder.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
makeSubfolder
public FolderInterface makeSubfolder(String name, String type) throws RemoteException, ServiceException Create a new Folder with the given name of the given type and make it a new subfolder of this folder.- Specified by:
makeSubfolderin interfaceFolderInterface- Parameters:
name- The name of the new subfolder.type- The public object type of the new subfolder. If this is null, the default folder type is created.- Returns:
- The new FolderInterface that was created.
- Throws:
RemoteException- In the event of remote object failure.ServiceException- If a repository error occurs.
-
makeSubfolder
Makes a subfolder under the current folder.- Specified by:
makeSubfolderin interfaceFolderInterface- Parameters:
name- The name of the folder to create.- Returns:
- The new folder. If the folder name already exists as a subfolder, the existing folder will be returned.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
addSubfolder
Add an existing folder to this one as a subfolder.- Specified by:
addSubfolderin interfaceFolderInterface- Parameters:
folder- The folder to add to this one as a subfolder.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
addSubfolder
protected void addSubfolder(FolderInterface folder, int index) throws ServiceException, RemoteException - Throws:
ServiceExceptionRemoteException
-
removeSubfolder
Remove a subfolder from the current folder. This breaks the association, but does not remove it from the repository.- Specified by:
removeSubfolderin interfaceFolderInterface- Parameters:
name- The name of the subfolder to remove.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
deleteSubfolder
Delete a subfolder. This will only work if the folder is empty.- Specified by:
deleteSubfolderin interfaceFolderInterface- Parameters:
name- The name of the subfolder to delete.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
copyTo
public FolderInterface copyTo(FolderInterface folder, String name) throws ServiceException, RemoteException Description copied from class:MetadataMake 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- Overrides:
copyToin classMetadata- 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.
-
moveTo
Description copied from class:MetadataMove 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- Overrides:
moveToin classMetadata- Parameters:
folder- The new parent Folder of this object.- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
delete
Description copied from class:MetadataDelete 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- Overrides:
deletein classMetadata- Throws:
ServiceException- in the event of a repository failure.RemoteException- in the event of a network failure.
-
getParent
Get parent folder.If the current folder has more than one parent, the preferred (first) parent folder is returned.
- Specified by:
getParentin interfaceFolderInterface- Specified by:
getParentin interfaceMetadataInterface- Overrides:
getParentin classMetadata- Returns:
- The parent Folder of this folder.
- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
isItemNameUnique
Validate that the name of the metadata object is unique within the Folder. The object should already be an item in the folder. If it's not, then the hasDuplicate call should be made. If the member name is unique in the folder, the method returns true. Otherwise it returns false. This method does not validate the name string itself.- Specified by:
isItemNameUniquein interfaceFolderInterface- Parameters:
member- The item to check for a unique name in the folder.- Returns:
- True if the member's name is unique, false otherwise.
- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
hasDuplicate
Description copied from interface:FolderInterfaceCheck if there's a duplicate object in this folder with the same name and of the same type.- Specified by:
hasDuplicatein interfaceFolderInterface- Parameters:
name- The name to check for.type- The type to check for. This should be the value of the PublicType attribute because I can't necessarily instantiate the object if the current user doesn't have ReadMetadata permission on it. I need to construct a filter to do a getCountNoSecurity with.- Returns:
- true if this folder has an object with the given name and type, false otherwise.
- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
hasDuplicateSubfolder
Determines if this folder already has a subfolder with the given name.- Specified by:
hasDuplicateSubfolderin interfaceFolderInterface- Parameters:
name- The name of the subfolder to check for.- Returns:
trueif this folder has a subfolder with the given name,falseotherwise.- Throws:
ServiceException- if a metadata server, or other service level error occurs.RemoteException- in the event of remote object failure.- See Also:
-
hasDuplicateSubfolder
public boolean hasDuplicateSubfolder(String name, FolderInterface subFolderToExclude) throws ServiceException, RemoteException Determines if this folder already has a subfolder with the given name excluding the specified subfolder.This method can be used to determine if a new name is valid for a subfolder by checking to see if a duplicate subfolder already exists other than the subfolder being checked.
- Parameters:
name- The name of the subfolder to check for.subFolderToExclude- The subfolder which should be excluded ornullif a subfolder should not be excluded from this check.- Returns:
trueif this folder has a subfolder with the given name,falseotherwise.- Throws:
ServiceException- if a metadata server, or other service level error occurs.RemoteException- in the event of remote object failure.
-
isEmpty
Description copied from interface:FolderInterfaceReturns true if this folder has no subfolders and no member objects. This method may return false even if bothFolderInterface.getSubfolders()andFolderInterface.getItems()return empty lists due to objects hidden by access controls.- Specified by:
isEmptyin interfaceFolderInterface- Returns:
- true if this folder has no subfolders and no member objects
- Throws:
ServiceException- If a metadata server, or other service level error occurs.RemoteException- In the event of remote object failure.
-
setRepository
Description copied from class:MetadataSet the repository that this item exists in.- Specified by:
setRepositoryin interfaceMetadataInterface- Overrides:
setRepositoryin classMetadata- Parameters:
ri- A handle to the repository for this object.- Throws:
RemoteException- in the event of remote object failure
-
setFolderType
Set the folder type.- Specified by:
setFolderTypein interfaceFolderInterface- Parameters:
type- The String indicating the type of the folder.- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
getFolderType
Get the folder type.- Specified by:
getFolderTypein interfaceFolderInterface- Returns:
- A String with the type of folder.
- Throws:
ServiceException- If a repository error occurs.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- Overrides:
setNamein classMetadata- Parameters:
name- The name of the object in the repository.- Throws:
RemoteException- in the event of remote object failure.
-
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- Overrides:
mapNameToFilesystemin classMetadata- 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- Overrides:
mapUrlToFilesystemin classMetadata- 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.
-
getItemSublist
Description copied from interface:FolderInterfaceGet a sublist of items from this folder- Specified by:
getItemSublistin interfaceFolderInterface- Parameters:
start- item number to start atend- item number to end at- Returns:
- The sublist of items.
- Throws:
RemoteExceptionServiceException
-
getItemSublist
public List getItemSublist(int start, int end, String sort) throws RemoteException, ServiceException Description copied from interface:FolderInterfaceGet a sublist of items from this folder which are sorted.- Specified by:
getItemSublistin interfaceFolderInterface- Parameters:
start- item number to start atend- item number to end atsort- one of name, namedescending, desc, descdescending, date, datedescending, type, typedescending, defaults to name- Returns:
- The sorted sublist of items.
- Throws:
RemoteExceptionServiceException
-
getTotalNumberOfItems
Description copied from interface:FolderInterfaceGet the total number of items in this folder- Specified by:
getTotalNumberOfItemsin interfaceFolderInterface- Returns:
- The number of items in the folder.
- Throws:
RemoteExceptionServiceException
-
getChildren
Description copied from interface:PublicObjectContainerInterfaceGet a List of the children of this container.- Specified by:
getChildrenin interfacePublicObjectContainerInterface- Returns:
- All child nodes below this container. For folder, this includes subfolders and members.
- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
getChildren
Description copied from interface:PublicObjectContainerInterfaceGet a list of children of a specific type. The type string should be the unlocalized type, listed as the "Type Abbreviation" in the type dictionary.- Specified by:
getChildrenin interfacePublicObjectContainerInterface- Parameters:
type- The "type abbreviation" which will be used to filter the children returned from the container.- Returns:
- A List of child elements that match the type specified.
- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
getChildAt
Description copied from interface:PublicObjectContainerInterfaceReturns a child item at the specified location- Specified by:
getChildAtin interfacePublicObjectContainerInterface- Parameters:
index- the index of the child- Returns:
- the child item at the specified index
- Throws:
ServiceExceptionRemoteException
-
getChildCount
Description copied from interface:PublicObjectContainerInterfaceReturns the number of children within this container.- Specified by:
getChildCountin interfacePublicObjectContainerInterface- Returns:
- child count
- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
insertChild
public void insertChild(PublicObjectInterface child, int index) throws ServiceException, RemoteException Description copied from interface:MutableContainerInterfaceInserts a child into the parent container at the specified index.- Specified by:
insertChildin interfaceMutableContainerInterface- Parameters:
child- the new child to add to this containerindex- the index where the child is to be inserted into- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
addChild
Description copied from interface:MutableContainerInterfaceAdd a child to this container. For folders, the new child can be a sub folder, or a simple element.- Specified by:
addChildin interfaceMutableContainerInterface- Parameters:
newChild- The new child object to add to this container.- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
removeChild
Description copied from interface:MutableContainerInterfaceRemove a child from this container. Trying to remove a child and not moving it to another container may be invalid.- Specified by:
removeChildin interfaceMutableContainerInterface- Parameters:
child- The child to remove from this container.- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
newChild
public PublicObjectInterface newChild(String type, String name) throws ServiceException, RemoteException Description copied from interface:PublicObjectContainerInterfaceCreate a new metadata object and add it to the container.- Specified by:
newChildin interfacePublicObjectContainerInterface- Parameters:
type- The public object type to add to the container.name- The name of the new object- Returns:
- The newly created public object.
- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object faiure.
-
refresh
Description copied from class:MetadataRefresh the data for this object from the repository.- Specified by:
refreshin interfaceMetadataInterface- Overrides:
refreshin classMetadata- Throws:
ServiceException- if a repository error occurs.RemoteException- in the event of remote object failure.
-
getContentInfo
Returns theContentInfoobject corresponding to the root of the given PathUrl.Implementation Note: computed results are cached; repeated calls are not expensive.
- Specified by:
getContentInfoin interfaceFolderInterface- Returns:
- The ContentInfo object with the path and credentials for the content area, or null if the folder isn't content mapped.
- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.IllegalStateException
-
getContentCreateDate
Description copied from interface:FolderInterfaceGet the content create date. This is maintained separately from the metadata create date, which is when the Tree object itself was created. This date indicates when the content folder was created.- Specified by:
getContentCreateDatein interfaceFolderInterface- Returns:
- The Date when the content folder was created.
- Throws:
ServiceException- If a service level error occured.RemoteException- In the event of remote object failure.
-
setContentCreateDate
Description copied from interface:FolderInterfaceSet the Date that the content folder was created.- Specified by:
setContentCreateDatein interfaceFolderInterface- Parameters:
date- The date that the mapped content folder was created.- Throws:
ServiceException- If a service level error occured.RemoteException- In the event of remote object failure.
-
getContentModifyDate
Description copied from interface:FolderInterfaceGet the content modification date. This is the date and time of the most recent addition to or deletion from this folder. This information may be maintained by the client.- Specified by:
getContentModifyDatein interfaceFolderInterface- Returns:
- The Date when an object was last added or removed.
- Throws:
ServiceException- If a service level error occured.RemoteException- In the event of remote object failure.
-
setContentModifyDate
Description copied from interface:FolderInterfaceSet the date when an object was last added to or removed from this folder.- Specified by:
setContentModifyDatein interfaceFolderInterface- Parameters:
date- The last time the contents of this folder were modified.- Throws:
ServiceException- If a service level error occured.RemoteException- In the event of remote object failure.
-
newServiceObject
Description copied from class:MetadataFor 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- Overrides:
newServiceObjectin classMetadata- Returns:
- The "active" object for this metadata.
- Throws:
ServiceException- if an error occursRemoteException- in the event of remote object failure
-
getLocalizableProperties
public com.sas.storage.editableproperties.PropertyList getLocalizableProperties()- Specified by:
getLocalizablePropertiesin interfacecom.sas.storage.editableproperties.LocalizableProperties
-
setLocalizableProperties
public void setLocalizableProperties(com.sas.storage.editableproperties.PropertyMap map) - Specified by:
setLocalizablePropertiesin interfacecom.sas.storage.editableproperties.LocalizableProperties
-
moveMembersOnOverflow
Description copied from interface:FolderInterfaceCheck for too many objects in a folder. If the folder contains more than a limit defined by the folder, the current members of the folder are moved to a new subfolder. The new subfolder will be named "1", "2", etc. Subfolders are not considered in the count.- Specified by:
moveMembersOnOverflowin interfaceFolderInterface- Returns:
- true if objects were moved to a subfolder
- Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
hasContentBacking
- Throws:
RemoteExceptionServiceException
-
hasContentBackedItems
- Throws:
ServiceExceptionRemoteException
-
upgradeFromPreviousVersion
Description copied from interface:UpgradeInterfaceUpgrades an object from a previous version to the most current version supported.- Specified by:
upgradeFromPreviousVersionin interfaceUpgradeInterface- Throws:
ServiceException- if the object could not be upgradedRemoteException- a remote object failure
-