Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

EdgReplicaMetadataCatalog::ReplicaMetadataCatalogImpl Class Reference

Inheritance diagram for EdgReplicaMetadataCatalog::ReplicaMetadataCatalogImpl:

EdgReplicaMetadataCatalog::ReplicaMetadataCatalog List of all members.

Public Methods

 ReplicaMetadataCatalogImpl (const std::string &url, int timeOut)
 create a new RemoteLocalReplicaCatalog. More...

virtual ~ReplicaMetadataCatalogImpl ()
const std::string & getUrl () const
 get the URL this ReplicaMetadataCatalog resides at. More...

virtual void addAlias (const std::string &guid, const std::string &alias) throw (AliasExistsException, ValueTooLongException, CommunicationException)
 Add an alias into catalog. More...

virtual void removeAlias (const std::string &guid, const std::string &alias) throw (CommunicationException)
 Remove an alias from the catalog. More...

virtual bool aliasExists (const std::string &alias) const throw (CommunicationException)
 Do we have a given alias in the catalog? More...

virtual bool guidExists (const std::string &guid) const throw (CommunicationException)
 Do we have a given guid in the catalog? More...

virtual const std::string guidForAlias (const std::string &alias) const throw (NoSuchAliasException, CommunicationException)
 Find a corresponding guid for a given alias. More...

virtual void getAliases (const std::string &guid, Aliases_t &vec) const throw (NoSuchGuidException, CommunicationException)
 Retrieve the list of all aliases pointing to the same guid. More...

virtual void createAliasAttributeDefinition (const AttributeDefinition &attrDef) throw (AttributeDefinitionExistsException, UnsupportedAttributeTypeException, EmptyAttributeNameException, ValueTooLongException, CommunicationException)
 Create a new alias Attribute Definition in the Catalog. More...

virtual void createAliasAttributeDefinition (const std::string &attrName) throw (AttributeDefinitionExistsException, UnsupportedAttributeTypeException, EmptyAttributeNameException, ValueTooLongException, CommunicationException)
virtual void getAliasAttributeDefinitions (AttrDefs_t &ads) const throw (CommunicationException)
 Retrieve the list of all available alias attribute definitions. More...

virtual AttributeDefinition getAliasAttributeDefinition (const std::string &attrAliasName) const throw (CommunicationException)
 Retrieve the alias attribute definition. More...

virtual bool aliasAttributeDefinitionExists (const std::string &attrName) const throw (CommunicationException)
 Do we have an alias attribute definition for a given attribute name? More...

virtual void removeAliasAttributeDefinition (const std::string &attrName) throw (NoSuchAttributeDefinitionException, EmptyAttributeNameException, CommunicationException)
 Delete an alias Attribute Definition from the Catalog. More...

virtual void createGuidAttributeDefinition (const AttributeDefinition &attrDef) throw (AttributeDefinitionExistsException, UnsupportedAttributeTypeException, EmptyAttributeNameException, ValueTooLongException, CommunicationException)
 Create a new guid Attribute Definition in the Catalog. More...

virtual void createGuidAttributeDefinition (const std::string &attrName) throw (AttributeDefinitionExistsException, UnsupportedAttributeTypeException, EmptyAttributeNameException, ValueTooLongException, CommunicationException)
virtual void getGuidAttributeDefinitions (AttrDefs_t &ads) const throw (CommunicationException)
 Retrieve the list of all available attribute definitions. More...

virtual AttributeDefinition getGuidAttributeDefinition (const std::string &attrGuidName) const throw (CommunicationException)
 Retrieve the guid attribute definition. More...

virtual bool guidAttributeDefinitionExists (const std::string &attrName) const throw (CommunicationException)
 Do we have an attribute definition for a given attribute name? More...

virtual void removeGuidAttributeDefinition (const std::string &attrName) throw (NoSuchAttributeDefinitionException, EmptyAttributeNameException, CommunicationException)
 Delete a guid Attribute Definition from the Catalog. More...

virtual const std::string setGuidAttribute (const std::string &guidName, const std::string &attrDefnName, const std::string &attrValue) throw (NoSuchAttributeDefinitionException, NoSuchGuidException, ValueTooLongException, CommunicationException)
 Returns the old guid attribute, or empty string if no old attribute exists. More...

virtual const std::string setStringGuidAttribute (const std::string &guidName, const std::string &attrDefnName, const std::string &attrValue) throw (NoSuchAttributeDefinitionException, NoSuchGuidException, ValueTooLongException, UnappropriateAttributeTypeException, CommunicationException)
 Returns the old guid attribute, or empty string if no old attribute exists. More...

