com.stratelia.webactiv.util
Class SchemaPool

java.lang.Object
  extended by com.stratelia.webactiv.util.SchemaPool
Direct Known Subclasses:
NotifSchemaPool, OrganizationSchemaPool, PortletSchemaPool

public abstract class SchemaPool
extends Object

The SchemaPool class manages a pool of Schema shared by all the client (admin classes). All the public methods are static and the calls are deferred to a singleton.


Constructor Summary
protected SchemaPool()
          The constructor is private, so we can ensure that only one pool will be created in the JVM.
 
Method Summary
protected  Schema getInstance()
          Returns an Shema.
protected abstract  Schema newSchema()
           
protected  void release(Schema s)
          Release an Scheme previously returned by the pool.
protected  void releaseSchemas()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaPool

protected SchemaPool()
The constructor is private, so we can ensure that only one pool will be created in the JVM.

Method Detail

newSchema

protected abstract Schema newSchema()
                             throws UtilException
Throws:
UtilException

releaseSchemas

protected void releaseSchemas()

getInstance

protected Schema getInstance()
                      throws UtilException
Returns an Shema. The returned schema is removed from the pool : so, if our client forgets to release this schema we don't keep a useless entry.

Throws:
UtilException

release

protected void release(Schema s)
Release an Scheme previously returned by the pool. We put the released schema in the pool unless this schema isn't ok.



Copyright © 2016 Silverpeas. All Rights Reserved.