Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
/*
BERSERK - a BusinEss Runtime and SEcurity Resources Kit
Copyright (C) 2003 Goncalo Luiz
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
To contact Goncalo Luiz use the following e-mail address (use an @ instead of the _):
gedl_mega.ist.utl.pt
*/
/*
* @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt
*
*
* Created at 19/Out/2003 , 16:43:49
*
*/
package pt.utl.ist.berserk.storage.digester;
import pt.utl.ist.berserk.storage.IStorageBroker;
import pt.utl.ist.berserk.storage.digester.filterManager.FilterChainDigester;
import pt.utl.ist.berserk.storage.digester.filterManager.FilterDefinitionDigester;
import pt.utl.ist.berserk.storage.digester.serviceManager.ServiceDefinitionDigester;
import pt.utl.ist.berserk.storage.filterManager.IPersistentFilterChain;
import pt.utl.ist.berserk.storage.filterManager.IPersistentFilterDefinition;
import pt.utl.ist.berserk.storage.serviceManager.IPersistentServiceDefinition;
/**
* Creates a storage broker based on Apache Commons-Digester.<br/>
* Please refer to BERSERK's manual for details.<br/>
* @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt
*
*
* Created at 19/Out/2003 , 16:43:49
*
*/
public class StorageBrokerDigester implements IStorageBroker
{
private static StorageBrokerDigester instance = null;
private StorageBrokerDigester()
{
}
/**
* Accesses the singleton instance for <code>StorageBrokerDigester</code>. If this is the first access
* a new instance is created.
* @return the singleton instance for <code>StorageBrokerDigester</code>
* @see #resetInstance()
*/
public static synchronized StorageBrokerDigester getInstance()
{
if (instance == null)
{
instance = new StorageBrokerDigester();
}
return instance;
}
/**
* Sets the instance to null. A subsquent access to <code>getInstance</code> creates a new
* unique instance for <code>StorageBrokerDigester</code>
*@see #getInstance()
*/
public static synchronized void resetInstance()
{
instance = null;
}
/**
* Gets a DAO (Data Access Object) for filter configurations
* @return the DAO (Data Access Object) for filter configurations
*/
public IPersistentFilterDefinition getIPersistentFilterDefinition()
{
return new FilterDefinitionDigester();
}
/**
* Gets a DAO (Data Access Object) for services configurations
* @return the DAO (Data Access Object) for services configurations
*/
public IPersistentServiceDefinition getIPersistentServiceDefinition()
{
return new ServiceDefinitionDigester();
}
/**
* Gets a DAO (Data Access Object) for filter chain configurations
* @return the DAO (Data Access Object) for filter chain configurations
*/
public IPersistentFilterChain getIPersistentFilterChain()
{
return new FilterChainDigester();
}
}