|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Spec
Interface for the generic Spec object
Nested Class Summary | |
---|---|
static class |
Spec.Type
Possible Spec types |
Field Summary | |
---|---|
static java.lang.String |
copyright
|
Method Summary | |
---|---|
void |
addLocale(java.util.Locale locale)
Add the given locale to the list of existing locales of this spec |
AttributeDefinition |
createAttributeDefinition(java.lang.String path,
int order)
Create a new attribute definition under this spec. |
void |
delete()
Delete a spec |
AttributeDefinition |
getAttributeDefinition(java.lang.String path)
Return a specific AttributeDefinition by path, null if no AttributeDefinition with the given path is found. |
java.util.List<AttributeDefinition> |
getAttributeDefinitions()
Returns all Attribute Definitions of this Spec at all levels, an empty collection if none are present. |
java.util.Collection<java.util.Locale> |
getLocales()
Returns all associated Locales if this Spec is localized |
java.lang.String |
getName()
Returns the Spec Name |
AttributeDefinition |
getRootAttributeDefinition()
Returns the root attribute definition for the Spec. The root attribute definition is a virtual root of the tree of attribute definitions belonging to the spec. |
Spec.Type |
getType()
Get the spec type |
boolean |
isLocalized()
Identify whether this Spec is localized |
void |
removeAttributeDefinition(java.lang.String path)
Remove an attribute definition, returns null if attribute definition with the given path is not found |
void |
removeLocale(java.util.Locale locale)
Removes the given locale from this spec. |
void |
replaceLocales(java.util.Collection<java.util.Locale> locales)
Removes all of the the existing locales and sets the new ones passed to this method |
void |
save()
Save a spec |
void |
setLocalized(boolean localized)
Sets the localized property of this spec |
Field Detail |
---|
static final java.lang.String copyright
Method Detail |
---|
java.lang.String getName()
PIMInternalException
- If an internal error occursjava.util.List<AttributeDefinition> getAttributeDefinitions()
PIMInternalException
- If an internal error occurs
PIMAuthorizationException
- Reserved for future useAttributeDefinition getAttributeDefinition(java.lang.String path)
path
- Complete node path in the format PIMInternalException
- If an internal error occurs
java.lang.IllegalArgumentException
- If null or empty path is passed
PIMAuthorizationException
- Reserved for future useAttributeDefinition getRootAttributeDefinition()
PIMInternalException
- If an internal error occurs
PIMAuthorizationException
- Reserved for future useboolean isLocalized()
PIMInternalException
- If an internal error occursjava.util.Collection<java.util.Locale> getLocales()
PIMInternalException
- If an internal error occursAttributeDefinition createAttributeDefinition(java.lang.String path, int order)
path
- attribute definition path, can be a composite pathorder
- Position where the new attribute definition should get added.
If there is a already an attribute definition at the given position, new attribute
definition is added prior to the existing node. There can be holes in the order values
specified, attribute definitions are added according to their relative order within the spec tree.
PIMInternalException
- If an internal error occurs
java.lang.IllegalArgumentException
- If null or empty path is passed
PIMAuthorizationException
- If the user does not have the equivalent of
SystemWideAccessPrivilege.SPEC_MODIFY_SPEC
void save()
PIMInternalException
- If an internal error occurs
PIMAuthorizationException
- If the user does not have the equivalent of
SystemWideAccessPrivilege.SPEC_MODIFY_SPEC
void addLocale(java.util.Locale locale)
locale
- a locale to be added
PIMInternalException
- If an internal error occurs
java.lang.IllegalArgumentException
- If the locale passed in is Null or is not part of the
available locales for the company
java.lang.UnsupportedOperationException
- If this spec is not localized
PIMAuthorizationException
- If the user does not have the equivalent of
SystemWideAccessPrivilege.SPEC_MODIFY_SPEC
void replaceLocales(java.util.Collection<java.util.Locale> locales)
locales
- a collection of locales to be added
PIMInternalException
- If an internal error occurs
java.lang.IllegalArgumentException
- If the collection of locales passed in is Null/empty or is
not part of the available locales for the company
java.lang.UnsupportedOperationException
- If this spec is not localized
PIMAuthorizationException
- If the user does not have the equivalent of
SystemWideAccessPrivilege.SPEC_MODIFY_SPEC
void removeLocale(java.util.Locale locale)
locale
- a locale to be removed
PIMInternalException
- If an internal error occurs
java.lang.IllegalArgumentException
- If the locale passed in is Null or is not part of the
available locales for the company
java.lang.UnsupportedOperationException
- If this spec is not localized
PIMAuthorizationException
- If the user does not have the equivalent of
SystemWideAccessPrivilege.SPEC_MODIFY_SPEC
void setLocalized(boolean localized)
localized
- boolean Flag that enables localization on this spec
PIMInternalException
- If an internal error occurs
PIMAuthorizationException
- If the user does not have the equivalent of
SystemWideAccessPrivilege.SPEC_MODIFY_SPEC
void removeAttributeDefinition(java.lang.String path)
path
- full path to the attribute definition
PIMInternalException
- If an internal error occurs
java.lang.IllegalArgumentException
- If null or empty path is passed
PIMAuthorizationException
- If the user does not have the equivalent of
SystemWideAccessPrivilege.SPEC_MODIFY_SPEC
void delete()
PIMInternalException
- If an internal error occurs
PIMAuthorizationException
- If the user does not have the equivalent of
SystemWideAccessPrivilege.SPEC_MODIFY_SPEC
Spec.Type getType()
PIMInternalException
- If an internal error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |