com.sas.services.information.metadata
Interface FolderInterface

All Superinterfaces:
MetadataInterface,
All Known Subinterfaces:
FilteredFolderInterface, FilteredRepositoryInterface, MyDocumentsInterface, MyInboxInterface, MyResultsInterface, PersonalRepositoryInterface
All Known Implementing Classes:
Folder,

public interface FolderInterface
extends MetadataInterface

This is a generic interface for interacting with a Folder object.

Note: This interface currently has no support for ordering of items within a Folder although the contents are returned in an ordered list. It may be useful to subclass the list of items to allow sorting by name, date created, date modified, etc.

Since:
1.0

Field Summary
static String FOLDER_TYPE_BIP
          The type string that most BIP applications like.
 
Fields inherited from interface com.sas.services.information.metadata.MetadataInterface
PERMISSION_READMETADATA, PERMISSION_WRITEMETADATA
 
Method Summary
 void addItem(MetadataInterface item)
          Add an item to the folder.
 MetadataInterface addNewItem(String name, String type)
          Create a new metadata object to add to the folder.
 void addSubfolder(FolderInterface folder)
          Add an existing folder to this one as a subfolder.
 void deleteItem(MetadataInterface item)
          Delete an item from this folder.
 void deleteSubfolder(String name)
          Delete a subfolder.
 String getFolderType()
          Get the folder type.
 MetadataInterface getItem(String name)
          Get a named item from the folder.
 MetadataInterface getItemByClass(String name, Class itemClass)
          Get a named item from the folder.
 MetadataInterface getItemByType(String name, String metadataType)
          Get a named item from the folder.
 List getItems()
          List all items in the folder.
 List getItemsByClass(Class itemClass)
          List the items in the folder that match the Class passed in as a parameter.
 List getItemsByType(String metadataType)
          Get a list of items in the folder of a specific type.
 FolderInterface getParent()
          Get parent folder.
 String getPath()
          Get path of the current folder.
 FolderInterface getSubfolder(String name)
          Get a named subfolder.
 List getSubfolders()
          Get all the folders immediately below this one in the hiearchy.
 FolderInterface makeSubfolder(String name)
          Makes a subfolder under the current folder.
 void removeItem(MetadataInterface item)
          Remove an item from the folder.
 void removeSubfolder(String name)
          Remove a subfolder from the current folder.
 void setFolderType(String type)
          Set the folder type.
 
Methods inherited from interface com.sas.services.information.metadata.MetadataInterface
add, addAccessControl, addAttribute, addAttributes, addExtension, addKeyword, addPermissions, addRemark, addTransactionListener, checkin, checkout, commit, copyTo, delete, deleteAttribute, deleteAttributes, getAccessControls, getAttribute, getAttributes, getCreateDate, getDescription, getEntityKey, getEntityURL, getExtensions, getGUID, getIdentities, getKeywords, getModifyDate, getName, getParentPath, getParents, getPath, getPaths, getPathUrl, getPathUrl, getPermission, getPermissions, getPermissions, getPreviousVersionNames, getRemarksList, getReposId, getRepository, getRepositoryEntity, getReposKey, getTrackingId, getType, getVersion, isAuthorized, isLoggingEnabled, logMessage, mapNameToFilesystem, mapUrlToFilesystem, moveTo, newServiceObject, refresh, removeAccessControl, removeExtension, removeKeyword, removePermissions, rollback, setAttribute, setAttributes, setDescription, setGUID, setKeywords, setName, setPermission, setRemarksList, setRepository, startTransaction, transactionEvent, uncheckout, update, version
 

Field Detail

FOLDER_TYPE_BIP

public static final String FOLDER_TYPE_BIP
The type string that most BIP applications like.
Method Detail

getPath

public String getPath()
               throws RemoteException
Get path of the current folder. This is the path starting with the Tree just below the Bip Service SoftwareComponent down to this folder, with forward-slash separators.

Returns:
The path string for 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.

Returns:
A List of MetadataInterface objects in this folder.
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.

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.
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.

Parameters:
itemClass - The Class used to filter the folder objects to return.
Returns:
A List of MetadataInterface objects that match the itemClass.
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.

Parameters:
name - The name of the object to return.
Returns:
A MetadataInterface object matching name.
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.
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.

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.
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.

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.

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.

Parameters:
item - The item to add to this folder.
Throws:
ServiceException - if a repository error occurs.
RemoteException - in the event of remote object failure.

addNewItem

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

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.

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.

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)
                              throws ServiceException,
                                     RemoteException
Makes a subfolder under the current folder.

Parameters:
name - The name of the folder to create.
Returns:
The new folder
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.
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.

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.

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.

Parameters:
name - The name of the subfolder to delete.
Throws:
ServiceException - if a repository error occurs.
RemoteException - in the event of remote object 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.

Returns:
The parent Folder of this folder.
Throws:
ServiceException - if a repository error occurs.
RemoteException - in the event of remote object failure.

setFolderType

public void setFolderType(String type)
                   throws ServiceException,
                          RemoteException
Set the folder type.
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.
Returns:
A String with the type of folder.
Throws:
ServiceException - If a repository error occurs.
RemoteException - In the event of remote object failure.




Copyright © 2006 SAS Institute Inc. All Rights Reserved.
javadoc generated Fri, 10 Feb 2006 17:28:56