atg.repository.servlet
Class RepositoryFormList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList
              extended by atg.repository.servlet.RepositoryFormList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess
Direct Known Subclasses:
RepositoryFormMap

public class RepositoryFormList
extends java.util.ArrayList

This class is used by the RepositoryFormHandler. It is returned when a property of type array, set or list is requested as a sub-property of the value property (e.g. RFH.value.someListProperty). It has additional sub-properties that give you more flexibility when editing a list.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
RepositoryFormList(RepositoryFormData pFormData, RepositoryPropertyDescriptor pProperty, RepositoryItem pItem)
           
 
Method Summary
 void clear()
           
 boolean contains(java.lang.Object o)
           
 java.lang.Object get(int pIndex)
           
 java.lang.Object getDefaultElementValue(int pIndex)
           
 int getNumNewValues()
           
 RepositoryPropertyDescriptor getPropertyDescriptor()
           
 java.lang.String[] getRepositoryIds()
           
 boolean[] getSkip()
           
 boolean getSkip(int pIndex)
           
 java.lang.String getUpdateMode()
           
 java.lang.Object getValue(int pIndex)
          Retrieves the real value we should use for this item.
 java.lang.Object[] getValues()
           
 boolean isEmpty()
           
 java.util.Iterator iterator()
           
 void setNumNewValues(int pNumNewValues)
          Sets the property NumNewValues.
 void setRepositoryIds(java.lang.String[] pRepositoryIds)
          Sets the property RepositoryIds.
 void setSkip(boolean[] pSkip)
          Sets the property Skip.
 void setSkip(int pIndex, boolean pValue)
          Sets a single element after resizing the array if necessary
 void setUpdateMode(java.lang.String pUpdateMode)
          Sets the property UpdateMode.
 void setValues(java.lang.Object[] pValues)
          Sets the property Values.
 int size()
           
 java.lang.Object[] toArray(java.lang.Object[] a)
           
 void updateItemProperties(int pIndex)
          Updates the properties for the given item
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clone, ensureCapacity, indexOf, lastIndexOf, remove, remove, removeRange, set, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

RepositoryFormList

public RepositoryFormList(RepositoryFormData pFormData,
                          RepositoryPropertyDescriptor pProperty,
                          RepositoryItem pItem)
Method Detail

getPropertyDescriptor

public RepositoryPropertyDescriptor getPropertyDescriptor()

setRepositoryIds

public void setRepositoryIds(java.lang.String[] pRepositoryIds)
Sets the property RepositoryIds. When set, this defines the list of items stored in this list.

Parameters:
pRepositoryIds - new value to set

getRepositoryIds

public java.lang.String[] getRepositoryIds()
Returns:
The value of the property RepositoryIds.

setSkip

public void setSkip(boolean[] pSkip)
Sets the property Skip. This can be set on a per item basis. If true, we skip the update of these entries. In the replace mode, this will cause this entry to be deleted. In the append/prepend mode, the skipped entires are simply not put into the list.

Parameters:
pSkip - new value to set

getSkip

public boolean[] getSkip()
Returns:
The value of the property Skip.

getSkip

public boolean getSkip(int pIndex)

setSkip

public void setSkip(int pIndex,
                    boolean pValue)
Sets a single element after resizing the array if necessary


setValues

public void setValues(java.lang.Object[] pValues)
Sets the property Values. This allows you to access the value of these properties as a simple array sub-property.

Parameters:
pValues - new value to set

getValues

public java.lang.Object[] getValues()
Returns:
The value of the property Values.

getValue

public java.lang.Object getValue(int pIndex)
Retrieves the real value we should use for this item. When we are representing a list of real items, we need to get the actual repository item out of the RepositoryFormHashtable


updateItemProperties

public void updateItemProperties(int pIndex)
                          throws RepositoryException
Updates the properties for the given item

Throws:
RepositoryException

setNumNewValues

public void setNumNewValues(int pNumNewValues)
Sets the property NumNewValues. This is set to the # of items we should create for this form submission.

Parameters:
pNumNewValues - new value to set

getNumNewValues

public int getNumNewValues()
Returns:
The value of the property NumNewValues.

setUpdateMode

public void setUpdateMode(java.lang.String pUpdateMode)
Sets the property UpdateMode. This can be one of the values "append", "prepend", "replace", or "remove". It is used to determine how we combine this value with the underlying repository item's value.

Parameters:
pUpdateMode - new value to set

getUpdateMode

public java.lang.String getUpdateMode()
Returns:
The value of the property UpdateMode.

size

public int size()
Specified by:
size in interface java.util.Collection
Specified by:
size in interface java.util.List
Overrides:
size in class java.util.ArrayList

get

public java.lang.Object get(int pIndex)
Specified by:
get in interface java.util.List
Overrides:
get in class java.util.ArrayList

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection
Specified by:
isEmpty in interface java.util.List
Overrides:
isEmpty in class java.util.ArrayList

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection
Specified by:
contains in interface java.util.List
Overrides:
contains in class java.util.ArrayList

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.lang.Iterable
Specified by:
iterator in interface java.util.Collection
Specified by:
iterator in interface java.util.List
Overrides:
iterator in class java.util.AbstractList

toArray

public java.lang.Object[] toArray(java.lang.Object[] a)
Specified by:
toArray in interface java.util.Collection
Specified by:
toArray in interface java.util.List
Overrides:
toArray in class java.util.ArrayList

clear

public void clear()
Specified by:
clear in interface java.util.Collection
Specified by:
clear in interface java.util.List
Overrides:
clear in class java.util.ArrayList

getDefaultElementValue

public java.lang.Object getDefaultElementValue(int pIndex)