com.wewebu.ow.server.ecm
Class OwStandardObjectCollection

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList
              extended by com.wewebu.ow.server.ecm.OwStandardObjectCollection
All Implemented Interfaces:
OwObjectCollection, OwAttributeBag, Serializable, Cloneable, Iterable, Collection, List, RandomAccess

public class OwStandardObjectCollection
extends ArrayList
implements OwObjectCollection

Standard Implementation for objects lists from the network. Implements the SUN value list pattern.

To be implemented with the specific ECM system.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

See Also:
Serialized Form

Nested Class Summary
protected  class OwStandardObjectCollection.OwObjectCollectionComparator
          sort operator used in
 
Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Fields inherited from interface com.wewebu.ow.server.ecm.OwObjectCollection
ATTRIBUTE_IS_COMPLETE, ATTRIBUTE_SIZE, ATTRIBUTE_SQL
 
Constructor Summary
OwStandardObjectCollection()
           
 
Method Summary
 int attributecount()
          get the number of attributes, or -1 if unknown
 Object getAttribute(int iIndex_p)
          get a object at the specified index or throws OwObjectNotFoundException
 Object getAttribute(String strName_p)
          get the attribute with the given name
 Collection getAttributeNames()
          get all attribute names in the bag
 void getNext()
          overridable to retrieve further objects, than currently added.
 void getPrev()
          overridable to retrieve further objects, than currently added.
 Object getSafeAttribute(String strName_p, Object default_p)
          get the attribute with the given name, returns default if not found.
 boolean hasAttribute(String strName_p)
          check if attribute exists
 boolean hasNext()
          overridable to check if object list has access to more next objects, than currently added.
 boolean hasPrev()
          overridable to check if object list has access to more previous objects, than currently added.
 boolean isComplete()
          check if object list has retrieved all objects If false, there are more objects available, but it is not guaranteed that you can retrieve them with the next / prev functions.
 void setAttribute(String strName_p, Object object_p)
          set the attribute with the given name
 void setComplete(boolean fComplete_p)
          set the complete flag
 void sort(OwSort sortCriteria_p)
          sort the list by the given criteria.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, 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
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

OwStandardObjectCollection

public OwStandardObjectCollection()
Method Detail

sort

public void sort(OwSort sortCriteria_p)
          throws Exception
sort the list by the given criteria. The default implementation sorts on the cached objects in the application server. The function may be overloaded to sort by the ECM System with SQL sort statements.

Specified by:
sort in interface OwObjectCollection
Parameters:
sortCriteria_p - list of sortcriteria
Throws:
Exception

isComplete

public boolean isComplete()
                   throws Exception
check if object list has retrieved all objects If false, there are more objects available, but it is not guaranteed that you can retrieve them with the next / prev functions. I.e. hasNext / Prev might still return false.

Specified by:
isComplete in interface OwObjectCollection
Returns:
boolean true = all available objects have been added to the list
Throws:
Exception

setComplete

public void setComplete(boolean fComplete_p)
set the complete flag


hasNext

public boolean hasNext()
                throws Exception
overridable to check if object list has access to more next objects, than currently added. I.e. if it could do another SQL Query and obtain more objects from the ECM System.

Specified by:
hasNext in interface OwObjectCollection
Returns:
boolean true = there are more objects available, call getMore() to retrieve additional objects.
Throws:
Exception

hasPrev

public boolean hasPrev()
                throws Exception
overridable to check if object list has access to more previous objects, than currently added. I.e. if it could do another SQL Query and obtain more objects from the ECM System.

Specified by:
hasPrev in interface OwObjectCollection
Returns:
boolean true = there are more objects available, call getMore() to retrieve additional objects.
Throws:
Exception

getNext

public void getNext()
             throws Exception
overridable to retrieve further objects, than currently added. I.e. submit another SQL Query and obtain more objects from the ECM System. NOTE: The retrieved objects will replace the current objects in the list

Specified by:
getNext in interface OwObjectCollection
Throws:
Exception

getPrev

public void getPrev()
             throws Exception
overridable to retrieve further objects, than currently added. I.e. submit another SQL Query and obtain more objects from the ECM System. NOTE: The retrieved objects will replace the current objects in the list

Specified by:
getPrev in interface OwObjectCollection
Throws:
Exception

getAttribute

public Object getAttribute(int iIndex_p)
                    throws Exception
get a object at the specified index or throws OwObjectNotFoundException

Specified by:
getAttribute in interface OwAttributeBag
Parameters:
iIndex_p - int index
Returns:
Object
Throws:
Exception

getSafeAttribute

public Object getSafeAttribute(String strName_p,
                               Object default_p)
get the attribute with the given name, returns default if not found.

Specified by:
getSafeAttribute in interface OwAttributeBag

getAttribute

public Object getAttribute(String strName_p)
                    throws Exception
get the attribute with the given name

Specified by:
getAttribute in interface OwAttributeBag
Throws:
Exception

setAttribute

public void setAttribute(String strName_p,
                         Object object_p)
                  throws Exception
set the attribute with the given name

Throws:
Exception

hasAttribute

public boolean hasAttribute(String strName_p)
check if attribute exists

Specified by:
hasAttribute in interface OwAttributeBag

getAttributeNames

public Collection getAttributeNames()
get all attribute names in the bag

Specified by:
getAttributeNames in interface OwAttributeBag

attributecount

public int attributecount()
Description copied from interface: OwAttributeBag
get the number of attributes, or -1 if unknown

Specified by:
attributecount in interface OwAttributeBag


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.