OSB_CORBA::ResourceWriter_i Class Reference

Inheritance diagram for OSB_CORBA::ResourceWriter_i:

Inheritance graph
[legend]
Collaboration diagram for OSB_CORBA::ResourceWriter_i:

Collaboration graph
[legend]
List of all members.

Detailed Description

Servant implementation of corba::res::ResourceWriter.

The changes are stored to the database only if create(), updStatus() or updData() is called.

Definition at line 186 of file resource_i.h.

Public Member Functions

Static Public Attributes

Protected Member Functions

Private Member Functions

Private Attributes


Constructor & Destructor Documentation

OSB_CORBA::ResourceWriter_i::ResourceWriter_i ( NetworkManager_i nmgri,
const OSB_LIB::Resource::Oid resId 
)

Constructor.

virtual OSB_CORBA::ResourceWriter_i::~ResourceWriter_i (  )  [virtual]

Destructor.

OSB_CORBA::ResourceWriter_i::ResourceWriter_i ( const ResourceWriter_i  )  [private]

Prevent copying: not implemented.


Member Function Documentation

virtual ResourceId OSB_CORBA::ResourceWriter_i::create ( CORBA::Boolean  noWait  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Save changes to the database.

Creates a new resource in the database or updates the existing resource.

Parameters:
noWait Wait if locked by another session?
Returns:
The object id of the newly created or existing Resource.
Exceptions:
OsbCorbaException 
  • insertion of the new resource into database fails.
  • update of the existing resource to the database fails.
Note:
A concrete servant class that must do more than just save the resource overwrites this function.

void OSB_CORBA::ResourceWriter_i::destroy (  )  throw (CORBA::SystemException)

Destroy the servant without saving the changes.

ResourceWriter_i& OSB_CORBA::ResourceWriter_i::operator= ( const ResourceWriter_i  )  [private]

Prevent assignment: not implemented.

virtual OSB_LIB::Resource& OSB_CORBA::ResourceWriter_i::resource (  )  [protected, pure virtual]

Write access to the resource.

Implemented in OSB_CORBA::AccessNumberWriter_i, OSB_CORBA::E164ResourceWriter_i, OSB_CORBA::Ip4AddressWriter_i, OSB_CORBA::IpGroupWriter_i, and OSB_CORBA::TrunkResourceWriter_i.

void OSB_CORBA::ResourceWriter_i::setLoctKey ( const Locators::Key key  ) 

Sets the servant locator key for this writer object servant.

void OSB_CORBA::ResourceWriter_i::setPool ( const corba::imgmt::PoolId &  poolId  )  throw (CORBA::SystemException, OsbCorbaException)

Set the inventory pool.

Parameters:
poolId The new inventory pool of the device.
Exceptions:
OsbCorbaException if changing to pool is not allowed: currently none.
Callers must use updData() to save the change.

void OSB_CORBA::ResourceWriter_i::setStatus ( ResourceStatus  newStatus  )  throw (OsbCorbaException)

Set the resource status.

Parameters:
newStatus New status of the resource.
Exceptions:
OsbCorbaException if the current status is assigned.
OsbCorbaException if newStatus is assigned or quarantine.
Callers must use updStatus() to save the changed status.

virtual void OSB_CORBA::ResourceWriter_i::updData ( CORBA::Boolean  noWait  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

virtual void OSB_CORBA::ResourceWriter_i::updStatus ( CORBA::Boolean  noWait  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

virtual bool OSB_CORBA::ResourceWriter_i::writeToList ( bool  isNew  )  const [protected, pure virtual]

Store the resource in the appropriate resource list.

Parameters:
isNew Flag if the resource was just created (true) or updated (false).
Returns:
true if successful, else false.
The standard implementation of the function just replaces the resource in the list:
          bool E164ResourceWriter_i::writeToList(
              bool // not used: isNew
          ) const
          {
              return nmgri_.getE164List().replace(e164_);
          }

Implemented in OSB_CORBA::AccessNumberWriter_i, OSB_CORBA::E164ResourceWriter_i, OSB_CORBA::Ip4AddressWriter_i, OSB_CORBA::IpGroupWriter_i, and OSB_CORBA::TrunkResourceWriter_i.


Member Data Documentation

const std::string OSB_CORBA::ResourceWriter_i::IFC [static]

String representation for ResourceWriter_i.

Reimplemented from OSB_CORBA::Resource_i.

Reimplemented in OSB_CORBA::AccessNumberWriter_i, OSB_CORBA::E164ResourceWriter_i, OSB_CORBA::Ip4AddressWriter_i, OSB_CORBA::IpGroupWriter_i, and OSB_CORBA::TrunkResourceWriter_i.

Definition at line 192 of file resource_i.h.

Locators::Key OSB_CORBA::ResourceWriter_i::loctKey_ [private]

Servant locator key.

Definition at line 297 of file resource_i.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:28:21 2006 for OSB Library by  doxygen 1.4.7