virtual int setIntGuidAttribute (const std::string &guidName, const std::string &attrDefnName, int attrValue) throw (NoSuchAttributeDefinitionException, NoSuchGuidException, ValueTooLongException, UnappropriateAttributeTypeException, CommunicationException)
virtual float setFloatGuidAttribute (const std::string &guidName, const std::string &attrDefnName, float attrValue) throw (NoSuchAttributeDefinitionException, NoSuchGuidException, ValueTooLongException, UnappropriateAttributeTypeException, CommunicationException)
virtual const std::string getGuidAttribute (const std::string &guidName, const std::string &attrDefnName) const throw (NoSuchGuidException, NoSuchAttributeDefinitionException, CommunicationException)
 Returns the guid attribute, or empty string if no attribute exists. More...

virtual const std::string getStringGuidAttribute (const std::string &guidName, const std::string &attrDefnName) const throw (NoSuchGuidException, NoSuchAttributeDefinitionException, UnappropriateAttributeTypeException, CommunicationException)
 Returns the guid attribute, or empty string if no attribute exists. More...

virtual int getIntGuidAttribute (const std::string &guidName, const std::string &attrDefnName) const throw (NoSuchGuidException, NoSuchAttributeDefinitionException, UnappropriateAttributeTypeException, CommunicationException)
virtual float getFloatGuidAttribute (const std::string &guidName, const std::string &attrDefnName) const throw (NoSuchGuidException, NoSuchAttributeDefinitionException, UnappropriateAttributeTypeException, CommunicationException)
virtual void removeGuidAttribute (const std::string &guidName, const std::string &attrDefnName) throw (NoSuchGuidException, NoSuchAttributeDefinitionException, CommunicationException)
 Removes the attribute for a given guid. More...

virtual const std::string setAliasAttribute (const std::string &aliasName, const std::string &attrDefnName, const std::string &attrValue) throw (NoSuchAttributeDefinitionException, NoSuchAliasException, ValueTooLongException, CommunicationException)
 Returns the old alias attribute, or empty string if no old attribute exists. More...

virtual const std::string setStringAliasAttribute (const std::string &aliasName, const std::string &attrDefnName, const std::string &attrValue) throw (NoSuchAttributeDefinitionException, NoSuchAliasException, ValueTooLongException, UnappropriateAttributeTypeException, CommunicationException)
virtual int setIntAliasAttribute (const std::string &aliasName, const std::string &attrDefnName, int attrValue) throw (NoSuchAttributeDefinitionException, NoSuchAliasException, ValueTooLongException, UnappropriateAttributeTypeException, CommunicationException)
virtual float setFloatAliasAttribute (const std::string &aliasName, const std::string &attrDefnName, float attrValue) throw (NoSuchAttributeDefinitionException, NoSuchAliasException, ValueTooLongException, UnappropriateAttributeTypeException, CommunicationException)
virtual const std::string getAliasAttribute (const std::string &aliasName, const std::string &attrDefnName) const throw (NoSuchAliasException, NoSuchAttributeDefinitionException, CommunicationException)
 Returns the alias attribute, or empty string if no attribute exists. More...

virtual const std::string getStringAliasAttribute (const std::string &aliasName, const std::string &attrDefnName) const throw (NoSuchAliasException, NoSuchAttributeDefinitionException, UnappropriateAttributeTypeException, CommunicationException)
virtual int getIntAliasAttribute (const std::string &aliasName, const std::string &attrDefnName) const throw (NoSuchAliasException, NoSuchAttributeDefinitionException, UnappropriateAttributeTypeException, CommunicationException)
virtual float getFloatAliasAttribute (const std::string &aliasName, const std::string &attrDefnName) const throw (NoSuchAliasException, NoSuchAttributeDefinitionException, UnappropriateAttributeTypeException, CommunicationException)
virtual void removeAliasAttribute (const std::string &aliasName, const std::string &attrDefnName) throw (NoSuchAliasException, NoSuchAttributeDefinitionException, CommunicationException)
 Removes the attribute for a given alias. More...

virtual void setDefaultResultLength (int resultLength) throw (CommunicationException)
 Set the number of mappings that will be displayed by default. More...

virtual int getDefaultResultLength () const throw (CommunicationException)
 Return the number of mappings that will be displayed by default. More...

virtual void getColumnSizes (ColumnSizes &cs) const throw (CommunicationException)
 Return the DB schema defined column sizes for guid, alias and attr. More...

virtual void getMappingsWithAttributes (const std::vector< std::string > &guids, std::vector< Mapping > &mappings) const throw (CommunicationException)
 Return the mappings for a list of guids. More...

virtual void setMappingsWithAttributes (const std::vector< Mapping > &mappings) const throw (CommunicationException, NoSuchAttributeDefinitionException, UnappropriateAttributeTypeException, AliasExistsException)
 Add a set of guid to alias mappings, with optional guid and alias attributes to the database. More...

virtual void getMappingsByGuid (const std::string &guidPattern, GaMap &mappings) const throw (CommunicationException)
 Return the guid to logical filename mappings which match the given guid name pattern The result will be an empty if no mapppings are found. More...

virtual void getMappingsByGuid (const std::string &guidPattern, int resultLength, GaMap &mappings) const throw (CommunicationException)
 Return the guid to physical filename mappings which contain a guid that matches the given guidPattern. More...

virtual void getMappingsByGuid (const std::string &guidPattern, int resultLength, int resultStart, GaMap &mappings) const throw (CommunicationException)
 Return the guid to physical filename mappings which contain a guid that matches the given guidPattern. More...

virtual void getMappingsByAlias (const std::string &aliasPattern, GaMap &mappings) const throw (CommunicationException)
 Return the guid to logical filename mappings which match the given alias name pattern The result will be an empty if no mapppings are found. More...

virtual void getMappingsByAlias (const std::string &aliasPattern, int resultLength, GaMap &mappings) const throw (CommunicationException)
 Return the guid to logical filename mappings which match the given alias name pattern The result will be an empty if no mapppings are found. More...

virtual void getMappingsByAlias (const std::string &aliasPattern, int resultLength, int resultStart, GaMap &mappings) const throw (CommunicationException)
 Return the guid to logical filename mappings which match the given alias name pattern The result will be an empty if no mapppings are found. More...

virtual void getMappingsByGuidAttribute (const std::string &name, const std::string &value, GaMap &mappings) const throw (NoSuchAttributeDefinitionException, CommunicationException)
 Return the guid to logical filename mappings which have a given attribute name=value pair. More...

virtual void getMappingsByGuidAttribute (const std::string &name, const std::string &value, int resultLength, GaMap &mappings) const throw (NoSuchAttributeDefinitionException, CommunicationException)
 Return the guid to logical filename mappings which have a given attribute name=value pair. More...

virtual void getMappingsByGuidAttribute (const std::string &name, const std::string &value, int resultLength, int resultStart, GaMap &mappings) const throw (NoSuchAttributeDefinitionException, CommunicationException)
 Return the guid to logical filename mappings which have a given attribute name=value pair. More...

virtual void getMappingsByAliasAttribute (const std::string &name, const std::string &value, GaMap &mappings) const throw (NoSuchAttributeDefinitionException, CommunicationException)
 Return the guid to logical filename mappings which have a given attribute name=value pair. More...

virtual void getMappingsByAliasAttribute (const std::string &name, const std::string &value, int resultLength, GaMap &mappings) const throw (NoSuchAttributeDefinitionException, CommunicationException)
 Return the guid to logical filename mappings which have a given attribute name=value pair. More...

virtual void getMappingsByAliasAttribute (const std::string &name, const std::string &value, int resultLength, int resultStart, GaMap &mappings) const throw (NoSuchAttributeDefinitionException, CommunicationException)
 Return the guid to logical filename mappings which have a given attribute name=value pair. More...

virtual void getMappingsByAttribute (const std::string &SQLQuery, int resultLength, GaMap &mappings) const throw (CommunicationException)
 Retrieve mappings by SQL query on attributes. More...

virtual void getMappingsByAttribute (const std::string &SQLQuery, int resultLength, int resultStart, GaMap &mappings) const throw (CommunicationException)
 Retrieve mappings by SQL query on attributes. More...

virtual void getMappingsWithAttributes (const std::string &SQLQuery, int resultLength, std::vector< Mapping > &mappings) const throw (NoSuchAttributeDefinitionException, InvalidQueryException, CommunicationException)
 Return the guid to alias mappings which the PFNs corresponding to the given conditions, along with their attributes. More...

virtual void getMappingsWithAttributes (const std::string &SQLQuery, int resultLength, int resultStart, std::vector< Mapping > &mappings) const throw (NoSuchAttributeDefinitionException, InvalidQueryException, CommunicationException)
 Return the guid to alias mappings which the PFNs corresponding to the given conditions, along with their attributes. More...

virtual const std::string getVersion () const throw (CommunicationException)
 Return RMC server version as std::string
Exceptions:
CommunicationException  in case of an unknown server error.
More...


virtual const std::string getInterfaceVersion () const throw (CommunicationException)
 Return RMC server interface version as std::string
Exceptions:
CommunicationException  in case of an unknown server error.
More...


virtual const std::string getSchemaVersion () const throw (CommunicationException)
 Return RMC server schema version as std::string
Exceptions:
CommunicationException  in case of an unknown server error.
More...


virtual const std::string ping () const throw (CommunicationException)
 Check if a server is alive. More...


Detailed Description

Author:
James Casey , Radovan Chytracek
Version:
Id:
ReplicaMetadataCatalogImpl.h,v 1.25 2004/06/27 15:42:09 jamesc Exp


Constructor & Destructor Documentation

ReplicaMetadataCatalogImpl const std::string &    url,
int    timeOut
 

create a new RemoteLocalReplicaCatalog.

