org.outerj.daisy.repository.commonimpl
Class DocumentCollectionImpl

java.lang.Object
  extended by org.outerj.daisy.repository.commonimpl.DocumentCollectionImpl
All Implemented Interfaces:
java.lang.Comparable, org.outerj.daisy.repository.DocumentCollection

public class DocumentCollectionImpl
extends java.lang.Object
implements org.outerj.daisy.repository.DocumentCollection, java.lang.Comparable

A user aware Collection implementation. In order to use this awareness, a client needs of course to be aware of the fact that the Collections being used are in fact CollectionImpl object. The extra methods in this interface that are not present in the Collection interface are meant for internal use and not for client use!


Nested Class Summary
 class DocumentCollectionImpl.IntimateAccess
          a class that provides intimate access to the DocumentCollectionImpl.
 
Constructor Summary
DocumentCollectionImpl(CollectionStrategy collectionStrategy, java.lang.String name, AuthenticatedUser requestingUser)
          creates a new CollectionImpl object which is aware of the user that requested the collection.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 long getId()
           
 DocumentCollectionImpl.IntimateAccess getIntimateAccess(CollectionStrategy strategy)
           
 java.util.Date getLastModified()
           
 long getLastModifier()
           
 java.lang.String getName()
           
 long getUpdateCount()
           
 org.outerx.daisy.x10.CollectionDocument getXml()
           
 void makeReadOnly()
           
 void save()
           
 void setName(java.lang.String collectionName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentCollectionImpl

public DocumentCollectionImpl(CollectionStrategy collectionStrategy,
                              java.lang.String name,
                              AuthenticatedUser requestingUser)
creates a new CollectionImpl object which is aware of the user that requested the collection.

Parameters:
collectionStrategy - the strategy used to load and store data
name - the name of the Collection
requestingUser - the User requesting the collection
Method Detail

getId

public long getId()
Specified by:
getId in interface org.outerj.daisy.repository.DocumentCollection

getName

public java.lang.String getName()
Specified by:
getName in interface org.outerj.daisy.repository.DocumentCollection

setName

public void setName(java.lang.String collectionName)
Specified by:
setName in interface org.outerj.daisy.repository.DocumentCollection

save

public void save()
          throws org.outerj.daisy.repository.RepositoryException
Specified by:
save in interface org.outerj.daisy.repository.DocumentCollection
Throws:
org.outerj.daisy.repository.RepositoryException

getXml

public org.outerx.daisy.x10.CollectionDocument getXml()
Specified by:
getXml in interface org.outerj.daisy.repository.DocumentCollection

getLastModified

public java.util.Date getLastModified()
Specified by:
getLastModified in interface org.outerj.daisy.repository.DocumentCollection

getLastModifier

public long getLastModifier()
Specified by:
getLastModifier in interface org.outerj.daisy.repository.DocumentCollection

getIntimateAccess

public DocumentCollectionImpl.IntimateAccess getIntimateAccess(CollectionStrategy strategy)
Parameters:
strategy - the CollectionStrategy requesting intimate access
Returns:
an IntimateAccess object if the CollectionStrategy is the same as the one supplied when creating the DocumentCollectionImpl object, null if it is another one.

getUpdateCount

public long getUpdateCount()
Specified by:
getUpdateCount in interface org.outerj.daisy.repository.DocumentCollection

makeReadOnly

public void makeReadOnly()

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable


Copyright © -2012 . All Rights Reserved.