java.lang.Object | ||
↳ | com.microstrategy.utils.serialization.AbstractPersistable | |
↳ | com.microstrategy.web.objects.WebDerivedElementsEditorObject |
This class represents derived elements inside derived elements editor. All changes performed by a user inside the editor are kept there until user clicks OK button. Then all accumulated changes are applied to the target template attribute derived elements. To support this we accumulated all generated deltas in a local buffer.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected KeyedList | allElements | ||||||||||
protected WebXMLBuilder | delta | ||||||||||
protected WebExpressionImpl | domainExpression | ||||||||||
protected KeyedList | elements | ||||||||||
protected WebObjectsFactory | factory | ||||||||||
protected boolean | isLocal | ||||||||||
protected String | linkedObjectName |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
WebDerivedElementsEditorObject(WebAttribute _att) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
WebDerivedElement |
acceptChanges(WebDerivedElement de)
Generates deltas for changes made to a given element
| ||||||||||
void |
acceptVisibleChanges()
Generates deltas for visibility changes made to derived element
| ||||||||||
void |
add(WebDerivedElement de, int position)
Adds new derived element to a collection
| ||||||||||
WebDerivedElement | addSortDerivedElement() | ||||||||||
void |
applyChanges(WebDerivedElements target)
Applies accumulated changes to the target template derived elements
| ||||||||||
void |
clear()
Removes all Derived Elements from the collection.
| ||||||||||
void |
commitChanges()
Clears deltas.
| ||||||||||
boolean |
contains(String id)
Returns true if the Derived Element with the given id exists in the collection.
| ||||||||||
void |
convertToLocalDerivedElement()
Converts stand-alone derived elements to local derived elements.
| ||||||||||
Enumeration |
elements()
Returns a java.util.Enumeration which can be used to iterate through the list
of elements in the collection.
| ||||||||||
WebDerivedElement |
get(int index)
Returns the Derived Element object with the given index.
| ||||||||||
WebDerivedElement |
get(String id)
Returns a Derived Element object with the given id, if it exists.
| ||||||||||
KeyedList |
getAllElements()
Returns all elements including "dormant" elements, which were deleted by a user but remaind
in the all elements collection because other elements have references to them.
| ||||||||||
static String | getDisplayString(WebDerivedElement de) | ||||||||||
WebExpression | getDomainExpression() | ||||||||||
int | getInsertPosition() | ||||||||||
String | getLinkedObjectName() | ||||||||||
boolean |
hasChanges()
Returns true if anything changed
| ||||||||||
boolean |
hasVisibleList()
Indicates whether the template attribute has a list of visible derived elements.
| ||||||||||
void |
importDerivedElement(String deId)
Import standalone derived element.
| ||||||||||
int |
indexOf(String id)
Finds the index of Derived Element with the given id.
| ||||||||||
boolean | isEditable() | ||||||||||
boolean | isLinked() | ||||||||||
boolean | isSort() | ||||||||||
void |
moveTo(String id, int position)
Moves spesified Derived Element to specify position
| ||||||||||
WebDerivedElement |
newDerivedElement(int type)
Creates new derived element
| ||||||||||
void |
populate(WebDerivedElements src)
Copies information from the template attribute derived elements
| ||||||||||
WebDerivedElement |
remove(String id)
Removes the Derived Element object with the given id from the collection;
| ||||||||||
WebDerivedElement |
remove(int index)
Removes a derived element located in the
index position. | ||||||||||
boolean |
restoreState(SAXSupport parser, String uri, String localName, String qName, Attributes attrs)
Restores current state
| ||||||||||
void |
saveXMLState(XMLStateSerializer stateBuilder, int howMuchState)
Saves current state
| ||||||||||
void |
setIsEditable(boolean editable)
This method is deprecated.
use
setIsLinked(boolean) instead. | ||||||||||
void | setIsLinked(boolean isLinked) | ||||||||||
void | setName(String value) | ||||||||||
int |
size()
Returns the number of elements currently in the collection.
| ||||||||||
KeyedList |
toKeyedList()
Returns KeyedList of active derived elements
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
KeyedList | getCreateAllElements() | ||||||||||
void | saveXMLState(WebXMLBuilder builder, int howMuchState) | ||||||||||
void | saveXMLState(StringBuffer buf, int howMuchState) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Generates deltas for changes made to a given element
de | WebDerivedElement |
---|
IllegalArgumentException | Thrown if element does not exist in the collection |
---|
Generates deltas for visibility changes made to derived element
Adds new derived element to a collection
de | element |
---|---|
position | position |
Applies accumulated changes to the target template derived elements
Removes all Derived Elements from the collection.
UnsupportedOperationException |
---|
Clears deltas. (We can do this only after we are sure that applying changes on the report or document succeeded).
Returns true if the Derived Element with the given id exists in the collection.
id | The Derived Element ID. |
---|
Converts stand-alone derived elements to local derived elements.
Returns a java.util.Enumeration which can be used to iterate through the list of elements in the collection.
Returns the Derived Element object with the given index.
index | The index of the element in the collection. |
---|
IndexOutOfBoundsException |
---|
Returns a Derived Element object with the given id, if it exists.
id | The key of the element to search for in the collection. |
---|
IllegalArgumentException |
---|
Returns all elements including "dormant" elements, which were deleted by a user but remaind in the all elements collection because other elements have references to them.
Returns true if anything changed
Indicates whether the template attribute has a list of visible derived elements. If it doesn't then all active derived elements are visible. In this case when the first derived element becomes invisible we must add all other dervied elements to the visible list.
Import standalone derived element. The imported element replaces all existing derived elements.
Finds the index of Derived Element with the given id.
id | String |
---|
Moves spesified Derived Element to specify position
id | element ID |
---|---|
position | new position |
Copies information from the template attribute derived elements
Removes the Derived Element object with the given id from the collection;
id | The element id. |
---|
UnsupportedOperationException |
---|
Removes a derived element located in the index
position.
index | position |
---|
UnsupportedOperationException | |
---|---|
IndexOutOfBoundsException |
Restores current state
parser | a SAX parser processing the XML representation of a state |
---|---|
uri | The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed |
localName | The local name (without prefix), or the empty string if Namespace processing is not being performed |
qName | The qualified name (with prefix), or the empty string if qualified names are not available |
attrs | The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object |
true
to indicate a successful restoration.
Otherwise, false
will be returned.
Returns the number of elements currently in the collection.