Parameters:
url  The URL of the LocalReplicaCatalog to connect to. This will normally be a normal http/s URI which points to a SOAP endpoint.
timeOut  the time-out value, default is 30s, if positive it means seconds, if negative it means microseconds

~ReplicaMetadataCatalogImpl   [virtual]
 


Member Function Documentation

const std::string & getUrl   const [virtual]
 

get the URL this ReplicaMetadataCatalog resides at.

Returns:
the URL

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void addAlias const std::string &    guid,
const std::string &    alias
throw (AliasExistsException, ValueTooLongException, CommunicationException) [virtual]
 

Add an alias into catalog.

Parameters:
guid  the guid name
alias  the new alias name
Exceptions:
AliasExistsException  if an alias already exists
ValueTooLongException  if the attrName is longer than column size in DB schema
See also:
ColumnSizes , getColumnSizes( ColumnSizes & )
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void removeAlias const std::string &    guid,
const std::string &    alias
throw (CommunicationException) [virtual]
 

Remove an alias from the catalog.

Parameters:
guid  the guid name
alias  the alias name to be removed
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

bool aliasExists const std::string &    alias const throw (CommunicationException) [virtual]
 

Do we have a given alias in the catalog?

Parameters:
alias  The alias we are checking for
Returns:
true if we have a mapping for the alias, false otherwise
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

bool guidExists const std::string &    guid const throw (CommunicationException) [virtual]
 

Do we have a given guid in the catalog?

Parameters:
guid  The guid we are checking for
Returns:
true if we have a mapping for the guid, false otherwise
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

const std::string guidForAlias const std::string &    alias const throw (NoSuchAliasException, CommunicationException) [virtual]
 

Find a corresponding guid for a given alias.

Parameters:
alias  the alias name
Returns:
the guid
Exceptions:
NoSuchAliasException  if a guid with the given name does not exists
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getAliases const std::string &    guid,
Aliases_t   vec
const throw (NoSuchGuidException, CommunicationException) [virtual]
 

Retrieve the list of all aliases pointing to the same guid.

Parameters:
guid  the guid
vec  the vector of alias names gets filled if success, empty otherwise
Exceptions:
NoSuchGuidException  if a guid with the given name does not exists
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void createAliasAttributeDefinition const AttributeDefinition   attrDef throw (AttributeDefinitionExistsException, UnsupportedAttributeTypeException, EmptyAttributeNameException, ValueTooLongException, CommunicationException) [virtual]
 

Create a new alias Attribute Definition in the Catalog.

Parameters:
attrDef  The name of the new alias atribute
Exceptions:
AttributeAlreadyExistsException  if an attribute with the given name already exists
EmptyAttributeNameException  if an attrName is empty
ValueTooLongException  if the attrName is longer than column size in DB schema
See also:
ColumnSizes , getColumnSizes( ColumnSizes & ) , AttributeDefinition
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void createAliasAttributeDefinition const std::string &    attrName throw (AttributeDefinitionExistsException, UnsupportedAttributeTypeException, EmptyAttributeNameException, ValueTooLongException, CommunicationException) [virtual]
 

void getAliasAttributeDefinitions AttrDefs_t   ads const throw (CommunicationException) [virtual]
 

Retrieve the list of all available alias attribute definitions.

Parameters:
ads  the reference to a vector to be filled by the alias attribute definition names
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

AttributeDefinition getAliasAttributeDefinition const std::string &    attrAliasName const throw (CommunicationException) [virtual]
 

Retrieve the alias attribute definition.

Parameters:
attrAliasName  the attribute name
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

bool aliasAttributeDefinitionExists const std::string &    attrName const throw (CommunicationException) [virtual]
 

Do we have an alias attribute definition for a given attribute name?

Parameters:
attrName  the name of an alias attribute to check for
Returns:
true if the attribute name is there.
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void removeAliasAttributeDefinition const std::string &    attrName throw (NoSuchAttributeDefinitionException, EmptyAttributeNameException, CommunicationException) [virtual]
 

Delete an alias Attribute Definition from the Catalog.

This will also remove any attribute value with this definition from GUID and Physical FileName entries in the Catalog.

Parameters:
attrName  the name of the alias attribute definition to remove
Exceptions:
NoSuchAttributeDefinitionException  if an attribute definition with the given name does not exist
EmptyAttributeNameException  if an attrName is empty
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void createGuidAttributeDefinition const AttributeDefinition   attrDef throw (AttributeDefinitionExistsException, UnsupportedAttributeTypeException, EmptyAttributeNameException, ValueTooLongException, CommunicationException) [virtual]
 

Create a new guid Attribute Definition in the Catalog.

Parameters:
attrDef  The name of the new guid atribute
Exceptions:
AttributeAlreadyExistsException  if an attribute with the given name already exists
EmptyAttributeNameException  if an attrName is empty
ValueTooLongException  if the attrName is longer than column size in DB schema
See also:
ColumnSizes , getColumnSizes( ColumnSizes & ) , AttributeDefinition
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void createGuidAttributeDefinition const std::string &    attrName throw (AttributeDefinitionExistsException, UnsupportedAttributeTypeException, EmptyAttributeNameException, ValueTooLongException, CommunicationException) [virtual]
 

