|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FavoritesContainer
Base interface used for any favorites container object, such as a FavoritesFolder or a FavoritesGroup. This interface contains the common methods used by these containers.
Field Summary | |
---|---|
static int |
CAPACITY_UNLIMITED
Constant used to indicate that the container can hold an unlimited number of favorites. |
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 |
addFavorite(MetadataInterface favorite)
Adds a new item to the list of favorites. |
void |
addFavoritesGroup(FavoritesGroup subGroup)
Adds a new child group to this container. |
boolean |
containsFavorite(MetadataInterface favorite)
Returns true if the specified object is a direct member of this container. |
int |
getFavoriteCount()
Returns the number of favorites in this container. |
int |
getFavoriteIndex(MetadataInterface favorite)
Returns the index of the specified favorite, or -1 if the favorite does not exist within this container. |
java.util.List<MetadataInterface> |
getFavorites()
Returns the list of all favorites contained within this container. |
java.util.List<MetadataInterface> |
getFavorites(SortOrder[] order)
Deprecated. should not be used |
int |
getFavoritesGroupIndex(FavoritesGroup subGroup)
Returns the index of the specified favorites group, or -1 if the group does not exist within this container. |
java.util.List<FavoritesGroup> |
getFavoritesGroups()
Returns the list of all favorites groups contained within this container. |
int |
getMaxCapacity()
Returns the maximum number of favorites allowed under this container. |
int |
getTotalFavoriteCount()
Returns the number of favorites in this container, as well as any nested favorites groups, recursively. |
boolean |
hasDuplicateFavoritesGroup(java.lang.String name)
Check if there's a duplicate favorites group in this container with the same name. |
void |
insertFavorite(MetadataInterface favorite,
int index)
Inserts a new item to the list of favorites at the specified index. |
void |
insertFavoritesGroup(FavoritesGroup subGroup,
int index)
Inserts a new child group to this container at the specified index. |
boolean |
isEmpty()
Returns true if this container has no elements, either favorites or child favorite groups. |
void |
moveFavorite(MetadataInterface favorite,
int newPosition)
Deprecated. use removeFavorite(MetadataInterface) and insertFavorite(MetadataInterface, int) |
void |
removeAll()
Clears the container by removing all favorites and favorites groups, recursively. |
void |
removeAllFavorites()
Removes all existing favorites from this particular container. |
void |
removeAllFavoritesGroups()
Removes all existing child favorite groups from this particular container. |
void |
removeFavorite(MetadataInterface favorite)
Removes the specified object from the list of favorites. |
void |
removeFavoritesGroup(FavoritesGroup subGroup)
Removes the specified object from the list favorites groups. |
void |
setMaxCapacity(int capacity)
Sets the maximum number of favorites allowed to be contained within this folder at a given time. |
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 int CAPACITY_UNLIMITED
Method Detail |
---|
java.util.List<MetadataInterface> getFavorites() throws ServiceException, java.rmi.RemoteException
ServiceException
java.rmi.RemoteException
java.util.List<MetadataInterface> getFavorites(SortOrder[] order) throws ServiceException, java.rmi.RemoteException
null
value is passed in for the order, a default order
will be applied (sorting by name then type). An empty list will be returned if this folder
contains no favorites.
order
-
ServiceException
java.rmi.RemoteException
int getFavoriteIndex(MetadataInterface favorite) throws ServiceException, java.rmi.RemoteException
favorite
- the favorite to search for
ServiceException
java.rmi.RemoteException
int getFavoriteCount() throws ServiceException, java.rmi.RemoteException
ServiceException
java.rmi.RemoteException
int getTotalFavoriteCount() throws ServiceException, java.rmi.RemoteException
getFavoriteCount()
if a recursive search is not
needed. The returned count only includes objects that have been added as favorites. Nested
favorites groups are not included.
ServiceException
java.rmi.RemoteException
boolean containsFavorite(MetadataInterface favorite) throws ServiceException, java.rmi.RemoteException
favorite
- the favorite item
ServiceException
java.rmi.RemoteException
boolean isEmpty() throws ServiceException, java.rmi.RemoteException
ServiceException
java.rmi.RemoteException
void addFavorite(MetadataInterface favorite) throws ServiceException, java.rmi.RemoteException
favorite
- the favorite item
ServiceException
java.rmi.RemoteException
void insertFavorite(MetadataInterface favorite, int index) throws ServiceException, java.rmi.RemoteException
favorite
- the favorite itemindex
- the index where the favorite should be added
ServiceException
java.rmi.RemoteException
void removeFavorite(MetadataInterface favorite) throws ServiceException, java.rmi.RemoteException
favorite
- the favorite item
ServiceException
java.rmi.RemoteException
void removeAllFavorites() throws ServiceException, java.rmi.RemoteException
ServiceException
java.rmi.RemoteException
java.util.List<FavoritesGroup> getFavoritesGroups() throws ServiceException, java.rmi.RemoteException
ServiceException
java.rmi.RemoteException
int getFavoritesGroupIndex(FavoritesGroup subGroup) throws ServiceException, java.rmi.RemoteException
subGroup
- the favorites group to search for
ServiceException
java.rmi.RemoteException
void addFavoritesGroup(FavoritesGroup subGroup) throws ServiceException, java.rmi.RemoteException
subGroup
- the child favorites group
ServiceException
java.rmi.RemoteException
void insertFavoritesGroup(FavoritesGroup subGroup, int index) throws ServiceException, java.rmi.RemoteException
subGroup
- the child favorites groupindex
- the index where the group should be added
ServiceException
java.rmi.RemoteException
void removeFavoritesGroup(FavoritesGroup subGroup) throws ServiceException, java.rmi.RemoteException
Important: Removing the favorites group will remove the object from its association with its parent container. This will essentially leave the group orphaned, but it will not delete it from the metadata server. The group will need to be either deleted or re-added to another (or same) favorites container.
subGroup
- the child favorites group
ServiceException
java.rmi.RemoteException
void removeAllFavoritesGroups() throws ServiceException, java.rmi.RemoteException
Important: Removing the favorites group will remove the object from its association with its parent container. This will essentially leave the group orphaned, but it will not delete it from the metadata server. The group will need to be either deleted or re-added to another (or same) favorites container.
ServiceException
java.rmi.RemoteException
void removeAll() throws ServiceException, java.rmi.RemoteException
ServiceException
java.rmi.RemoteException
boolean hasDuplicateFavoritesGroup(java.lang.String name) throws ServiceException, java.rmi.RemoteException
name
- the name to check for.
ServiceException
java.rmi.RemoteException
void setMaxCapacity(int capacity) throws ServiceException, java.rmi.RemoteException
If an object is added as a favorite such that it exceeds the capacity settings, the favorites container will remove the oldest value. This way the container will never contain more objects than what's specified by the capacity.
capacity
- the maximum capacity of favorites allowed in this container
ServiceException
java.rmi.RemoteException
int getMaxCapacity() throws ServiceException, java.rmi.RemoteException
ServiceException
java.rmi.RemoteException
void moveFavorite(MetadataInterface favorite, int newPosition) throws ServiceException, java.rmi.RemoteException
removeFavorite(MetadataInterface)
and insertFavorite(MetadataInterface, int)
favorite
- the favorite itemnewPosition
- the new position to move the item to
java.lang.IllegalArgumentException
- if the object does not exist within this container
ServiceException
java.rmi.RemoteException
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |