public class EmailClassesList extends ListPackManager implements ItemManager
Modifier and Type | Class and Description |
---|---|
static class |
EmailClassesList.PredefinedClassID |
BaseManager.PackEntryChangeListener, BaseManager.RegistryEntry
TYPE_EJP, TYPE_NATIVE
Modifier and Type | Method and Description |
---|---|
EmailClass |
copy(java.lang.String newName,
EmailClass copySource)
Duplicates the given email class and stores the result under the specified name.
|
EmailClass |
copy(java.lang.String newName,
EmailClass copySource,
boolean copyDisplayNames,
boolean copyDescriptions)
Duplicates the given email class and stores the result under the specified name.
|
Item |
copy(java.lang.String newID,
Item src,
boolean copyDisplayNames,
boolean copyDescriptions)
Duplicates the given email class with the specified class ID.
|
void |
delete(EmailClass emailClass)
Deletes the given email class.
|
void |
delete(Item item)
Deletes the given item.
|
EmailClass |
getEmailClass(GUID id)
Returns the email class for the given class id.
|
EmailClass |
getEmailClass(java.lang.String name)
Returns the email class for the given name.
|
java.util.List<EmailClass> |
getEmailClasses()
Returns all email classes contained in this list.
|
java.util.List<java.lang.String> |
getEmailClassesNames()
Return a list of email classes names of this instance.
|
java.util.Set<GUID> |
getEmailClassIDs()
Return a mapping of all contained email classes, with their internal ID pointing to their name.
|
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.
|
EmailClass |
importSet(JPack data,
SetImportDuplicatesMode duplicatesMode)
Imports the given exported email class data into a new email class.
|
void |
rename(java.lang.String newName,
EmailClass emailClass)
Renames the given email class to the new specified name.
|
void |
rename(java.lang.String newName,
EmailClass emailClass,
boolean keepDisplayNames,
boolean keepDescriptions)
Renames the given email class 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(EmailClass newDefault)
Sets the given email class as the default email class.
|
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 EmailClass copy(java.lang.String newName, EmailClass copySource) throws CumulusException, javax.naming.InvalidNameException
newName
- the name of the new setcopySource
- the source set to copyCumulusException
- in case of an errorjavax.naming.InvalidNameException
- in case of an invalid or already used namepublic EmailClass copy(java.lang.String newName, EmailClass copySource, boolean copyDisplayNames, boolean copyDescriptions) throws CumulusException, javax.naming.InvalidNameException
newName
- the name of the new email classcopySource
- the source set 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 EmailClass importSet(JPack data, SetImportDuplicatesMode duplicatesMode) throws CumulusException, PermissionDeniedException
data
- email class that had been exported using EmailClass.exportSet()
beforeduplicatesMode
- mode to handle duplicate setsPermissionDeniedException
- if you are not cumulus adminCumulusException
- in case of an server errorEmailClass.exportSet()
public void setAsDefault(EmailClass newDefault)
newDefault
- the new default email classpublic void rename(java.lang.String newName, EmailClass emailClass) throws CumulusException, javax.naming.InvalidNameException
newName
- the new name for the setemailClass
- the email class to renameCumulusException
- in case of an errorjavax.naming.InvalidNameException
- in case of an invalid namepublic void rename(java.lang.String newName, EmailClass emailClass, boolean keepDisplayNames, boolean keepDescriptions) throws CumulusException, javax.naming.InvalidNameException
newName
- the new name for the setemailClass
- the set 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(EmailClass emailClass) throws CumulusException
emailClass
- the email class to deleteCumulusException
- in case of an errorpublic java.util.List<java.lang.String> getEmailClassesNames()
String
public java.util.Set<GUID> getEmailClassIDs()
public EmailClass getEmailClass(java.lang.String name)
name
- the name of the email class to returnpublic EmailClass getEmailClass(GUID id)
id
- the class id of the email class to returnpublic java.util.List<EmailClass> getEmailClasses()
public Item copy(java.lang.String newID, Item src, boolean copyDisplayNames, boolean copyDescriptions) throws javax.naming.InvalidNameException, CumulusException
copy
in interface ItemManager
newID
- the ID 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.