void getGuidAttributeDefinitions AttrDefs_t   ads const throw (CommunicationException) [virtual]
 

Retrieve the list of all available attribute definitions.

Parameters:
ads  the reference to a vector to be filled by the attribute definition names
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

AttributeDefinition getGuidAttributeDefinition const std::string &    attrGuidName const throw (CommunicationException) [virtual]
 

Retrieve the guid attribute definition.

Parameters:
attrGuidName  the guid attribute name
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

bool guidAttributeDefinitionExists const std::string &    attrName const throw (CommunicationException) [virtual]
 

Do we have an attribute definition for a given attribute name?

Parameters:
attrName  the name of attribute to check for
Returns:
true if the attribute name is there.
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void removeGuidAttributeDefinition const std::string &    attrName throw (NoSuchAttributeDefinitionException, EmptyAttributeNameException, CommunicationException) [virtual]
 

Delete a guid Attribute Definition from the Catalog.

This will also remove any attribute value with this definition from GUID and Physical FileName entries in the Catalog.

Parameters:
attrName  the name of the attribute definition to remove
Exceptions:
NoSuchAttributeDefinitionException  if an attribute definition with the given name does not exist
EmptyAttributeNameException  if an attrName is empty
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

const std::string setGuidAttribute const std::string &    guidName,
const std::string &    attrDefnName,
const std::string &    attrValue
throw (NoSuchAttributeDefinitionException, NoSuchGuidException, ValueTooLongException, CommunicationException) [virtual]
 

Returns the old guid attribute, or empty string if no old attribute exists.

Parameters:
guidName  the guid name
attrDefnName  the attribute definition name
attrValue  the new attribute value
Returns:
and old attribute value if exists already
Exceptions:
NoSuchAttributeDefinitionException  if attr. def. is not valid
NoSuchGuidException  if guid name is not valid
ValueTooLongException  if the attrName is longer than column size in DB schema
See also:
ColumnSizes , getColumnSizes( ColumnSizes & )
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

const std::string setStringGuidAttribute const std::string &    guidName,
const std::string &    attrDefnName,
const std::string &    attrValue
throw (NoSuchAttributeDefinitionException, NoSuchGuidException, ValueTooLongException, UnappropriateAttributeTypeException, CommunicationException) [virtual]
 

Returns the old guid attribute, or empty string if no old attribute exists.

Parameters:
guidName  the guid name
attrDefnName  the attribute definition name
attrValue  the new attribute value
Returns:
and old attribute value if exists already
Exceptions:
NoSuchAttributeDefinitionException  if attr. def. is not valid
NoSuchGuidException  if guid name is not valid
ValueTooLongException  if the attrName is longer than column size in DB schema
See also:
ColumnSizes , getColumnSizes( ColumnSizes & )
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

int setIntGuidAttribute const std::string &    guidName,
const std::string &    attrDefnName,
int    attrValue
throw (NoSuchAttributeDefinitionException, NoSuchGuidException, ValueTooLongException, UnappropriateAttributeTypeException, CommunicationException) [virtual]
 

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

float setFloatGuidAttribute const std::string &    guidName,
const std::string &    attrDefnName,
float    attrValue
throw (NoSuchAttributeDefinitionException, NoSuchGuidException, ValueTooLongException, UnappropriateAttributeTypeException, CommunicationException) [virtual]
 

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

const std::string getGuidAttribute const std::string &    guidName,
const std::string &    attrDefnName
const throw (NoSuchGuidException, NoSuchAttributeDefinitionException, CommunicationException) [virtual]
 

Returns the guid attribute, or empty string if no attribute exists.

Parameters:
guidName  the guid name
attrDefnName  the attribute definition name
Returns:
an attribute value if exists
Exceptions:
NoSuchAttributeDefinitionException  if attr. def. is not valid
NoSuchGuidException  if guid name is not valid
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

const std::string getStringGuidAttribute const std::string &    guidName,
const std::string &    attrDefnName
const throw (NoSuchGuidException, NoSuchAttributeDefinitionException, UnappropriateAttributeTypeException, CommunicationException) [virtual]
 

Returns the guid attribute, or empty string if no attribute exists.

Parameters:
guidName  the guid name
attrDefnName  the attribute definition name
Returns:
an attribute value if exists
Exceptions:
NoSuchAttributeDefinitionException  if attr. def. is not valid
NoSuchGuidException  if guid name is not valid
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

int getIntGuidAttribute const std::string &    guidName,
const std::string &    attrDefnName
const throw (NoSuchGuidException, NoSuchAttributeDefinitionException, UnappropriateAttributeTypeException, CommunicationException) [virtual]
 

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

