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 Details

    • REPOSITORY_CONTENT_MAPPING

      @Deprecated public static final String REPOSITORY_CONTENT_MAPPING
      Deprecated.
      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 RemoteException
      Default 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 RemoteException
      Return a type string to identify this object.

      Specified by:
      getType in interface MetadataInterface
      Overrides:
      getType in class Metadata
      Returns:
      The type string ("Folder").
      Throws:
      RemoteException - in the event of remote object failure.
    • getPath

      public String getPath() throws RemoteException
      Get the path string for this Folder.

      Specified by:
      getPath in interface FolderInterface
      Returns:
      The String with the path from the BIP root to this folder.
      Throws:
      RemoteException - in the event of remote object failure.
    • getItems

      public List getItems() throws ServiceException, RemoteException
      List all items in the folder. These are only the individual items. Subfolders will be returned separately.

      Specified by:
      getItems in interface FolderInterface
      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

      public List getItemsByType(String metadataType) throws ServiceException, RemoteException
      Get a list of items in the folder of a specific type.

      Specified by:
      getItemsByType in interface FolderInterface
      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

      public List getItemsByClass(Class itemClass) throws ServiceException, RemoteException
      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:
      getItemsByClass in interface FolderInterface
      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

      public MetadataInterface getItem(String name) 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:
      getItem in interface FolderInterface
      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:
      getPublicTypeItem in interface FolderInterface
      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:
      getItemByType in interface FolderInterface
      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:
      getItemByClass in interface FolderInterface
      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

      public List getSubfolders() throws ServiceException, RemoteException
      Get all the folders immediately below this one in the hiearchy.

      Specified by:
      getSubfolders in interface FolderInterface
      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

      public FolderInterface getSubfolder(String name) throws ServiceException, RemoteException
      Get a named subfolder.

      Specified by:
      getSubfolder in interface FolderInterface
      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

      public void addItem(MetadataInterface item) throws ServiceException, RemoteException
      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:
      addItem in interface FolderInterface
      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

      protected void addItem(MetadataInterface item, int index) throws ServiceException, RemoteException
      Throws:
      ServiceException
      RemoteException
    • addNewItem

      public MetadataInterface addNewItem(String name, String type) throws ServiceException, RemoteException
      Create a new metadata object to add to the folder.

      Specified by:
      addNewItem in interface FolderInterface
      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

      public void removeItem(MetadataInterface item) throws ServiceException, RemoteException
      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:
      removeItem in interface FolderInterface
      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

      public void deleteItem(MetadataInterface item) throws ServiceException, RemoteException
      Delete an item from this folder. This method deletes the item from the repository as well as removing it from the folder.

      Specified by:
      deleteItem in interface FolderInterface
      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:
      makeSubfolder in interface FolderInterface
      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

      public FolderInterface makeSubfolder(String name) throws ServiceException, RemoteException
      Makes a subfolder under the current folder.

      Specified by:
      makeSubfolder in interface FolderInterface
      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

      public void addSubfolder(FolderInterface folder) throws ServiceException, RemoteException
      Add an existing folder to this one as a subfolder.
      Specified by:
      addSubfolder in interface FolderInterface
      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:
      ServiceException
      RemoteException
    • removeSubfolder

      public void removeSubfolder(String name) throws ServiceException, RemoteException
      Remove a subfolder from the current folder. This breaks the association, but does not remove it from the repository.

      Specified by:
      removeSubfolder in interface FolderInterface
      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

      public void deleteSubfolder(String name) throws ServiceException, RemoteException
      Delete a subfolder. This will only work if the folder is empty.

      Specified by:
      deleteSubfolder in interface FolderInterface
      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: Metadata
      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:
      copyTo in interface MetadataInterface
      Overrides:
      copyTo in class Metadata
      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

      public void moveTo(FolderInterface folder) throws ServiceException, RemoteException
      Description copied from class: Metadata
      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:
      moveTo in interface MetadataInterface
      Overrides:
      moveTo in class Metadata
      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

      public void delete() throws ServiceException, RemoteException
      Description copied from class: Metadata
      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:
      delete in interface MetadataInterface
      Overrides:
      delete in class Metadata
      Throws:
      ServiceException - in the event of a repository failure.
      RemoteException - in the event of a network failure.
    • getParent

      public FolderInterface getParent() throws ServiceException, RemoteException
      Get parent folder.

      If the current folder has more than one parent, the preferred (first) parent folder is returned.

      Specified by:
      getParent in interface FolderInterface
      Specified by:
      getParent in interface MetadataInterface
      Overrides:
      getParent in class Metadata
      Returns:
      The parent Folder of this folder.
      Throws:
      ServiceException - if a repository error occurs.
      RemoteException - in the event of remote object failure.
    • isItemNameUnique

      public boolean isItemNameUnique(MetadataInterface member) throws ServiceException, RemoteException
      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:
      isItemNameUnique in interface FolderInterface
      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

      public boolean hasDuplicate(String name, String type) throws ServiceException, RemoteException
      Description copied from interface: FolderInterface
      Check if there's a duplicate object in this folder with the same name and of the same type.
      Specified by:
      hasDuplicate in interface FolderInterface
      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

      public boolean hasDuplicateSubfolder(String name) throws ServiceException, RemoteException
      Determines if this folder already has a subfolder with the given name.
      Specified by:
      hasDuplicateSubfolder in interface FolderInterface
      Parameters:
      name - The name of the subfolder to check for.
      Returns:
      true if this folder has a subfolder with the given name, false otherwise.
      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 or null if a subfolder should not be excluded from this check.
      Returns:
      true if this folder has a subfolder with the given name, false otherwise.
      Throws:
      ServiceException - if a metadata server, or other service level error occurs.
      RemoteException - in the event of remote object failure.
    • isEmpty

      public boolean isEmpty() throws ServiceException, RemoteException
      Description copied from interface: FolderInterface
      Returns true if this folder has no subfolders and no member objects. This method may return false even if both FolderInterface.getSubfolders() and FolderInterface.getItems() return empty lists due to objects hidden by access controls.
      Specified by:
      isEmpty in interface FolderInterface
      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

      public void setRepository(RepositoryInterface ri) throws RemoteException
      Description copied from class: Metadata
      Set the repository that this item exists in.

      Specified by:
      setRepository in interface MetadataInterface
      Overrides:
      setRepository in class Metadata
      Parameters:
      ri - A handle to the repository for this object.
      Throws:
      RemoteException - in the event of remote object failure
    • setFolderType

      public void setFolderType(String type) throws ServiceException, RemoteException
      Set the folder type.
      Specified by:
      setFolderType in interface FolderInterface
      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

      public String getFolderType() throws ServiceException, RemoteException
      Get the folder type.
      Specified by:
      getFolderType in interface FolderInterface
      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:
      setName in interface MetadataInterface
      Overrides:
      setName in class Metadata
      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:
      mapNameToFilesystem in interface MetadataInterface
      Overrides:
      mapNameToFilesystem in class Metadata
      Parameters:
      hostOS - The host operating system. Valid values include Names.UNKNOWN, Names.WINDOWS, Names.UNIX, Names.ZOS_HFS, Names.ZOS_PDS and Names.WEBDAV.
      prefix - The prefix to use when creating the file system path.
      suffix - The suffix to use when creating the file system path.
      Returns:
      String The file system path.
      Throws:
      RemoteException - In the event of remote object failure.
      IllegalArgumentException - If a null name 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:
      mapUrlToFilesystem in interface MetadataInterface
      Overrides:
      mapUrlToFilesystem in class Metadata
      Parameters:
      hostOS - The host operating system. Valid values include Names.UNKNOWN, Names.WINDOWS, Names.UNIX, Names.ZOS_HFS, Names.ZOS_PDS and Names.WEBDAV.
      prefix - The prefix to use when creating the file system path.
      suffix - The suffix to use when creating the file system path.
      Returns:
      String The file system path.
      Throws:
      ServiceException - if a repository error occurs.
      RemoteException - In the event of remote object failure.
      IllegalArgumentException - If a null name is specified or if an invalid host operating system value is specified.
    • getItemSublist

      public List getItemSublist(int start, int end) throws RemoteException, ServiceException
      Description copied from interface: FolderInterface
      Get a sublist of items from this folder
      Specified by:
      getItemSublist in interface FolderInterface
      Parameters:
      start - item number to start at
      end - item number to end at
      Returns:
      The sublist of items.
      Throws:
      RemoteException
      ServiceException
    • getItemSublist

      public List getItemSublist(int start, int end, String sort) throws RemoteException, ServiceException
      Description copied from interface: FolderInterface
      Get a sublist of items from this folder which are sorted.
      Specified by:
      getItemSublist in interface FolderInterface
      Parameters:
      start - item number to start at
      end - item number to end at
      sort - one of name, namedescending, desc, descdescending, date, datedescending, type, typedescending, defaults to name
      Returns:
      The sorted sublist of items.
      Throws:
      RemoteException
      ServiceException
    • getTotalNumberOfItems

      public int getTotalNumberOfItems() throws RemoteException, ServiceException
      Description copied from interface: FolderInterface
      Get the total number of items in this folder
      Specified by:
      getTotalNumberOfItems in interface FolderInterface
      Returns:
      The number of items in the folder.
      Throws:
      RemoteException
      ServiceException
    • getChildren

      public List getChildren() throws ServiceException, RemoteException
      Description copied from interface: PublicObjectContainerInterface
      Get a List of the children of this container.
      Specified by:
      getChildren in interface PublicObjectContainerInterface
      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

      public List getChildren(String type) throws ServiceException, RemoteException
      Description copied from interface: PublicObjectContainerInterface
      Get 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:
      getChildren in interface PublicObjectContainerInterface
      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

      public PublicObjectInterface getChildAt(int index) throws ServiceException, RemoteException
      Description copied from interface: PublicObjectContainerInterface
      Returns a child item at the specified location
      Specified by:
      getChildAt in interface PublicObjectContainerInterface
      Parameters:
      index - the index of the child
      Returns:
      the child item at the specified index
      Throws:
      ServiceException
      RemoteException
    • getChildCount

      public int getChildCount() throws ServiceException, RemoteException
      Description copied from interface: PublicObjectContainerInterface
      Returns the number of children within this container.
      Specified by:
      getChildCount in interface PublicObjectContainerInterface
      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: MutableContainerInterface
      Inserts a child into the parent container at the specified index.
      Specified by:
      insertChild in interface MutableContainerInterface
      Parameters:
      child - the new child to add to this container
      index - 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

      public void addChild(PublicObjectInterface newChild) throws ServiceException, RemoteException
      Description copied from interface: MutableContainerInterface
      Add a child to this container. For folders, the new child can be a sub folder, or a simple element.
      Specified by:
      addChild in interface MutableContainerInterface
      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

      public void removeChild(PublicObjectInterface child) throws ServiceException, RemoteException
      Description copied from interface: MutableContainerInterface
      Remove a child from this container. Trying to remove a child and not moving it to another container may be invalid.
      Specified by:
      removeChild in interface MutableContainerInterface
      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: PublicObjectContainerInterface
      Create a new metadata object and add it to the container.
      Specified by:
      newChild in interface PublicObjectContainerInterface
      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

      public void refresh() throws ServiceException, RemoteException
      Description copied from class: Metadata
      Refresh the data for this object from the repository.
      Specified by:
      refresh in interface MetadataInterface
      Overrides:
      refresh in class Metadata
      Throws:
      ServiceException - if a repository error occurs.
      RemoteException - in the event of remote object failure.
    • getContentInfo

      public ContentInfo getContentInfo() throws IllegalStateException, ServiceException, RemoteException
      Returns the ContentInfoobject corresponding to the root of the given PathUrl.

      Implementation Note: computed results are cached; repeated calls are not expensive.

      Specified by:
      getContentInfo in interface FolderInterface
      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

      public Date getContentCreateDate() throws ServiceException, RemoteException
      Description copied from interface: FolderInterface
      Get 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:
      getContentCreateDate in interface FolderInterface
      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

      public void setContentCreateDate(Date date) throws ServiceException, RemoteException
      Description copied from interface: FolderInterface
      Set the Date that the content folder was created.
      Specified by:
      setContentCreateDate in interface FolderInterface
      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

      public Date getContentModifyDate() throws ServiceException, RemoteException
      Description copied from interface: FolderInterface
      Get 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:
      getContentModifyDate in interface FolderInterface
      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

      public void setContentModifyDate(Date date) throws ServiceException, RemoteException
      Description copied from interface: FolderInterface
      Set the date when an object was last added to or removed from this folder.
      Specified by:
      setContentModifyDate in interface FolderInterface
      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

      public Object newServiceObject() throws ServiceException, RemoteException
      Description copied from class: Metadata
      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:
      newServiceObject in interface MetadataInterface
      Overrides:
      newServiceObject in class Metadata
      Returns:
      The "active" object for this metadata.
      Throws:
      ServiceException - if an error occurs
      RemoteException - in the event of remote object failure
    • getLocalizableProperties

      public com.sas.storage.editableproperties.PropertyList getLocalizableProperties()
      Specified by:
      getLocalizableProperties in interface com.sas.storage.editableproperties.LocalizableProperties
    • setLocalizableProperties

      public void setLocalizableProperties(com.sas.storage.editableproperties.PropertyMap map)
      Specified by:
      setLocalizableProperties in interface com.sas.storage.editableproperties.LocalizableProperties
    • moveMembersOnOverflow

      public boolean moveMembersOnOverflow() throws ServiceException, RemoteException
      Description copied from interface: FolderInterface
      Check 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:
      moveMembersOnOverflow in interface FolderInterface
      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

      public boolean hasContentBacking() throws RemoteException, ServiceException
      Throws:
      RemoteException
      ServiceException
    • hasContentBackedItems

      public boolean hasContentBackedItems() throws ServiceException, RemoteException
      Throws:
      ServiceException
      RemoteException
    • upgradeFromPreviousVersion

      public void upgradeFromPreviousVersion() throws ServiceException, RemoteException
      Description copied from interface: UpgradeInterface
      Upgrades an object from a previous version to the most current version supported.
      Specified by:
      upgradeFromPreviousVersion in interface UpgradeInterface
      Throws:
      ServiceException - if the object could not be upgraded
      RemoteException - a remote object failure