public class CollectionSetList extends ListPackManager implements ItemManager
ServerSettings.getCollectionsList()
or a list of user collection sets from calling User.getCollectionsList()
.BaseManager.PackEntryChangeListener, BaseManager.RegistryEntry
TYPE_EJP, TYPE_NATIVE
Modifier and Type | Method and Description |
---|---|
Item |
copy(java.lang.String newID,
Item src,
boolean copyDisplayNames,
boolean copyDescriptions)
Duplicates the given item with the specified UID.
|
CollectionSet |
create(java.lang.String newName,
CollectionType collectionType,
MultiRecordItemCollection multiRecordItemCollection)
Creates a new collection set using the given name.
|
CollectionSet |
create(java.lang.String collectionSetName,
CollectionType collectionType,
java.util.Set<Catalog> catalogs,
java.lang.String query,
java.util.EnumSet<FindFlag> flags,
java.util.Locale locale)
Creates a new query based collection set using the given name and type (supported type is
CollectionType.UPLOAD_COLLECTION ). |
void |
delete(CollectionSet collectionSetToDelete)
Deletes the given collection set.
|
void |
delete(Item item)
Deletes the given item.
|
CollectionSet |
getCollectionSet(java.lang.String name)
Returns the collection set for the given name.
|
java.util.List<java.lang.String> |
getCollectionSetNames()
Return a list of collection set names of this instance.
|
Item |
getItem(java.lang.String id)
Returns the item with the specified UID.
|
java.util.Collection<java.lang.String> |
getItemIDs()
Returns the list of item UIDs that are available by this manager instance.
|
int |
getItemType()
Returns the item type for the items of this manager.
|
java.lang.String |
getPath()
Returns the path for this item manager instance.
|
void |
rename(java.lang.String newID,
Item item,
boolean keepDisplayNames,
boolean keepDescriptions)
Renames the given item to the new UID.
|
void |
setAsDefault(Item item)
Sets the given item to be the default item.
|
addChangeListener, addChangeListener, addGlobalChangeListener, addPackListener, forgetPush, getPack, isShared, popPack, pushPack, removeChangeListener, removeChangeListener, removeGlobalChangeListener, removePackListener, save, save, toString, writeAsXML
public java.util.List<java.lang.String> getCollectionSetNames()
String
public CollectionSet create(java.lang.String newName, CollectionType collectionType, MultiRecordItemCollection multiRecordItemCollection) throws CumulusException, javax.naming.InvalidNameException
newName
- the name of the new setcollectionType
- the type of the new collection setmultiRecordItemCollection
- the collection to store in the new collection setCumulusException
- in case of an errorjavax.naming.InvalidNameException
- in case of an invalid or already used namepublic CollectionSet create(java.lang.String collectionSetName, CollectionType collectionType, java.util.Set<Catalog> catalogs, java.lang.String query, java.util.EnumSet<FindFlag> flags, java.util.Locale locale) throws CumulusException, javax.naming.InvalidNameException
CollectionType.UPLOAD_COLLECTION
).collectionSetName
- the name of the new setcollectionType
- type of the collection to createcatalogs
- Catalog instances referenced in the query stringquery
- the query to execute when opening this collectionflags
- The set of find flags to use for executing the query, see FindFlag
locale
- Locale to use when parsing locale dependent string values or null for the default localeCumulusException
- in case of an errorjavax.naming.InvalidNameException
- in case of an invalid or already used namepublic void delete(CollectionSet collectionSetToDelete) throws CumulusException
collectionSetToDelete
- the set to deleteCumulusException
- in case of an errorpublic CollectionSet getCollectionSet(java.lang.String name)
name
- the name of the set to returnpublic Item copy(java.lang.String newID, Item src, boolean copyDisplayNames, boolean copyDescriptions) throws javax.naming.InvalidNameException, CumulusException
copy
in interface ItemManager
newID
- the UID of the new itemsrc
- the item to copycopyDisplayNames
- true if display names should be copied as wellcopyDescriptions
- true if descriptions should be copied as welljavax.naming.InvalidNameException
- if the name is already in use or invalid for another reasonCumulusException
- in case of an errorpublic void delete(Item item) throws CumulusException
delete
in interface ItemManager
item
- the item to deleteCumulusException
- in case of an errorpublic Item getItem(java.lang.String id)
getItem
in interface ItemManager
id
- the items UID to getpublic java.util.Collection<java.lang.String> getItemIDs()
getItemIDs
in interface ItemManager
public void rename(java.lang.String newID, Item item, boolean keepDisplayNames, boolean keepDescriptions) throws javax.naming.InvalidNameException, CumulusException
rename
in interface ItemManager
newID
- the new item UIDitem
- the item to renamekeepDisplayNames
- true if display names should be keptkeepDescriptions
- true if descriptions should be keptjavax.naming.InvalidNameException
- in case of an invalid nameCumulusException
- in case of another errorpublic void setAsDefault(Item item)
setAsDefault
in interface ItemManager
item
- the item to be the defaultpublic java.lang.String getPath()
ItemManager
getPath
in interface ItemManager
public int getItemType()
ItemManager
getItemType
in interface ItemManager
www.canto.com
Canto, the Canto logo, the Cumulus logo, and Cumulus are registered trademarks of Canto GmbH, registered in the U.S. and other countries.