com.flexive.shared.exceptions
Enum FxContentExceptionCause

java.lang.Object
  extended by java.lang.Enum<FxContentExceptionCause>
      extended by com.flexive.shared.exceptions.FxContentExceptionCause
All Implemented Interfaces:
ObjectWithLabel, java.io.Serializable, java.lang.Comparable<FxContentExceptionCause>

public enum FxContentExceptionCause
extends java.lang.Enum<FxContentExceptionCause>
implements ObjectWithLabel

If an exception is throws by the ContentEngine and it affects data in a FxContent instance, calling getAffectedXPath() returns the XPath and getContentExceptionCause() will return an indicator of the case (this enum)

Since:
3.1
Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Enum Constant Summary
GroupOneOfViolated
          Tried to add an XPath to a group which has a One-Of group constraint which already contained an XPath
InvalidGroupMode
          Group mode is not valid (e.g.
InvalidIndex
          An invalid index has been set for an XPath (e.g.
InvalidValue
          Invalid value (validation error)
InvalidValueDatatype
          A value of an invalid or incompatible data type has been assigned (e.g.
MaxlengthViolated
          An assignment with a maximum length restriction has been assigned a value that is too large
MultiLangOverride
          Overriding an assignments multilanguage setting is not allowed
NoAccess
          Tried to access a FxNoAccess value
ReadOnly
          Tried to write a read-only field
RequiredViolated
          Not enough required occurances of an assignment
SysInternalAttempt
          Attempted to set a system internal value using an XPath which is not allowed
UniqueConstraintViolated
          A unique constraint has been violated
Unknown
          Worst case, nothing is known that caused the exception
 
Method Summary
 FxString getLabel()
          Return the localized label of the object.
static FxContentExceptionCause valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FxContentExceptionCause[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Unknown

public static final FxContentExceptionCause Unknown
Worst case, nothing is known that caused the exception


UniqueConstraintViolated

public static final FxContentExceptionCause UniqueConstraintViolated
A unique constraint has been violated


MultiLangOverride

public static final FxContentExceptionCause MultiLangOverride
Overriding an assignments multilanguage setting is not allowed


GroupOneOfViolated

public static final FxContentExceptionCause GroupOneOfViolated
Tried to add an XPath to a group which has a One-Of group constraint which already contained an XPath


InvalidIndex

public static final FxContentExceptionCause InvalidIndex
An invalid index has been set for an XPath (e.g. a max. of 2 is allowed and 3 was set)


MaxlengthViolated

public static final FxContentExceptionCause MaxlengthViolated
An assignment with a maximum length restriction has been assigned a value that is too large


RequiredViolated

public static final FxContentExceptionCause RequiredViolated
Not enough required occurances of an assignment


SysInternalAttempt

public static final FxContentExceptionCause SysInternalAttempt
Attempted to set a system internal value using an XPath which is not allowed


InvalidValueDatatype

public static final FxContentExceptionCause InvalidValueDatatype
A value of an invalid or incompatible data type has been assigned (e.g. String instead of Long)


NoAccess

public static final FxContentExceptionCause NoAccess
Tried to access a FxNoAccess value


ReadOnly

public static final FxContentExceptionCause ReadOnly
Tried to write a read-only field


InvalidGroupMode

public static final FxContentExceptionCause InvalidGroupMode
Group mode is not valid (e.g. more than one required property for a one-of rstriction)


InvalidValue

public static final FxContentExceptionCause InvalidValue
Invalid value (validation error)

Method Detail

values

public static FxContentExceptionCause[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FxContentExceptionCause c : FxContentExceptionCause.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FxContentExceptionCause valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getLabel

public FxString getLabel()
Return the localized label of the object.

Specified by:
getLabel in interface ObjectWithLabel
Returns:
the localized label for the object.