public class CatalogTemplateList extends ListPackManager implements ItemManager
ServerSettings.getCatalogTemplates()
or a list of user catalog templates from calling User.getCatalogTemplates()
.BaseManager.PackEntryChangeListener, BaseManager.RegistryEntry
TYPE_EJP, TYPE_NATIVE
Modifier and Type | Method and Description |
---|---|
CatalogTemplate |
copy(java.lang.String newName,
CatalogSettingsRoot copySource)
Copies the given catalog into a new Catalog Template and stores the result under the specified name.
|
CatalogTemplate |
copy(java.lang.String newName,
CatalogSettingsRoot copySource,
boolean copyDisplayNames,
boolean copyDescriptions)
Copies the given catalog into a new Catalog Template and stores the result under the specified name.
|
CatalogTemplate |
copy(java.lang.String newName,
CatalogTemplate copySource)
Duplicates the given catalog template and stores the result under the specified name.
|
CatalogTemplate |
copy(java.lang.String newName,
CatalogTemplate copySource,
boolean copyDisplayNames,
boolean copyDescriptions)
Duplicates the given catalog template and stores the result under the specified name.
|
Item |
copy(java.lang.String id,
Item item,
boolean copyDisplayNames,
boolean copyDescriptions)
Duplicates the given item with the specified UID.
|
void |
delete(CatalogTemplate setToDelete)
Deletes the given catalog template.
|
void |
delete(Item item)
Deletes the given item.
|
CatalogTemplate |
getCatalogTemplate(java.lang.String name)
Returns the catalog template for the given name.
|
java.util.List<java.lang.String> |
getCatalogTemplateNames()
Return a list of catalog template 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.
|
CatalogTemplate |
importSet(JPack data,
SetImportDuplicatesMode duplicatesMode)
Imports the given exported set data into a new set.
|
void |
rename(java.lang.String newName,
CatalogTemplate setToRename)
Renames the given catalog template to the new specified name.
|
void |
rename(java.lang.String newName,
CatalogTemplate setToRename,
boolean keepDisplayNames,
boolean keepDescriptions)
Renames the given catalog template to the new specified name.
|
void |
rename(java.lang.String newID,
Item item,
boolean keepDisplayNames,
boolean keepDescriptions)
Renames the given item to the new UID.
|
void |
setAsDefault(CatalogTemplate newDefaultSet)
Sets the given catalog template as the default catalog template.
|
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 CatalogTemplate copy(java.lang.String newName, CatalogTemplate copySource) throws CumulusException, javax.naming.InvalidNameException
newName
- the name of the new catalog templatecopySource
- the source catalog template to copyCumulusException
- in case of an errorjavax.naming.InvalidNameException
- in case of an invalid or already used namepublic CatalogTemplate copy(java.lang.String newName, CatalogTemplate copySource, boolean copyDisplayNames, boolean copyDescriptions) throws CumulusException, javax.naming.InvalidNameException
newName
- the name of the new catalog templatecopySource
- the source catalog template to copycopyDisplayNames
- true if display names should be copied as wellcopyDescriptions
- true if descriptions should be copied as wellCumulusException
- in case of an errorjavax.naming.InvalidNameException
- in case of an invalid or already used namepublic CatalogTemplate importSet(JPack data, SetImportDuplicatesMode duplicatesMode) throws CumulusException, PermissionDeniedException
data
- set that had been exported using CatalogTemplate.exportSet()
beforeduplicatesMode
- mode to handle duplicate templatesPermissionDeniedException
- if you are not cumulus adminCumulusException
- in case of an server errorCatalogTemplate.exportSet()
public CatalogTemplate copy(java.lang.String newName, CatalogSettingsRoot copySource) throws CumulusException, javax.naming.InvalidNameException
newName
- the name of the new catalog templatecopySource
- the source catalog to copyCumulusException
- in case of an errorjavax.naming.InvalidNameException
- in case of an invalid or already used namepublic CatalogTemplate copy(java.lang.String newName, CatalogSettingsRoot copySource, boolean copyDisplayNames, boolean copyDescriptions) throws CumulusException, javax.naming.InvalidNameException
newName
- the name of the new catalog templatecopySource
- the source catalog to copycopyDisplayNames
- true if display names should be copied as wellcopyDescriptions
- true if descriptions should be copied as wellCumulusException
- in case of an errorjavax.naming.InvalidNameException
- in case of an invalid or already used namepublic void rename(java.lang.String newName, CatalogTemplate setToRename) throws CumulusException, javax.naming.InvalidNameException
newName
- the new name for the catalog templatesetToRename
- the catalog template to renameCumulusException
- in case of an errorjavax.naming.InvalidNameException
- in case of an invalid namepublic void rename(java.lang.String newName, CatalogTemplate setToRename, boolean keepDisplayNames, boolean keepDescriptions) throws CumulusException, javax.naming.InvalidNameException
newName
- the new name for the catalog templatesetToRename
- the catalog template to renamekeepDisplayNames
- true if display names should be keptkeepDescriptions
- true if descriptions should be keptCumulusException
- in case of an errorjavax.naming.InvalidNameException
- in case of an invalid namepublic void delete(CatalogTemplate setToDelete) throws CumulusException
setToDelete
- the catalog template to deleteCumulusException
- in case of an errorpublic java.util.List<java.lang.String> getCatalogTemplateNames()
String
public void setAsDefault(CatalogTemplate newDefaultSet)
newDefaultSet
- the new default catalog templatepublic CatalogTemplate getCatalogTemplate(java.lang.String name)
name
- the name of the catalog template to returnpublic Item copy(java.lang.String id, Item item, boolean copyDisplayNames, boolean copyDescriptions) throws javax.naming.InvalidNameException, CumulusException
ItemManager
copy
in interface ItemManager
id
- the UID of the new itemitem
- 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
ItemManager
delete
in interface ItemManager
item
- the item to deleteCumulusException
- in case of an errorpublic Item getItem(java.lang.String id)
ItemManager
getItem
in interface ItemManager
id
- the items UID to getpublic java.util.Collection<java.lang.String> getItemIDs()
ItemManager
getItemIDs
in interface ItemManager
public void rename(java.lang.String newID, Item item, boolean keepDisplayNames, boolean keepDescriptions) throws javax.naming.InvalidNameException, CumulusException
ItemManager
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)
ItemManager
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.