|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FolderInterface
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.
Field Summary | |
---|---|
static java.lang.String |
FOLDER_TYPE_BIP
The type string that most BIP applications like. |
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 |
Method Summary | |
---|---|
void |
addItem(MetadataInterface item)
Add an item to the folder. |
MetadataInterface |
addNewItem(java.lang.String name,
java.lang.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(java.lang.String name)
Delete a subfolder. |
java.util.Date |
getContentCreateDate()
Get the content create date. |
ContentInfo |
getContentInfo()
Returns the ContentInfo object corresponding to the root of the given PathUrl. |
java.util.Date |
getContentModifyDate()
Get the content modification date. |
java.lang.String |
getFolderType()
Get the folder type. |
MetadataInterface |
getItem(java.lang.String name)
Get a named item from the folder. |
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 |
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.util.List |
getItemSublist(int start,
int end)
Get a sublist of items from this folder |
java.util.List |
getItemSublist(int start,
int end,
java.lang.String sort)
Get a sublist of items from this folder which are sorted. |
FolderInterface |
getParent()
Get parent folder. |
java.lang.String |
getPath()
Get path of the current folder. |
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. |
int |
getTotalNumberOfItems()
Get the total number of items in this folder |
boolean |
hasDuplicate(java.lang.String name,
java.lang.String type)
Check if there's a duplicate object in this folder with the same name and of the same type. |
boolean |
hasDuplicateSubfolder(java.lang.String name)
Check if this folder already has a subfolder with the given name. |
boolean |
isEmpty()
Returns true if this folder has no subfolders and no member objects. |
boolean |
isItemNameUnique(MetadataInterface member)
Validate that the name of the metadata object is unique within the Folder. |
FolderInterface |
makeSubfolder(java.lang.String name)
Makes a subfolder under the current folder. |
FolderInterface |
makeSubfolder(java.lang.String name,
java.lang.String type)
Make a subfolder of a specific type. |
boolean |
moveMembersOnOverflow()
Check for too many objects in a folder. |
void |
removeItem(MetadataInterface item)
Remove an item from the folder. |
void |
removeSubfolder(java.lang.String name)
Remove a subfolder from the current folder. |
void |
setContentCreateDate(java.util.Date date)
Set the Date that the content folder was created. |
void |
setContentModifyDate(java.util.Date date)
Set the date when an object was last added to or removed from this folder. |
void |
setFolderType(java.lang.String type)
Set the folder type. |
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, getName, getObjectURI, getPathUrl, getProcessorInterface, getTypeDescriptor |
Field Detail |
---|
static final java.lang.String FOLDER_TYPE_BIP
Method Detail |
---|
java.lang.String getPath() throws java.rmi.RemoteException
java.rmi.RemoteException
- in the event of remote object failure.java.util.List getItems() throws ServiceException, java.rmi.RemoteException
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.java.util.List getItemsByType(java.lang.String metadataType) throws ServiceException, java.rmi.RemoteException
metadataType
- A String that will match the output
from the object's getType method.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.java.util.List getItemsByClass(java.lang.Class itemClass) throws ServiceException, java.rmi.RemoteException
itemClass
- The Class used to filter the folder
objects to return.
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.MetadataInterface getItem(java.lang.String name) throws ServiceException, java.rmi.RemoteException
name
- The name of the object to return.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.MetadataInterface getItemByType(java.lang.String name, java.lang.String metadataType) throws ServiceException, java.rmi.RemoteException
name
- The name of the object to return.metadataType
- The type of object to return.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.MetadataInterface getItemByClass(java.lang.String name, java.lang.Class itemClass) throws ServiceException, java.rmi.RemoteException
name
- The name of the object to return.itemClass
- The Class of the object to return.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.java.util.List getSubfolders() throws ServiceException, java.rmi.RemoteException
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.FolderInterface getSubfolder(java.lang.String name) throws ServiceException, java.rmi.RemoteException
name
- The name of the folder to return.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.void addItem(MetadataInterface item) throws ServiceException, java.rmi.RemoteException
item
- The item to add to this folder.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.MetadataInterface addNewItem(java.lang.String name, java.lang.String type) throws ServiceException, java.rmi.RemoteException
name
- The name of the new object.type
- The repository-specific type of the new object.
ServiceException
- In the event of repository failure.
java.rmi.RemoteException
- In the event of remote object failure.void removeItem(MetadataInterface item) throws ServiceException, java.rmi.RemoteException
item
- The item to remove from this folder.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.void deleteItem(MetadataInterface item) throws ServiceException, java.rmi.RemoteException
item
- The item to delete from this folder.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.FolderInterface makeSubfolder(java.lang.String name, java.lang.String type) throws ServiceException, java.rmi.RemoteException
name
- The name of the new subfolder.type
- The smart object type of the new subfolder.
ServiceException
- If the type is not a FolderInterface
derivative, or if a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.FolderInterface makeSubfolder(java.lang.String name) throws ServiceException, java.rmi.RemoteException
name
- The name of the folder to create.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.void addSubfolder(FolderInterface folder) throws ServiceException, java.rmi.RemoteException
folder
- The folder to add to this one as a subfolder.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.void removeSubfolder(java.lang.String name) throws ServiceException, java.rmi.RemoteException
name
- The name of the subfolder to remove.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.void deleteSubfolder(java.lang.String name) throws ServiceException, java.rmi.RemoteException
name
- The name of the subfolder to delete.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.FolderInterface getParent() throws ServiceException, java.rmi.RemoteException
If the current folder has more than one parent, the preferred (first) parent folder is returned.
getParent
in interface MetadataInterface
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.void setFolderType(java.lang.String type) throws ServiceException, java.rmi.RemoteException
type
- The String indicating the type of the folder.
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.java.lang.String getFolderType() throws ServiceException, java.rmi.RemoteException
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.java.util.List getItemSublist(int start, int end) throws java.rmi.RemoteException, ServiceException
start
- item number to start atend
- item number to end at
java.rmi.RemoteException
ServiceException
java.util.List getItemSublist(int start, int end, java.lang.String sort) throws java.rmi.RemoteException, ServiceException
start
- item number to start atend
- item number to end atsort
- one of name, namedescending, desc, descdescending, date, datedescending, type, typedescending, defaults to name
java.rmi.RemoteException
ServiceException
int getTotalNumberOfItems() throws java.rmi.RemoteException, ServiceException
java.rmi.RemoteException
ServiceException
boolean hasDuplicate(java.lang.String name, java.lang.String type) throws ServiceException, java.rmi.RemoteException
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.
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.boolean hasDuplicateSubfolder(java.lang.String name) throws ServiceException, java.rmi.RemoteException
name
- The name of the subfolder to check for.
ServiceException
- If a metadata server, or other service level error occurs.
java.rmi.RemoteException
- In the event of remote object failure.boolean isEmpty() throws ServiceException, java.rmi.RemoteException
getSubfolders()
and
getItems()
return empty lists due to objects hidden
by access controls.
ServiceException
- If a metadata server, or other service level error occurs.
java.rmi.RemoteException
- In the event of remote object failure.ContentInfo getContentInfo() throws ServiceException, java.rmi.RemoteException
ContentInfo
object corresponding to the root of the given PathUrl.
Implementation Note: computed results are cached; repeated calls are not expensive.
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.java.util.Date getContentCreateDate() throws ServiceException, java.rmi.RemoteException
ServiceException
- If a service level error occured.
java.rmi.RemoteException
- In the event of remote object failure.void setContentCreateDate(java.util.Date date) throws ServiceException, java.rmi.RemoteException
date
- The date that the mapped content folder was created.
ServiceException
- If a service level error occured.
java.rmi.RemoteException
- In the event of remote object failure.java.util.Date getContentModifyDate() throws ServiceException, java.rmi.RemoteException
ServiceException
- If a service level error occured.
java.rmi.RemoteException
- In the event of remote object failure.void setContentModifyDate(java.util.Date date) throws ServiceException, java.rmi.RemoteException
date
- The last time the contents of this folder were modified.
ServiceException
- If a service level error occured.
java.rmi.RemoteException
- In the event of remote object failure.boolean isItemNameUnique(MetadataInterface member) throws ServiceException, java.rmi.RemoteException
member
- The item to check for a unique name in the folder.
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.boolean moveMembersOnOverflow() throws ServiceException, java.rmi.RemoteException
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |