eXo JCR :: Ext :: Services 1.15.12-GA

org.exoplatform.services.jcr.ext.organization
Class JCRUserListAccess

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.organization.JCRUserListAccess
All Implemented Interfaces:
org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User>
Direct Known Subclasses:
SimpleJCRUserListAccess, UserByGroupJCRUserListAccess, UserByQueryJCRUserListAccess

public abstract class JCRUserListAccess
extends Object
implements org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User>

Created by The eXo Platform SAS.

Version:
$Id: JCRListAccess.java 111 2008-11-11 11:11:11Z $
Author:
Anatoliy Bazko

Field Summary
static int DEFAULT_PAGE_SIZE
          Default value of page size.
protected  javax.jcr.NodeIterator iterator
          Iterator by children items.
protected  JCROrganizationServiceImpl service
          JCR implementation of OrganizationService.
protected  UserHandlerImpl uHandler
          JCR implementation of UserHandler.
protected  Utils utils
          Utility class.
 
Constructor Summary
JCRUserListAccess(JCROrganizationServiceImpl service)
          JCRListAccess constructor.
 
Method Summary
protected  boolean canReuseIterator()
          Indicates if we able to reuse current iterator.
protected abstract  javax.jcr.NodeIterator createIterator(javax.jcr.Session session)
          Returns iterator over entities.
 int getSize()
          
protected abstract  int getSize(javax.jcr.Session session)
          Determines the count of available users.
 org.exoplatform.services.organization.User[] load(int index, int length)
          
protected abstract  Object readObject(javax.jcr.Node node)
          Reads entity from node.
protected  void reuseIterator(javax.jcr.Session session, int newPosition)
          Check if possible to reuse current iterator (which means possibility to fetch next nodes in row).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PAGE_SIZE

public static final int DEFAULT_PAGE_SIZE
Default value of page size.

See Also:
Constant Field Values

service

protected final JCROrganizationServiceImpl service
JCR implementation of OrganizationService.


uHandler

protected final UserHandlerImpl uHandler
JCR implementation of UserHandler.


utils

protected final Utils utils
Utility class.


iterator

protected javax.jcr.NodeIterator iterator
Iterator by children items.

Constructor Detail

JCRUserListAccess

public JCRUserListAccess(JCROrganizationServiceImpl service)
                  throws javax.jcr.RepositoryException
JCRListAccess constructor.

Throws:
javax.jcr.RepositoryException
Method Detail

load

public org.exoplatform.services.organization.User[] load(int index,
                                                         int length)
                                                  throws Exception,
                                                         IllegalArgumentException

Specified by:
load in interface org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User>
Throws:
Exception
IllegalArgumentException

getSize

public int getSize()
            throws Exception

Specified by:
getSize in interface org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User>
Throws:
Exception

reuseIterator

protected void reuseIterator(javax.jcr.Session session,
                             int newPosition)
                      throws javax.jcr.RepositoryException
Check if possible to reuse current iterator (which means possibility to fetch next nodes in row). Otherwise the new one will be created.

Throws:
javax.jcr.RepositoryException

canReuseIterator

protected boolean canReuseIterator()
Indicates if we able to reuse current iterator.


readObject

protected abstract Object readObject(javax.jcr.Node node)
                              throws Exception
Reads entity from node.

Throws:
Exception

createIterator

protected abstract javax.jcr.NodeIterator createIterator(javax.jcr.Session session)
                                                  throws javax.jcr.RepositoryException
Returns iterator over entities.

Throws:
javax.jcr.RepositoryException

getSize

protected abstract int getSize(javax.jcr.Session session)
                        throws Exception
Determines the count of available users.

Throws:
Exception

eXo JCR :: Ext :: Services 1.15.12-GA

Copyright © 2015 eXo Platform SAS. All Rights Reserved.