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

com.sas.services.information.metadata
Class FilteredFolder

com.sas.services.information.metadata.FilteredFolder
All Implemented Interfaces:
FilteredFolderInterface, FolderInterface, MetadataInterface, MutableContainerInterface, PublicObjectContainerInterface, PublicObjectInterface, com.sas.services.util.UpgradeInterface, com.sas.storage.editableproperties.LocalizableProperties, java.io.Serializable, java.rmi.Remote
Direct Known Subclasses:
FilteredRepository

public class FilteredFolder
implements FilteredFolderInterface, java.io.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:
Serialized Form

Field Summary
 
Fields inherited from class com.sas.services.information.metadata.Folder
CREATION_DATE, CURRENT_VERSION, MODIFIED_DATE, OLDEST_VERSION, REPOSITORY_CONTENT_MAPPING
 
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, SLASH
 
Fields inherited from interface com.sas.services.information.metadata.FolderInterface
FOLDER_TYPE_BIP
 
Fields 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
  FilteredFolder(FilteredFolderInterface p, FolderInterface f)
          Construct a new FilteredFolder with a parent and a "real" folder.
protected FilteredFolder(FilteredFolderInterface p, FolderInterface f, java.lang.Class theClass)
          Construct a new FilteredFolder with a parent and a "real" folder.
 
Method Summary
 void addLocalItem(MetadataInterface obj)
          Add a filtered result object to this folder.
 void addSubfolder(FolderInterface folder)
          Add a subfolder to this FilteredFolder.
 FolderInterface getFolder()
          Get the "real" folder with the unfiltered contents that this folder represents.
 MetadataInterface getItem(java.lang.String name)
          Get a named item from the folder.
 MetadataInterface getItem(java.lang.String name, java.lang.Class itemClass)
          Deprecated. in favor of getItemByClass
 MetadataInterface getItem(java.lang.String name, java.lang.String metadataType)
          Deprecated. in favor of getItemByType.
 MetadataInterface getItemByClass(java.lang.String name, java.lang.Class itemClass)
          Get a named item from the folder.
 MetadataInterface getItemByType(java.lang.String name, java.lang.String metadataType)
          Get a named item from the folder.
 java.util.List getItems()
          List all items in the folder.
 java.util.List getItems(java.lang.Class itemClass)
          Deprecated. in favor of getItemsByClass.
 java.util.List getItems(java.lang.String metadataType)
          Deprecated. in favor of getItemsByType.
 java.util.List getItemsByClass(java.lang.Class itemClass)
          List the items in the folder that match the Class passed in as a parameter.
 java.util.List getItemsByType(java.lang.String metadataType)
          Get a list of items in the folder of a specific type.
 java.lang.String getName()
          Gets the name of the object.
 FolderInterface getParent()
          Get the parent FilteredFolder to this folder.
 java.lang.String getReposId()
          Get the repository identifier for this object.
 FolderInterface getSubfolder(java.lang.String name)
          Get a named subfolder.
 java.util.List getSubfolders()
          Get all the folders immediately below this one in the hiearchy.
 java.lang.String getType()
          Return a type string to identify this object.
 
Methods inherited from class com.sas.services.information.metadata.Folder
addChild, addItem, addNewItem, copyTo, delete, deleteItem, deleteSubfolder, getChildAt, getChildCount, getChildren, getChildren, getContentCreateDate, getContentInfo, getContentModifyDate, getFolderRefresh, getFolderType, getItemRefresh, getItemSublist, getItemSublist, getLocalizableProperties, getPath, getTotalNumberOfItems, hasContentBackedItems, hasContentBacking, hasDuplicate, hasDuplicateSubfolder, hasDuplicateSubfolder, insertChild, isEmpty, isItemNameUnique, makeSubfolder, makeSubfolder, mapNameToFilesystem, mapUrlToFilesystem, moveMembersOnOverflow, moveTo, newChild, newServiceObject, refresh, removeChild, removeItem, removeSubfolder, setContentCreateDate, setContentModifyDate, setFolderRefresh, setFolderType, setItemRefresh, setLocalizableProperties, setName, setRepository, upgradeFromPreviousVersion
 
