org.exoplatform.services.wsrp.consumer.impl
Class ProducerRegistryImpl

java.lang.Object
  extended by org.exoplatform.services.wsrp.consumer.impl.ProducerRegistryImpl
All Implemented Interfaces:
ProducerRegistry

public class ProducerRegistryImpl
extends java.lang.Object
implements ProducerRegistry

Author:
Mestrallet Benjamin benjmestrallet@users.sourceforge.net Date: 2 févr. 2004 Time: 23:04:48

Field Summary
protected  org.exoplatform.container.ExoContainer cont
           
 
Constructor Summary
ProducerRegistryImpl(org.exoplatform.container.ExoContainerContext ctx, org.exoplatform.services.database.HibernateService dbService)
           
 
Method Summary
 void addProducer(Producer producer)
          Add a producer to the registry
 Producer createProducerInstance()
          Create a new producer instance according to the implementation
 boolean existsProducer(java.lang.String id)
          Check if a producer with the given ID exists in the registry.
 java.util.Iterator<Producer> getAllProducers()
          Get all producer in the registry
 long getLastModifiedTime()
          Get the last time that a producer is added or removed
 Producer getProducer(java.lang.String id)
          Get the producer for the given URL
 WSRP1ProducerData load(java.lang.String id)
           
 WSRP1ProducerData load(java.lang.String id, org.hibernate.Session session)
           
 java.util.Collection<WSRP1ProducerData> loadAll()
           
 void remove(java.lang.String id)
           
 void removeAll()
           
 void removeAllProducers()
          Remove all producer objects from the registry
 Producer removeProducer(java.lang.String id)
          Remove the producer with the given ID from the registry
 void save(Producer p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cont

protected org.exoplatform.container.ExoContainer cont
Constructor Detail

ProducerRegistryImpl

public ProducerRegistryImpl(org.exoplatform.container.ExoContainerContext ctx,
                            org.exoplatform.services.database.HibernateService dbService)
                     throws org.exoplatform.container.configuration.ConfigurationException
Throws:
org.exoplatform.container.configuration.ConfigurationException
Method Detail

addProducer

public void addProducer(Producer producer)
Description copied from interface: ProducerRegistry
Add a producer to the registry

Specified by:
addProducer in interface ProducerRegistry
Parameters:
producer - The producer to add

getProducer

public Producer getProducer(java.lang.String id)
Description copied from interface: ProducerRegistry
Get the producer for the given URL

Specified by:
getProducer in interface ProducerRegistry
Parameters:
id - The ID of the producer
Returns:
The producer with the given ID

getAllProducers

public java.util.Iterator<Producer> getAllProducers()
Description copied from interface: ProducerRegistry
Get all producer in the registry

Specified by:
getAllProducers in interface ProducerRegistry
Returns:
Iterator with all producers

removeProducer

public Producer removeProducer(java.lang.String id)
Description copied from interface: ProducerRegistry
Remove the producer with the given ID from the registry

Specified by:
removeProducer in interface ProducerRegistry
Parameters:
id - The ID of the producer
Returns:
The producer which had been mapped to this id or null if no producer was found with this id

removeAllProducers

public void removeAllProducers()
                        throws java.lang.Exception
Description copied from interface: ProducerRegistry
Remove all producer objects from the registry

Specified by:
removeAllProducers in interface ProducerRegistry
Throws:
java.lang.Exception

existsProducer

public boolean existsProducer(java.lang.String id)
Description copied from interface: ProducerRegistry
Check if a producer with the given ID exists in the registry.

Specified by:
existsProducer in interface ProducerRegistry
Parameters:
id - The ID of the producer
Returns:
True if producer exists with this ID

createProducerInstance

public Producer createProducerInstance()
Description copied from interface: ProducerRegistry
Create a new producer instance according to the implementation

Specified by:
createProducerInstance in interface ProducerRegistry
Returns:
return a new Producer instance

getLastModifiedTime

public long getLastModifiedTime()
Description copied from interface: ProducerRegistry
Get the last time that a producer is added or removed

Specified by:
getLastModifiedTime in interface ProducerRegistry
Returns:
return long value

save

public final void save(Producer p)
                throws java.lang.Exception
Throws:
java.lang.Exception

loadAll

public final java.util.Collection<WSRP1ProducerData> loadAll()
                                                      throws java.lang.Exception
Throws:
java.lang.Exception

load

public final WSRP1ProducerData load(java.lang.String id)
                             throws java.lang.Exception
Throws:
java.lang.Exception

load

public final WSRP1ProducerData load(java.lang.String id,
                                    org.hibernate.Session session)
                             throws java.lang.Exception
Throws:
java.lang.Exception

remove

public final void remove(java.lang.String id)
                  throws java.lang.Exception
Throws:
java.lang.Exception

removeAll

public final void removeAll()
                     throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2010 eXo Platform SAS. All Rights Reserved.