*** This class provides Binary Compatibility only, not Source Compatibility ***

Class FilteredFolder

java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
All Implemented Interfaces:
FilteredFolderInterface, FolderInterface, MetadataInterface, MutableContainerInterface, PublicObjectContainerInterface, PublicObjectInterface, com.sas.services.util.UpgradeInterface, com.sas.storage.editableproperties.LocalizableProperties, Serializable, Remote
Direct Known Subclasses:
FilteredRepository

@SASScope("ALL") @BinaryCompatibilityOnly public class FilteredFolder extends Folder implements FilteredFolderInterface, Serializable
This is a generic interface for interacting with a Folder object. This class is specifically intended to represent results coming from a search where not all items within a folder will be represented.
Since:
1.0
See Also:
  • Constructor Details

    • FilteredFolder

      public FilteredFolder(FilteredFolderInterface p, FolderInterface f) throws RemoteException
      Construct a new FilteredFolder with a parent and a "real" folder.

      Parameters:
      p - The FilteredFolderInterface for the parent of this FilteredFolder.
      f - The FolderInterface from the repository that contains the unfiltered contents.
      Throws:
      RemoteException - in the event of remote object failure.
    • FilteredFolder

      protected FilteredFolder(FilteredFolderInterface p, FolderInterface f, Class theClass) throws RemoteException
      Construct a new FilteredFolder with a parent and a "real" folder.

      Parameters:
      p - The FilteredFolderInterface for the parent of this FilteredFolder.
      f - The FolderInterface from the repository that contains the unfiltered contents.
      Throws:
      RemoteException - in the event of remote object failure.
  • Method Details

    • getName

      public String getName() throws RemoteException
      Description copied from class: Metadata
      Gets the name of the object.

      Specified by:
      getName in interface PublicObjectInterface
      Overrides:
      getName in class Metadata
      Returns:
      The name String for the object.
      Throws:
      RemoteException - in the event of remote object failure.
    • getReposId

      public String getReposId() throws RemoteException
      Description copied from class: Metadata
      Get the repository identifier for this object. The repository ID uniquely identifies the object within the repository.

      Specified by:
      getReposId in interface MetadataInterface
      Overrides:
      getReposId in class Metadata
      Returns:
      A String with the repository identifier.
      Throws:
      RemoteException - in the event of remote object failure.
    • addSubfolder

      public void addSubfolder(FolderInterface folder) throws ServiceException, RemoteException
      Add a subfolder to this FilteredFolder. This isn't an actual persisted add, just an add to a collection.

      Specified by:
      addSubfolder in interface FolderInterface
      Overrides:
      addSubfolder in class Folder
      Parameters:
      folder - The FolderInterface to add to this folder.
      Throws:
      RemoteException - in the event of remote object failure.
      ServiceException - if a repository error occurs.
    • addLocalItem

      public void addLocalItem(MetadataInterface obj) throws RemoteException
      Add a filtered result object to this folder.

      Specified by:
      addLocalItem in interface FilteredFolderInterface
      Parameters:
      obj - The object to add.
      Throws:
      RemoteException - in the event of remote object failure.
    • getFolder

      public FolderInterface getFolder() throws RemoteException
      Get the "real" folder with the unfiltered contents that this folder represents.

      Specified by:
      getFolder in interface FilteredFolderInterface
      Returns:
      The FolderInterface for the repository folder with the unfiltered contents.
      Throws:
      RemoteException - in the event of remote object failure.
    • getType

      public String getType() throws RemoteException
      Return a type string to identify this object.

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

      public FolderInterface getParent() throws RemoteException
      Get the parent FilteredFolder to this folder.

      Specified by:
      getParent in interface FolderInterface
      Specified by:
      getParent in interface MetadataInterface
      Overrides:
      getParent in class Folder
      Returns:
      The FilteredFolder that's the parent to this folder, or null if this folder doesn't have a parent.
      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
      Overrides:
      getItems in class Folder
      Returns:
      A List of MetadataInterface objects in this folder.
      Throws:
      ServiceException - if a repository error occurs.
      RemoteException - in the event of remote object failure.
    • getItems

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

      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 there aren't any matching objects, 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
      Overrides:
      getItemsByType in class Folder
      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 there aren't any matching objects, an empty List is returned.
      Throws:
      ServiceException - if a repository error occurs.
      RemoteException - in the event of remote object failure.
    • getItems

      public List getItems(Class itemClass) throws ServiceException, RemoteException
      Deprecated.
      in favor of getItemsByClass.
      List the items in the folder that match the Class passed in as a parameter. This Class should be a subclass of MetadataInterface.

      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 match the class, 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
      Overrides:
      getItemsByClass in class Folder
      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 match the class, 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
      Overrides:
      getItem in class Folder
      Parameters:
      name - The name of the object to return.
      Returns:
      A MetadataInterface object matching name, or null if no object with that name is in the folder.
      Throws:
      ServiceException - if a repository error occurs.
      RemoteException - in the event of remote object failure.
    • getItem

      public MetadataInterface getItem(String name, String metadataType) throws ServiceException, RemoteException
      Deprecated.
      in favor of getItemByType.
      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.
      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.
    • 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
      Overrides:
      getItemByType in class Folder
      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.
    • getItem

      public MetadataInterface getItem(String name, Class itemClass) throws ServiceException, RemoteException
      Deprecated.
      in favor of getItemByClass
      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.

      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 match was 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
      Overrides:
      getItemByClass in class Folder
      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 match was 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
      Overrides:
      getSubfolders in class Folder
      Returns:
      A List of FolderInterface objects that are members of this folder.
      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
      Overrides:
      getSubfolder in class Folder
      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.