Methods inherited from class com.sas.services.information.metadata.Metadata
add, addAccessControl, addAttribute, addAttributes, addDocument, addExtension, addGroup, addImplementor, addKeyword, 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, getDefaultLocalizableProperties, getDescription, getDocuments, getEntityKey, getEntityURL, getExtensions, getGroups, getGUID, getIdentifier, getIdentities, getImplementors, getInformationService, getKeywords, getLockedBy, getModifyDate, getObjectProperties, getObjectURI, getParentPath, getParents, getPath, getPaths, getPathUrl, getPathUrl, getPermission, getPermissions, getPermissions, getPreviousVersionNames, getPrimaryPropertyGroup, getProcessorInterface, getPrompt, getPrompts, getPropertyBag, getPropertySets, getRemarksList, getRepository, getRepositoryEntity, getRepositoryName, getReposKey, getResponsibleParties, getState, getTrackingId, getTreeRefresh, getTypeDescriptor, getUsageVersion, getUsedByPrototypes, getUsingPrototype, getVersion, hashCode, isAuthorized, isCompatible, isConnectionException, isDeleted, isDestroyed, isLoggingEnabled, isLoggingEnabled, isObjectAlive, isReadCompatible, logFormat, logFormat, logFormat, logFormat, logFormat, logFormat, logFormat, logFormat, logMessage, logMessage, logMessage, logMessage, logThrowable, logThrowable, notifyTransactionListeners, removeAccessControl, removeDocument, removeExtension, removeFromList, removeGroup, removeImplementor, removeKeyword, removeObjectProperty, removePermissions, removePrompt, removePropertySet, removeResponsibleParty, removeUsedByPrototype, rollback, setAttribute, setAttributes, setCompatibility, setDefaultLocalizableProperties, setDeleted, setDescription, setDocuments, setExtensions, setGroups, setGUID, setKeywords, setObjectProperties, setPermission, setPrimaryPropertyGroup, setPrompt, setPrompts, setRemarksList, setTreeRefresh, setUsingPrototype, startTransaction, toByteArray, toString, transactionEvent, uncheckout, update, updateFromBag, validateNameAndFolder, validateNameAndFolder, version
 
Methods inherited from interface com.sas.services.information.metadata.FolderInterface
addItem, addNewItem, deleteItem, deleteSubfolder, getContentCreateDate, getContentInfo, getContentModifyDate, getFolderType, getItemSublist, getItemSublist, getPath, getTotalNumberOfItems, hasDuplicate, hasDuplicateSubfolder, isEmpty, isItemNameUnique, makeSubfolder, makeSubfolder, moveMembersOnOverflow, removeItem, removeSubfolder, setContentCreateDate, setContentModifyDate, setFolderType
 
Methods inherited from interface com.sas.services.information.metadata.MetadataInterface
add, addAccessControl, addAttribute, addAttributes, addDocument, addExtension, addGroup, addImplementor, addKeyword, addObjectProperty, addObjectProperty, addPermissions, addPrompt, addPropertySet, addRemark, addResponsibleParty, addTransactionListener, addUsedByPrototype, checkin, checkout, commit, copyTo, countAssociatedObjects, delete, deleteAttribute, deleteAttributes, destroy, getAccessControls, getAttribute, getAttributes, getAuthorizationUtil, getCreateDate, getDescription, getDocuments, getEntityKey, getEntityURL, getExtensions, getGroups, getGUID, getIdentities, getImplementors, getKeywords, getLockedBy, getModifyDate, getObjectProperties, getParentPath, getParents, getPath, getPaths, getPermission, getPermissions, getPermissions, getPreviousVersionNames, getPrimaryPropertyGroup, getPrompt, getPrompts, getPropertyBag, getPropertySets, getRemarksList, getRepository, getRepositoryEntity, getRepositoryName, getReposKey, getResponsibleParties, getState, getTrackingId, getUsageVersion, getUsedByPrototypes, getUsingPrototype, getVersion, isAuthorized, isCompatible, isDeleted, isDestroyed, isLoggingEnabled, isObjectAlive, isReadCompatible, logMessage, mapNameToFilesystem, mapUrlToFilesystem, moveTo, newServiceObject, refresh, removeAccessControl, removeDocument, removeExtension, removeGroup, removeImplementor, removeKeyword, removeObjectProperty, removePermissions, removePrompt, removePropertySet, removeResponsibleParty, removeUsedByPrototype, rollback, setAttribute, setAttributes, setDeleted, setDescription, setDocuments, setExtensions, setGroups, setGUID, setKeywords, setName, setObjectProperties, setPermission, setPrimaryPropertyGroup, setPrompt, setPrompts, setRemarksList, setRepository, setUsingPrototype, startTransaction, toByteArray, transactionEvent, uncheckout, update, updateFromBag, version
 
