|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.information.metadata.VirtualFolder
public class VirtualFolder
An implementation of a virtual folder. Virtual folders are different from normal folder
smart objects in that they do not exist within metadata. Because of this, a virtual folder
cannot be modified. In fact, most of the methods in this implementatation throw an
UnsupportedOperationException
.
A virtual folder should only be managed/created within the VirtualFolderManager
class.
Field Summary | |
---|---|
protected java.util.Map<java.lang.String,com.sas.services.information.publicobject.ProcessorInterface> |
_actionInterfaces
|
protected java.lang.String |
_id
|
protected java.util.List<PublicObjectInterface> |
_members
|
protected java.lang.String |
_name
|
protected java.util.List<SearchFilter> |
_origSearchFilters
|
protected FolderInterface |
_parentFolder
The parent folder. |
protected RepositoryInterface |
_repository
|
protected Search |
_searchManager
|
protected java.util.List<VirtualFolderInterface> |
_subFolders
|
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 |
Method Summary | |
---|---|
void |
addChild(PublicObjectInterface newChild)
Add a child to this container. |
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 |
addSubfolder(VirtualFolderInterface folder)
Adds a nested virtual folder. |
void |
deleteItem(MetadataInterface item)
Delete an item from this folder. |
void |
deleteSubfolder(java.lang.String name)
Delete a subfolder. |
PublicObjectInterface |
getChildAt(int index)
Returns a child item at the specified location |
int |
getChildCount()
Returns the number of children within this container. |
java.util.List<PublicObjectInterface> |
getChildren()
Get a List of the children of this container. |
java.util.List |
getChildren(java.lang.String type)
Get a list of children of a specific type. |
PublicObjectContainerInterface |
getContainer()
Get the object which contains this object. |
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. |
java.lang.String |
getIdentifier()
Get the unique ID of this object. |
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 publicType)
Get a named item from the folder. |
java.util.List<MetadataInterface> |
getItems()
List all items in the folder. |
java.util.List<MetadataInterface> |
getItemsByClass(java.lang.Class itemClass)
List the items in the folder that match the Class passed in as a parameter. |
java.util.List<MetadataInterface> |
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. |
java.lang.String |
getName()
Get the name of this object. |
protected java.util.List<SearchFilter> |
getOriginalFilters()
|
FolderInterface |
getParent()
Return the FolderInterface that contains this object. |
java.lang.String |
getPath()
Get path of the current folder. |
PathUrl |
getPathUrl()
Get the SBIP URL. |
com.sas.services.information.publicobject.ProcessorInterface |
getProcessorInterface(java.lang.String interfaceClassName)
Get the specified action interface. |
java.lang.String |
getReposId()
Get the repository ID for the item. |
RepositoryInterface |
getRepository()
Get the handle to the repository for this object. |
Search |
getSearchManager()
Returns the search manager that is used to populate the contents of a virtual 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 |
java.lang.String |
getType()
Get the object type. |
TypeDescriptorInterface |
getTypeDescriptor()
Get the type descriptor which should have the information from the Type Dictionary in metadata available for the clients. |
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. |
void |
insertChild(PublicObjectInterface child,
int index)
Inserts a child into the parent container at the specified index. |
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. |
PublicObjectInterface |
newChild(java.lang.String type,
java.lang.String name)
Create a new metadata object and add it to the container. |
void |
refresh()
Refresh the data for this object from the repository. |
void |
removeChild(PublicObjectInterface child)
Remove a child from this container. |
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. |
void |
setRepository(RepositoryInterface repository)
Set the repository that this item exists in. |
void |
setSearchManager(Search search)
|
java.lang.String |
toString()
|
Methods inherited from interface com.sas.services.information.publicobject.PublicObjectInterface |
---|
addProcessorInterface, getObjectURI |
Field Detail |
---|
protected FolderInterface _parentFolder
protected RepositoryInterface _repository
protected Search _searchManager
protected java.util.Map<java.lang.String,com.sas.services.information.publicobject.ProcessorInterface> _actionInterfaces
protected java.util.List<PublicObjectInterface> _members
protected java.util.List<VirtualFolderInterface> _subFolders
protected java.lang.String _name
protected java.lang.String _id
protected java.util.List<SearchFilter> _origSearchFilters
Method Detail |
---|
public java.lang.String getIdentifier() throws ServiceException, java.rmi.RemoteException
PublicObjectInterface
getIdentifier
in interface PublicObjectInterface
getIdentifier
in class VirtualMetadata
ServiceException
java.rmi.RemoteException
public java.lang.String getReposId() throws java.rmi.RemoteException
MetadataInterface
getReposId
in interface MetadataInterface
getReposId
in class VirtualMetadata
java.rmi.RemoteException
- if an error occurspublic void refresh() throws ServiceException, java.rmi.RemoteException
MetadataInterface
refresh
in interface MetadataInterface
refresh
in class VirtualMetadata
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.public java.lang.String getName() throws java.rmi.RemoteException
PublicObjectInterface
getName
in interface PublicObjectInterface
getName
in class VirtualMetadata
java.rmi.RemoteException
public Search getSearchManager() throws ServiceException, java.rmi.RemoteException
VirtualFolderInterface
getSearchManager
in interface VirtualFolderInterface
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
public void setSearchManager(Search search) throws ServiceException, java.rmi.RemoteException
ServiceException
java.rmi.RemoteException
protected java.util.List<SearchFilter> getOriginalFilters()
public RepositoryInterface getRepository() throws java.rmi.RemoteException
MetadataInterface
getRepository
in interface MetadataInterface
getRepository
in class VirtualMetadata
java.rmi.RemoteException
- if an error occurspublic void setRepository(RepositoryInterface repository) throws java.lang.IllegalStateException, java.rmi.RemoteException
MetadataInterface
setRepository
in interface MetadataInterface
setRepository
in class VirtualMetadata
repository
- A handle to the repository for this object.
java.lang.IllegalStateException
- If the repository has already been set.
java.rmi.RemoteException
- if an error occurspublic PublicObjectContainerInterface getContainer() throws ServiceException, java.rmi.RemoteException
PublicObjectInterface
getContainer
in interface PublicObjectInterface
getContainer
in class VirtualMetadata
ServiceException
java.rmi.RemoteException
public FolderInterface getParent() throws ServiceException, java.rmi.RemoteException
MetadataInterface
getParent
in interface FolderInterface
getParent
in interface MetadataInterface
getParent
in class VirtualMetadata
ServiceException
- if an error occurs
java.rmi.RemoteException
- if an error occurspublic java.lang.String getPath() throws java.rmi.RemoteException
FolderInterface
getPath
in interface FolderInterface
java.rmi.RemoteException
- in the event of remote object failure.public PathUrl getPathUrl() throws java.lang.IllegalStateException, ServiceException, java.rmi.RemoteException
PublicObjectInterface
getPathUrl
in interface PublicObjectInterface
getPathUrl
in class VirtualMetadata
PathUrl
value with the object's location in a
rooted tree. If the object isn't in a rooted tree, null is returned.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- if a remote object error occurs.
java.lang.IllegalStateException
public java.lang.String getType() throws java.rmi.RemoteException
MetadataInterface
getType
in interface MetadataInterface
getType
in class VirtualMetadata
java.rmi.RemoteException
- if an error occurspublic TypeDescriptorInterface getTypeDescriptor() throws ServiceException, java.rmi.RemoteException
PublicObjectInterface
getTypeDescriptor
in interface PublicObjectInterface
getTypeDescriptor
in class VirtualMetadata
ServiceException
java.rmi.RemoteException
public java.lang.String getFolderType() throws ServiceException, java.rmi.RemoteException
FolderInterface
getFolderType
in interface FolderInterface
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.public com.sas.services.information.publicobject.ProcessorInterface getProcessorInterface(java.lang.String interfaceClassName) throws ServiceException, java.rmi.RemoteException
PublicObjectInterface
getProcessorInterface
in interface PublicObjectInterface
getProcessorInterface
in class VirtualMetadata
ServiceException
java.rmi.RemoteException
public MetadataInterface getItem(java.lang.String name) throws ServiceException, java.rmi.RemoteException
FolderInterface
getItem
in interface FolderInterface
name
- The name of the object to return.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.public MetadataInterface getItemByClass(java.lang.String name, java.lang.Class itemClass) throws ServiceException, java.rmi.RemoteException
FolderInterface
getItemByClass
in interface FolderInterface
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.public MetadataInterface getItemByType(java.lang.String name, java.lang.String publicType) throws ServiceException, java.rmi.RemoteException
FolderInterface
getItemByType
in interface FolderInterface
name
- The name of the object to return.publicType
- The type of object to return.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.public java.util.List<MetadataInterface> getItems() throws ServiceException, java.rmi.RemoteException
FolderInterface
getItems
in interface FolderInterface
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.public java.util.List<MetadataInterface> getItemsByClass(java.lang.Class itemClass) throws ServiceException, java.rmi.RemoteException
FolderInterface
getItemsByClass
in interface FolderInterface
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.public java.util.List<MetadataInterface> getItemsByType(java.lang.String metadataType) throws ServiceException, java.rmi.RemoteException
FolderInterface
getItemsByType
in interface FolderInterface
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.public void addSubfolder(VirtualFolderInterface folder) throws ServiceException, java.rmi.RemoteException
VirtualFolderInterface
addSubfolder
in interface VirtualFolderInterface
folder
- a sub or nested virtual folder
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
public FolderInterface getSubfolder(java.lang.String name) throws ServiceException, java.rmi.RemoteException
FolderInterface
getSubfolder
in interface FolderInterface
name
- The name of the folder to return.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.public java.util.List getSubfolders() throws ServiceException, java.rmi.RemoteException
FolderInterface
getSubfolders
in interface FolderInterface
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.public int getTotalNumberOfItems() throws java.rmi.RemoteException, ServiceException
FolderInterface
getTotalNumberOfItems
in interface FolderInterface
java.rmi.RemoteException
ServiceException
public boolean hasDuplicate(java.lang.String name, java.lang.String type) throws ServiceException, java.rmi.RemoteException
FolderInterface
hasDuplicate
in interface FolderInterface
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.public boolean hasDuplicateSubfolder(java.lang.String name) throws ServiceException, java.rmi.RemoteException
FolderInterface
hasDuplicateSubfolder
in interface FolderInterface
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.public boolean isEmpty() throws ServiceException, java.rmi.RemoteException
FolderInterface
FolderInterface.getSubfolders()
and
FolderInterface.getItems()
return empty lists due to objects hidden
by access controls.
isEmpty
in interface FolderInterface
ServiceException
- If a metadata server, or other service level error occurs.
java.rmi.RemoteException
- In the event of remote object failure.public boolean isItemNameUnique(MetadataInterface member) throws ServiceException, java.rmi.RemoteException
FolderInterface
isItemNameUnique
in interface FolderInterface
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.public void addChild(PublicObjectInterface newChild) throws ServiceException, java.rmi.RemoteException
MutableContainerInterface
addChild
in interface MutableContainerInterface
newChild
- The new child object to add to this container.
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.public java.util.List<PublicObjectInterface> getChildren() throws ServiceException, java.rmi.RemoteException
PublicObjectContainerInterface
getChildren
in interface PublicObjectContainerInterface
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.public int getChildCount() throws ServiceException, java.rmi.RemoteException
PublicObjectContainerInterface
getChildCount
in interface PublicObjectContainerInterface
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.public java.lang.String toString()
toString
in class java.lang.Object
public void removeChild(PublicObjectInterface child) throws ServiceException, java.rmi.RemoteException
MutableContainerInterface
removeChild
in interface MutableContainerInterface
child
- The child to remove from this container.
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.public void insertChild(PublicObjectInterface child, int index) throws ServiceException, java.rmi.RemoteException
MutableContainerInterface
insertChild
in interface MutableContainerInterface
child
- the new child to add to this containerindex
- the index where the child is to be inserted into
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.public PublicObjectInterface getChildAt(int index) throws ServiceException, java.rmi.RemoteException
PublicObjectContainerInterface
getChildAt
in interface PublicObjectContainerInterface
index
- the index of the child
ServiceException
java.rmi.RemoteException
public java.util.List getChildren(java.lang.String type) throws ServiceException, java.rmi.RemoteException
PublicObjectContainerInterface
getChildren
in interface PublicObjectContainerInterface
type
- The "type abbreviation" which will be used to filter the
children returned from the container.
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.public PublicObjectInterface newChild(java.lang.String type, java.lang.String name) throws ServiceException, java.rmi.RemoteException
PublicObjectContainerInterface
newChild
in interface PublicObjectContainerInterface
type
- The public object type to add to the container.name
- The name of the new object
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object faiure.public java.util.List getItemSublist(int start, int end) throws java.rmi.RemoteException, ServiceException
FolderInterface
getItemSublist
in interface FolderInterface
start
- item number to start atend
- item number to end at
java.rmi.RemoteException
ServiceException
public java.util.List getItemSublist(int start, int end, java.lang.String sort) throws java.rmi.RemoteException, ServiceException
FolderInterface
getItemSublist
in interface FolderInterface
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
public FolderInterface makeSubfolder(java.lang.String name, java.lang.String type) throws ServiceException, java.rmi.RemoteException
FolderInterface
makeSubfolder
in interface FolderInterface
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.public FolderInterface makeSubfolder(java.lang.String name) throws ServiceException, java.rmi.RemoteException
FolderInterface
makeSubfolder
in interface FolderInterface
name
- The name of the folder to create.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.public void addItem(MetadataInterface item) throws ServiceException, java.rmi.RemoteException
FolderInterface
addItem
in interface FolderInterface
item
- The item to add to this folder.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.public MetadataInterface addNewItem(java.lang.String name, java.lang.String type) throws ServiceException, java.rmi.RemoteException
FolderInterface
addNewItem
in interface FolderInterface
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.public void addSubfolder(FolderInterface folder) throws ServiceException, java.rmi.RemoteException
FolderInterface
addSubfolder
in interface FolderInterface
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.public void deleteItem(MetadataInterface item) throws ServiceException, java.rmi.RemoteException
FolderInterface
deleteItem
in interface FolderInterface
item
- The item to delete from this folder.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.public void deleteSubfolder(java.lang.String name) throws ServiceException, java.rmi.RemoteException
FolderInterface
deleteSubfolder
in interface FolderInterface
name
- The name of the subfolder to delete.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.public java.util.Date getContentCreateDate() throws ServiceException, java.rmi.RemoteException
FolderInterface
getContentCreateDate
in interface FolderInterface
ServiceException
- If a service level error occured.
java.rmi.RemoteException
- In the event of remote object failure.public ContentInfo getContentInfo() throws ServiceException, java.rmi.RemoteException
FolderInterface
ContentInfo
object corresponding to the root of the given PathUrl.
Implementation Note: computed results are cached; repeated calls are not expensive.
getContentInfo
in interface FolderInterface
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.public java.util.Date getContentModifyDate() throws ServiceException, java.rmi.RemoteException
FolderInterface
getContentModifyDate
in interface FolderInterface
ServiceException
- If a service level error occured.
java.rmi.RemoteException
- In the event of remote object failure.public boolean moveMembersOnOverflow() throws ServiceException, java.rmi.RemoteException
FolderInterface
moveMembersOnOverflow
in interface FolderInterface
ServiceException
- If a repository error occurs.
java.rmi.RemoteException
- In the event of remote object failure.public void removeItem(MetadataInterface item) throws ServiceException, java.rmi.RemoteException
FolderInterface
removeItem
in interface FolderInterface
item
- The item to remove from this folder.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.public void removeSubfolder(java.lang.String name) throws ServiceException, java.rmi.RemoteException
FolderInterface
removeSubfolder
in interface FolderInterface
name
- The name of the subfolder to remove.
ServiceException
- if a repository error occurs.
java.rmi.RemoteException
- in the event of remote object failure.public void setContentCreateDate(java.util.Date date) throws ServiceException, java.rmi.RemoteException
FolderInterface
setContentCreateDate
in interface FolderInterface
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.public void setContentModifyDate(java.util.Date date) throws ServiceException, java.rmi.RemoteException
FolderInterface
setContentModifyDate
in interface FolderInterface
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.public void setFolderType(java.lang.String type) throws ServiceException, java.rmi.RemoteException
FolderInterface
setFolderType
in interface FolderInterface
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.
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |