Package org.eclipse.birt.report.model.api.command

# Class ContentException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.eclipse.birt.core.exception.BirtException
org.eclipse.birt.report.model.api.ModelException
org.eclipse.birt.report.model.api.activity.SemanticException
org.eclipse.birt.report.model.api.command.ContentException

All Implemented Interfaces:
  `Serializable`

public class ContentException extends SemanticException
Reports an error during a container operation.

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`protected String`
`containerProp`
The property name within the container.
`protected org.eclipse.birt.report.model.core.DesignElement`
`content`
The content in the container.
`static final String`
`DESIGN_EXCEPTION_CONTENT_ALREADY_INSERTED`
Error code that indicates that the content can not be inserted twice for it is already in the tree.
`static final String`
`DESIGN_EXCEPTION_CONTENT_NAME_REQUIRED`
The content is not allowed to added into the container without name.
`static final String`
`DESIGN_EXCEPTION_CONTENT_NOT_ALLOWED_PASTED`
The content element cannot be pasted into the container.
`static final String`
`DESIGN_EXCEPTION_CONTENT_NOT_FOUND`
The content element does not appear within the container.
`static final String`
`DESIGN_EXCEPTION_DROP_FORBIDDEN`
Deprecated.
since birt 2.2
`static final String`
`DESIGN_EXCEPTION_GROUPS_CHANGE_FORBIDDEN`
The table/list has data binding reference to other elements.
`static final String`
`DESIGN_EXCEPTION_HAS_DESCENDENTS`
The content in component slot has descendents.
`static final String`
`DESIGN_EXCEPTION_HAS_NO_CONTAINER`
Tried to move or delete an element that has no container.
`static final String`
`DESIGN_EXCEPTION_INVALID_CONTEXT_CONTAINMENT`
The content is not allowed to in one element's slot in any level.
`static final String`
`DESIGN_EXCEPTION_INVALID_POSITION`
Error code that indicates that the given position is out of range and invalid.
`static final String`
`DESIGN_EXCEPTION_INVALID_TEMPLATE_ELEMENT`
The template element has no referred template definition, it is invalid.
`static final String`
`DESIGN_EXCEPTION_MOVE_FORBIDDEN`
The content element cannot be deleted.
`static final String`
`DESIGN_EXCEPTION_NOT_CONTAINER`
The purported container element is not, in fact, a container.
`static final String`
`DESIGN_EXCEPTION_RECURSIVE`
Attempt to move an element inside itself, or inside one of its contents.
`static final String`
`DESIGN_EXCEPTION_SHARE_DIMENSION_NOT_EXIST`
Error code that indicates that the shared dimension can not be inserted to report design and library.
`static final String`
`DESIGN_EXCEPTION_SLOT_IS_FULL`
Attempt to add a second item to a single-item slot.
`static final String`
`DESIGN_EXCEPTION_SLOT_NOT_FOUND`
The operation referenced a slot that does not exist.
`static final String`
`DESIGN_EXCEPTION_STRUCTURE_CHANGE_FORBIDDEN`
Can not change the structure of an element if it is a child element, or it is within a child element, or it is a template parameter definition.
`static final String`
`DESIGN_EXCEPTION_TEMPLATE_TRANSFORM_FORBIDDEN`
The template element has no referred template definition, it is invalid.
`static final String`
`DESIGN_EXCEPTION_WRONG_TYPE`
The given content element is of the wrong type for the slot.
`protected int`
`slot`
The slot within the container.

### Fields inherited from class org.eclipse.birt.report.model.api.activity.SemanticException

`DESIGN_EXCEPTION__EXPORT_ELEMENT_FAIL, element`

### Fields inherited from class org.eclipse.birt.report.model.api.ModelException

`PLUGIN_ID`

### Fields inherited from class org.eclipse.birt.core.exception.BirtException

`CANCEL, ERROR, INFO, oaMessageArguments, OK, pluginId, rb, severity, sResourceKey, WARNING`

## Constructor Summary

Constructors
Constructor
Description
`ContentException(org.eclipse.birt.report.model.core.DesignElement element, int slotID, String errCode)`
Constructs the exception with container element, slot id, and error code.
`ContentException(org.eclipse.birt.report.model.core.DesignElement element, int slotID, org.eclipse.birt.report.model.core.DesignElement content, String errCode)`
Constructs the exception with container element slot id, content element and error code.
`ContentException(org.eclipse.birt.report.model.core.DesignElement element, int slotID, org.eclipse.birt.report.model.core.DesignElement content, String errCode, String[] args)`
Constructs the exception with container element slot id, content element and error code.
`ContentException(org.eclipse.birt.report.model.core.DesignElement element, String propName, String errCode)`
Constructs the exception with container element, slot id, and error code.
`ContentException(org.eclipse.birt.report.model.core.DesignElement element, String propName, org.eclipse.birt.report.model.core.DesignElement content, String errCode)`
Constructs the exception with container element slot id, content element and error code.

## Method Summary

Modifier and Type
Method
Description
`String`
`getLocalizedMessage()`
`int`
`getSlot()`
Returns the slot ID.

### Methods inherited from class org.eclipse.birt.report.model.api.activity.SemanticException

`getElement, getElementName, getMessage`

### Methods inherited from class org.eclipse.birt.core.exception.BirtException

`getErrorCode, getLocalizedMessage, getPluginId, getSeverity, setSeverity`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### slot

protected int slot
The slot within the container.

### content

protected org.eclipse.birt.report.model.core.DesignElement content
The content in the container.

### containerProp

protected String containerProp
The property name within the container.

### DESIGN_EXCEPTION_STRUCTURE_CHANGE_FORBIDDEN

public static final String DESIGN_EXCEPTION_STRUCTURE_CHANGE_FORBIDDEN
Can not change the structure of an element if it is a child element, or it is within a child element, or it is a template parameter definition.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_SLOT_NOT_FOUND

public static final String DESIGN_EXCEPTION_SLOT_NOT_FOUND
The operation referenced a slot that does not exist.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_WRONG_TYPE

public static final String DESIGN_EXCEPTION_WRONG_TYPE
The given content element is of the wrong type for the slot.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_DROP_FORBIDDEN

@Deprecated public static final String DESIGN_EXCEPTION_DROP_FORBIDDEN
Deprecated.
since birt 2.2
The content element cannot be deleted.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_CONTENT_NOT_FOUND

public static final String DESIGN_EXCEPTION_CONTENT_NOT_FOUND
The content element does not appear within the container.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_NOT_CONTAINER

public static final String DESIGN_EXCEPTION_NOT_CONTAINER
The purported container element is not, in fact, a container.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_SLOT_IS_FULL

public static final String DESIGN_EXCEPTION_SLOT_IS_FULL
Attempt to add a second item to a single-item slot.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_RECURSIVE

public static final String DESIGN_EXCEPTION_RECURSIVE
Attempt to move an element inside itself, or inside one of its contents.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_HAS_NO_CONTAINER

public static final String DESIGN_EXCEPTION_HAS_NO_CONTAINER
Tried to move or delete an element that has no container. Generally occurs when trying to work with an element that either has not yet been added to a design, or has been removed from the design.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_MOVE_FORBIDDEN

public static final String DESIGN_EXCEPTION_MOVE_FORBIDDEN
The content element cannot be deleted.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_HAS_DESCENDENTS

public static final String DESIGN_EXCEPTION_HAS_DESCENDENTS
The content in component slot has descendents.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_INVALID_CONTEXT_CONTAINMENT

public static final String DESIGN_EXCEPTION_INVALID_CONTEXT_CONTAINMENT
The content is not allowed to in one element's slot in any level.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_CONTENT_NAME_REQUIRED

public static final String DESIGN_EXCEPTION_CONTENT_NAME_REQUIRED
The content is not allowed to added into the container without name.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_INVALID_TEMPLATE_ELEMENT

public static final String DESIGN_EXCEPTION_INVALID_TEMPLATE_ELEMENT
The template element has no referred template definition, it is invalid.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_TEMPLATE_TRANSFORM_FORBIDDEN

public static final String DESIGN_EXCEPTION_TEMPLATE_TRANSFORM_FORBIDDEN
The template element has no referred template definition, it is invalid.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_GROUPS_CHANGE_FORBIDDEN

public static final String DESIGN_EXCEPTION_GROUPS_CHANGE_FORBIDDEN
The table/list has data binding reference to other elements. Its groups cannot be added, moved or removed.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_CONTENT_NOT_ALLOWED_PASTED

public static final String DESIGN_EXCEPTION_CONTENT_NOT_ALLOWED_PASTED
The content element cannot be pasted into the container.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_CONTENT_ALREADY_INSERTED

public static final String DESIGN_EXCEPTION_CONTENT_ALREADY_INSERTED
Error code that indicates that the content can not be inserted twice for it is already in the tree.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_INVALID_POSITION

public static final String DESIGN_EXCEPTION_INVALID_POSITION
Error code that indicates that the given position is out of range and invalid.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_SHARE_DIMENSION_NOT_EXIST

public static final String DESIGN_EXCEPTION_SHARE_DIMENSION_NOT_EXIST
Error code that indicates that the shared dimension can not be inserted to report design and library.

See Also:
  - Constant Field Values

## Constructor Details

### ContentException

public ContentException(org.eclipse.birt.report.model.core.DesignElement element, int slotID, String errCode)
Constructs the exception with container element, slot id, and error code.

Parameters:
  `element` - The container element.
  `slotID` - The slot within the container.
  `errCode` - What went wrong.

### ContentException

public ContentException(org.eclipse.birt.report.model.core.DesignElement element, int slotID, org.eclipse.birt.report.model.core.DesignElement content, String errCode)
Constructs the exception with container element slot id, content element and error code.

Parameters:
  `element` - The container element.
  `slotID` - The slot within the container.
  `content` - The content in the container element.
  `errCode` - What went wrong.

### ContentException

public ContentException(org.eclipse.birt.report.model.core.DesignElement element, int slotID, org.eclipse.birt.report.model.core.DesignElement content, String errCode, String[] args)
Constructs the exception with container element slot id, content element and error code.

Parameters:
  `element` - The container element.
  `slotID` - The slot within the container.
  `content` - The content in the container element.
  `errCode` - What went wrong.

### ContentException

public ContentException(org.eclipse.birt.report.model.core.DesignElement element, String propName, String errCode)
Constructs the exception with container element, slot id, and error code.

Parameters:
  `element` - The container element.
  `propName` - The property name within the container.
  `errCode` - What went wrong.

### ContentException

public ContentException(org.eclipse.birt.report.model.core.DesignElement element, String propName, org.eclipse.birt.report.model.core.DesignElement content, String errCode)
Constructs the exception with container element slot id, content element and error code.

Parameters:
  `element` - The container element.
  `propName` - The property name within the container.
  `content` - The content in the container element.
  `errCode` - What went wrong.

## Method Details

### getSlot

public int getSlot()
Returns the slot ID.

Returns:
  the slot ID

### getLocalizedMessage

public String getLocalizedMessage()

Overrides:
  `getLocalizedMessage` in class `SemanticException`