Methods inherited from interface com.sas.services.information.publicobject.MutableContainerInterface
addChild, insertChild, removeChild
 
Methods inherited from interface com.sas.services.information.publicobject.PublicObjectContainerInterface
getChildAt, getChildCount, getChildren, getChildren, newChild
 
Methods inherited from interface com.sas.services.information.publicobject.PublicObjectInterface
addProcessorInterface, getContainer, getIdentifier, getObjectURI, getPathUrl, getProcessorInterface, getTypeDescriptor
 

Constructor Detail

FilteredFolder

public FilteredFolder(FilteredFolderInterface p,
                      FolderInterface f)
               throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.

FilteredFolder

protected FilteredFolder(FilteredFolderInterface p,
                         FolderInterface f,
                         java.lang.Class theClass)
                  throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.
Method Detail

getName

public java.lang.String getName()
                         throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.

getReposId

public java.lang.String getReposId()
                            throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.

addSubfolder

public void addSubfolder(FolderInterface folder)
                  throws ServiceException,
                         java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.
ServiceException - if a repository error occurs.

addLocalItem

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

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

getFolder

public FolderInterface getFolder()
                          throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.

getType

public java.lang.String getType()
                         throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.

getParent

public FolderInterface getParent()
                          throws java.rmi.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:
java.rmi.RemoteException - in the event of remote object failure.

getItems

public java.util.List getItems()
                        throws ServiceException,
                               java.rmi.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.
java.rmi.RemoteException - in the event of remote object failure.

getItems

public java.util.List getItems(java.lang.String metadataType)
                        throws ServiceException,
                               java.rmi.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.
java.rmi.RemoteException - in the event of remote object failure.

getItemsByType

public java.util.List getItemsByType(java.lang.String metadataType)
                              throws ServiceException,
                                     java.rmi.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.
java.rmi.RemoteException - in the event of remote object failure.

getItems

public java.util.List getItems(java.lang.Class itemClass)
                        throws ServiceException,
                               java.rmi.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.
java.rmi.RemoteException - in the event of remote object failure.

getItemsByClass

public java.util.List getItemsByClass(java.lang.Class itemClass)
                               throws ServiceException,
                                      java.rmi.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.
java.rmi.RemoteException - in the event of remote object failure.

getItem

public MetadataInterface getItem(java.lang.String name)
                          throws ServiceException,
                                 java.rmi.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.
java.rmi.RemoteException - in the event of remote object failure.

getItem

public MetadataInterface getItem(java.lang.String name,
                                 java.lang.String metadataType)
                          throws ServiceException,
                                 java.rmi.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.
java.rmi.RemoteException - in the event of remote object failure.

getItemByType

public MetadataInterface getItemByType(java.lang.String name,
                                       java.lang.String metadataType)
                                throws ServiceException,
                                       java.rmi.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.
java.rmi.RemoteException - in the event of remote object failure.

getItem

public MetadataInterface getItem(java.lang.String name,
                                 java.lang.Class itemClass)
                          throws ServiceException,
                                 java.rmi.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.
java.rmi.RemoteException - in the event of remote object failure.

getItemByClass

public MetadataInterface getItemByClass(java.lang.String name,
                                        java.lang.Class itemClass)
                                 throws ServiceException,
                                        java.rmi.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.
java.rmi.RemoteException - in the event of remote object failure.

getSubfolders

public java.util.List getSubfolders()
                             throws ServiceException,
                                    java.rmi.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.
java.rmi.RemoteException - in the event of remote object failure.

getSubfolder

public FolderInterface getSubfolder(java.lang.String name)
                             throws ServiceException,
                                    java.rmi.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.
java.rmi.RemoteException - in the event of remote object failure.

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




Copyright © 2009 SAS Institute Inc. All Rights Reserved.