float getFloatGuidAttribute const std::string &    guidName,
const std::string &    attrDefnName
const throw (NoSuchGuidException, NoSuchAttributeDefinitionException, UnappropriateAttributeTypeException, CommunicationException) [virtual]
 

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void removeGuidAttribute const std::string &    guidName,
const std::string &    attrDefnName
throw (NoSuchGuidException, NoSuchAttributeDefinitionException, CommunicationException) [virtual]
 

Removes the attribute for a given guid.

Parameters:
guidName  the guid name
attrDefnName  the attribute definition name
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

const std::string setAliasAttribute const std::string &    aliasName,
const std::string &    attrDefnName,
const std::string &    attrValue
throw (NoSuchAttributeDefinitionException, NoSuchAliasException, ValueTooLongException, CommunicationException) [virtual]
 

Returns the old alias attribute, or empty string if no old attribute exists.

Parameters:
aliasName  the alias name
attrDefnName  the attribute definition name
attrValue  the new attribute value
Returns:
and old attribute value if exists already
Exceptions:
NoSuchAttributeDefinitionException  if attr. def. is not valid
NoSuchAliasException  if guid name is not valid
ValueTooLongException  if the attrName is longer than column size in DB schema
See also:
ColumnSizes , getColumnSizes( ColumnSizes & )
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

const std::string setStringAliasAttribute const std::string &    aliasName,
const std::string &    attrDefnName,
const std::string &    attrValue
throw (NoSuchAttributeDefinitionException, NoSuchAliasException, ValueTooLongException, UnappropriateAttributeTypeException, CommunicationException) [virtual]
 

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

int setIntAliasAttribute const std::string &    aliasName,
const std::string &    attrDefnName,
int    attrValue
throw (NoSuchAttributeDefinitionException, NoSuchAliasException, ValueTooLongException, UnappropriateAttributeTypeException, CommunicationException) [virtual]
 

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

float setFloatAliasAttribute const std::string &    aliasName,
const std::string &    attrDefnName,
float    attrValue
throw (NoSuchAttributeDefinitionException, NoSuchAliasException, ValueTooLongException, UnappropriateAttributeTypeException, CommunicationException) [virtual]
 

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

const std::string getAliasAttribute const std::string &    aliasName,
const std::string &    attrDefnName
const throw (NoSuchAliasException, NoSuchAttributeDefinitionException, CommunicationException) [virtual]
 

Returns the alias attribute, or empty string if no attribute exists.

Parameters:
aliasName  the alias name
attrDefnName  the attribute definition name
Returns:
an attribute value if exists
Exceptions:
NoSuchAttributeDefinitionException  if attr. def. is not valid
NoSuchAliasException  if guid name is not valid
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

const std::string getStringAliasAttribute const std::string &    aliasName,
const std::string &    attrDefnName
const throw (NoSuchAliasException, NoSuchAttributeDefinitionException, UnappropriateAttributeTypeException, CommunicationException) [virtual]
 

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

int getIntAliasAttribute const std::string &    aliasName,
const std::string &    attrDefnName
const throw (NoSuchAliasException, NoSuchAttributeDefinitionException, UnappropriateAttributeTypeException, CommunicationException) [virtual]
 

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

float getFloatAliasAttribute const std::string &    aliasName,
const std::string &    attrDefnName
const throw (NoSuchAliasException, NoSuchAttributeDefinitionException, UnappropriateAttributeTypeException, CommunicationException) [virtual]
 

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void removeAliasAttribute const std::string &    aliasName,
const std::string &    attrDefnName
throw (NoSuchAliasException, NoSuchAttributeDefinitionException, CommunicationException) [virtual]
 

Removes the attribute for a given alias.

Parameters:
aliasName  the alias name
attrDefnName  the attribute definition name
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void setDefaultResultLength int    resultLength throw (CommunicationException) [virtual]
 

Set the number of mappings that will be displayed by default.

(for the getMappingsByGuid and getMappingsByPfn methods)..

Parameters:
resultLength  the number of mappings that will be displayed by default
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

int getDefaultResultLength   const throw (CommunicationException) [virtual]
 

Return the number of mappings that will be displayed by default.

(for the getMappingsByGuid and getMappingsByPfn methods).

Returns:
the number of mappings displayed by default.
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getColumnSizes ColumnSizes   cs const throw (CommunicationException) [virtual]
 

Return the DB schema defined column sizes for guid, alias and attr.

def. names

Parameters:
cs  the structure to be filled by the corresponding values
See also:
ColumnSizes
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsWithAttributes const std::vector< std::string > &    guids,
std::vector< Mapping > &    mappings
const throw (CommunicationException) [virtual]
 

Return the mappings for a list of guids.

If some of the guids do not exist, this is not a problem. If there are no results, an empty array is returned

Parameters:
guids  the list of guids, which may be empty, but may not be null
mappings  pointer to a vector of Mapping objects to return the results in

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void setMappingsWithAttributes const std::vector< Mapping > &    mappings const throw (CommunicationException, NoSuchAttributeDefinitionException, UnappropriateAttributeTypeException, AliasExistsException) [virtual]
 

Add a set of guid to alias mappings, with optional guid and alias attributes to the database.

If any problem occurs when inserting entries or attributes (alias already exists, inserting an attribute value for an attribute which doesn't exist, inserting the wrong type of attribute value) the entire transaction is rolled back, and a fault thrown

Parameters:
mappings  a vector of mappings

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsByGuid const std::string &    guidPattern,
GaMap   mappings
const throw (CommunicationException) [virtual]
 

Return the guid to logical filename mappings which match the given guid name pattern The result will be an empty if no mapppings are found.

Parameters:
guidPattern  the guid pattern
mappings  reference to a vector of GuidAliasPair_t to return the results in
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsByGuid const std::string &    guidPattern,
int    resultLength,
GaMap   mappings
const throw (CommunicationException) [virtual]
 

Return the guid to physical filename mappings which contain a guid that matches the given guidPattern.

Return only the first mappings (no more than the resultLength parameter). We assume unix regexp semantics. The result will be an empty set if no mapppings are found.

Parameters:
guidPattern  The GUID pattern we are searching for
resultLength  The number of of mappings that will be displayed
mappings  pointer to a vector of GuidAliasPair_t to return the results in
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsByGuid const std::string &    guidPattern,
int    resultLength,
int    resultStart,
GaMap   mappings
const throw (CommunicationException) [virtual]
 

Return the guid to physical filename mappings which contain a guid that matches the given guidPattern.

Return only a certain number of mappings. Return We assume unix regexp semantics. The result will be an empty set if no mapppings are found.

Parameters:
guidPattern  The GUID pattern we are searching for
resultLength  The number of of mappings that will be displayed
resultStart  The rank of the first mapping that will be displayed
mappings  pointer to a vector of GuidAliasPair_t to return the results in
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsByAlias const std::string &    aliasPattern,
GaMap   mappings
const throw (CommunicationException) [virtual]
 

Return the guid to logical filename mappings which match the given alias name pattern The result will be an empty if no mapppings are found.

Parameters:
aliasPattern  the alias pattern
mappings  reference to a vector of GuidAliasPair_t to return the results in
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsByAlias const std::string &    aliasPattern,
int    resultLength,
GaMap   mappings
const throw (CommunicationException) [virtual]
 

Return the guid to logical filename mappings which match the given alias name pattern The result will be an empty if no mapppings are found.

Parameters:
aliasPattern  the alias pattern
resultLength  The number of of mappings that will be displayed
mappings  reference to a vector of GuidAliasPair_t to return the results in
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsByAlias const std::string &    aliasPattern,
int    resultLength,
int    resultStart,
GaMap   mappings
const throw (CommunicationException) [virtual]
 

Return the guid to logical filename mappings which match the given alias name pattern The result will be an empty if no mapppings are found.

Parameters:
aliasPattern  the alias pattern
resultLength  The number of of mappings that will be displayed
resultStart  The rank of the first mapping that will be displayed
mappings  reference to a vector of GuidAliasPair_t to return the results in
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsByGuidAttribute const std::string &    name,
const std::string &    value,
GaMap   mappings
const throw (NoSuchAttributeDefinitionException, CommunicationException) [virtual]
 

Return the guid to logical filename mappings which have a given attribute name=value pair.

The result will be an empty if no mapppings are found.

Parameters:
name  the name of the attribute
value  the pattern value of attribute to search for
mappings  reference to a vector of GuidAliasPair_t to return the results in
Exceptions:
NoSuchAttributeDefinitionException  if attr. def. is not valid
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsByGuidAttribute const std::string &    name,
const std::string &    value,
int    resultLength,
GaMap   mappings
const throw (NoSuchAttributeDefinitionException, CommunicationException) [virtual]
 

Return the guid to logical filename mappings which have a given attribute name=value pair.

The result will be an empty if no mapppings are found.

Parameters:
name  the name of the attribute
value  the pattern value of attribute to search for
resultLength  The number of of mappings that will be displayed
mappings  reference to a vector of GuidAliasPair_t to return the results in
Exceptions:
NoSuchAttributeDefinitionException  if attr. def. is not valid
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsByGuidAttribute const std::string &    name,
const std::string &    value,
int    resultLength,
int    resultStart,
GaMap   mappings
const throw (NoSuchAttributeDefinitionException, CommunicationException) [virtual]
 

Return the guid to logical filename mappings which have a given attribute name=value pair.

The result will be an empty if no mapppings are found.

Parameters:
name  the name of the attribute
value  the pattern value of attribute to search for
resultLength  The number of of mappings that will be displayed
resultStart  The rank of the first mapping that will be displayed
mappings  reference to a vector of GuidAliasPair_t to return the results in
Exceptions:
NoSuchAttributeDefinitionException  if attr. def. is not valid
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsByAliasAttribute const std::string &    name,
const std::string &    value,
GaMap   mappings
const throw (NoSuchAttributeDefinitionException, CommunicationException) [virtual]
 

Return the guid to logical filename mappings which have a given attribute name=value pair.

The result will be an empty if no mapppings are found.

Parameters:
name  the name of the attribute
value  the pattern value of attribute to search for
mappings  reference to a vector of GuidAliasPair_t to return the results in
Exceptions:
NoSuchAttributeDefinitionException  if attr. def. is not valid
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsByAliasAttribute const std::string &    name,
const std::string &    value,
int    resultLength,
GaMap   mappings
const throw (NoSuchAttributeDefinitionException, CommunicationException) [virtual]
 

Return the guid to logical filename mappings which have a given attribute name=value pair.

The result will be an empty if no mapppings are found.

Parameters:
name  the name of the attribute
value  the pattern value of attribute to search for
resultLength  The number of of mappings that will be displayed
mappings  reference to a vector of GuidAliasPair_t to return the results in
Exceptions:
NoSuchAttributeDefinitionException  if attr. def. is not valid
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsByAliasAttribute const std::string &    name,
const std::string &    value,
int    resultLength,
int    resultStart,
GaMap   mappings
const throw (NoSuchAttributeDefinitionException, CommunicationException) [virtual]
 

Return the guid to logical filename mappings which have a given attribute name=value pair.

The result will be an empty if no mapppings are found.

Parameters:
name  the name of the attribute
value  the pattern value of attribute to search for
resultLength  The number of of mappings that will be displayed
resultStart  The rank of the first mapping that will be displayed
mappings  reference to a vector of GuidAliasPair_t to return the results in
Exceptions:
NoSuchAttributeDefinitionException  if attr. def. is not valid
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsByAttribute const std::string &    SQLQuery,
int    resultLength,
GaMap   mappings
const throw (CommunicationException) [virtual]
 

Retrieve mappings by SQL query on attributes.

Parameters:
SQLQuery  The query
resultLength  The number of hits per call
mappings  The map of GUIDs -> aliases throws CommunicationException in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsByAttribute const std::string &    SQLQuery,
int    resultLength,
int    resultStart,
GaMap   mappings
const throw (CommunicationException) [virtual]
 

Retrieve mappings by SQL query on attributes.

Parameters:
SQLQuery  The query
resultLength  The number of hits per call
resultStart  The rank of the first mapping that will be displayed
mappings  The map of GUIDs -> aliases throws CommunicationException in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsWithAttributes const std::string &    SQLQuery,
int    resultLength,
std::vector< Mapping > &    mappings
const throw (NoSuchAttributeDefinitionException, InvalidQueryException, CommunicationException) [virtual]
 

Return the guid to alias mappings which the PFNs corresponding to the given conditions, along with their attributes.

Return only a certain number of mappings. We assume unix regexp semantics. The result will be an empty set if no mapppings are found.

Parameters:
SQLQuery  The attributes conditions
resultLength  The number of of mappings that will be displayed
mappings  The mappings to be filled into

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

void getMappingsWithAttributes const std::string &    SQLQuery,
int    resultLength,
int    resultStart,
std::vector< Mapping > &    mappings
const throw (NoSuchAttributeDefinitionException, InvalidQueryException, CommunicationException) [virtual]
 

Return the guid to alias mappings which the PFNs corresponding to the given conditions, along with their attributes.

Return only a certain number of mappings. We assume unix regexp semantics. The result will be an empty set if no mapppings are found.

Parameters:
SQLQuery  The attributes conditions
resultLength  The number of of mappings that will be displayed
resultStart  The rank of the first mapping that will be displayed
mappings  The mappings to be filled into

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

const std::string getVersion   const throw (CommunicationException) [virtual]
 

Return RMC server version as std::string

Exceptions:
CommunicationException  in case of an unknown server error.

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

const std::string getInterfaceVersion   const throw (CommunicationException) [virtual]
 

Return RMC server interface version as std::string

Exceptions:
CommunicationException  in case of an unknown server error.

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

const std::string getSchemaVersion   const throw (CommunicationException) [virtual]
 

Return RMC server schema version as std::string

Exceptions:
CommunicationException  in case of an unknown server error.

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

const std::string ping   const throw (CommunicationException) [virtual]
 

Check if a server is alive.

It returns a stats string. If everything is ok, this will start with OK else it will start with FAIL.

Returns:
the stats string
Exceptions:
CommunicationException  in case of an unknown server error

Implements EdgReplicaMetadataCatalog::ReplicaMetadataCatalog.

The EU DataGrid Project. All rights reserved.