com.cisco.provisioning.cpe.extensions.services
Class Publisher

java.lang.Object
  extended by com.cisco.provisioning.cpe.extensions.services.Publisher

public abstract class Publisher
extends Object


Constructor Summary
Publisher()
          Default constructor
Publisher(String name)
          Default constructor
 
Method Summary
abstract  void begin()
          Method to begin a publishing.
abstract  void commit()
          Method commits the transaction
abstract  void commitRollback()
          Method commits the rollback transaction
abstract  void connect()
          Method to connect to the publishing datastore.
abstract  void connect(String username, String password)
          Method to connect to the publishing datastore.
abstract  void delete(GenericObject obj)
          Method to delete GenericObject from datastore.
abstract  void disconnect()
          Method to disconnect to the publishing datastore.
 String getName()
           
 GenericObject getOriginalObject(GenericObject obj)
          Method to return the original GenericObject.
 boolean isInterfaceRegistered(Class interfaceClass)
          Method to determine if interfaceClass has been registered.
 boolean isInterfaceRegistered(String interfaceName)
          Method to determine if interfaceName has been registered.
abstract  void registerInterfaces()
          Method which allows plugin writer to register with framework the logical layer objects they are interested in.
abstract  void rollbackDelete(GenericObject obj)
          Method to rollback a delete operation.
abstract  void rollbackUpdate(GenericObject obj)
          Method to rollback an update operation.
abstract  void rollbackWrite(GenericObject obj)
          Method to rollback a write operation.
 void setProperties(Map properties)
          Method to set/update publisher properties.
abstract  void update(GenericObject obj)
          Method to update GenericObject in datastore.
abstract  void write(GenericObject obj)
          Method to write GenericObject to datastore.
 void write(Map map)
          Method to write GenericObject to datastore.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Publisher

public Publisher()
Default constructor


Publisher

public Publisher(String name)
Default constructor

Method Detail

registerInterfaces

public abstract void registerInterfaces()
Method which allows plugin writer to register with framework the logical layer objects they are interested in. Only the names registered will be passed into the write/delete/update methods.


connect

public abstract void connect()
                      throws com.cisco.csrc.publishing.PubPluginConnectException
Method to connect to the publishing datastore.

Throws:
com.cisco.csrc.publishing.PubPluginConnectException

connect

public abstract void connect(String username,
                             String password)
                      throws com.cisco.csrc.publishing.PubPluginConnectException
Method to connect to the publishing datastore.

Throws:
com.cisco.csrc.publishing.PubPluginConnectException

disconnect

public abstract void disconnect()
                         throws com.cisco.csrc.publishing.PubPluginDisconnException
Method to disconnect to the publishing datastore.

Throws:
com.cisco.csrc.publishing.PubPluginDisconnException

begin

public abstract void begin()
                    throws com.cisco.csrc.publishing.PubPluginInternalException
Method to begin a publishing.

Throws:
com.cisco.csrc.publishing.PubPluginInternalException

commit

public abstract void commit()
                     throws com.cisco.csrc.publishing.PubPluginInternalException
Method commits the transaction

Throws:
com.cisco.csrc.publishing.PubPluginInternalException

commitRollback

public abstract void commitRollback()
                             throws com.cisco.csrc.publishing.PubPluginInternalException
Method commits the rollback transaction

Throws:
com.cisco.csrc.publishing.PubPluginInternalException

write

public abstract void write(GenericObject obj)
                    throws com.cisco.csrc.publishing.PubPluginInternalException
Method to write GenericObject to datastore.

Throws:
com.cisco.csrc.publishing.PubPluginInternalException

write

public void write(Map map)
           throws com.cisco.csrc.publishing.PubPluginInternalException
Method to write GenericObject to datastore.

Throws:
com.cisco.csrc.publishing.PubPluginInternalException

delete

public abstract void delete(GenericObject obj)
                     throws com.cisco.csrc.publishing.PubPluginInternalException
Method to delete GenericObject from datastore.

Throws:
com.cisco.csrc.publishing.PubPluginInternalException

update

public abstract void update(GenericObject obj)
                     throws com.cisco.csrc.publishing.PubPluginInternalException
Method to update GenericObject in datastore.

Throws:
com.cisco.csrc.publishing.PubPluginInternalException

rollbackWrite

public abstract void rollbackWrite(GenericObject obj)
                            throws com.cisco.csrc.publishing.PubPluginInternalException
Method to rollback a write operation.

Throws:
com.cisco.csrc.publishing.PubPluginInternalException

rollbackUpdate

public abstract void rollbackUpdate(GenericObject obj)
                             throws com.cisco.csrc.publishing.PubPluginInternalException
Method to rollback an update operation.

Throws:
com.cisco.csrc.publishing.PubPluginInternalException

rollbackDelete

public abstract void rollbackDelete(GenericObject obj)
                             throws com.cisco.csrc.publishing.PubPluginInternalException
Method to rollback a delete operation.

Throws:
com.cisco.csrc.publishing.PubPluginInternalException

setProperties

public void setProperties(Map properties)
Method to set/update publisher properties.


getName

public String getName()

getOriginalObject

public GenericObject getOriginalObject(GenericObject obj)
Method to return the original GenericObject.

Parameters:
obj - is the object which we use to get the original data.
Returns:
a new GenericObject which contains old values.

isInterfaceRegistered

public boolean isInterfaceRegistered(Class interfaceClass)
Method to determine if interfaceClass has been registered.

Returns:
boolean true if the interface was registered and false otherwise.

isInterfaceRegistered

public boolean isInterfaceRegistered(String interfaceName)
                              throws com.cisco.csrc.publishing.PubPluginInternalException
Method to determine if interfaceName has been registered.

Returns:
boolean true if the interface was registered and false otherwise.
Throws:
com.cisco.csrc.publishing.PubPluginInternalException - If the specified class is not a database interface class.