FeatureModelerExt CATFmCatalogFacade

Usage: you must use this class as is. You should never derive it.


public class CATFmCatalogFacade

Class representing a Catalog.
Role: This class is a Facade object providing access to a Catalog, according to the provided Accreditations.
It gathers in a single place all operations defined at the Feature Modeler level that can be performed on a Catalog.

LifeCycle information.
The recommended usage is to create Facades as local variables in functions and methods bodies.
Catalog Facades are valid during the whole PLM Session in which they have been bound. They are nevertheless not really intended to be used as global variables or class member data. The life cycle of Facades should not extend beyond the scope of the function in which they have been created.

Access Control information.
Interactions with Feature Modeler entities, either read-only or read+write, are subject to authorization.
On a Facade with no (or insufficient) Accreditations only the methods related to the Facade binding will succeed. All other methods, i.e. those for wich E_ACCESSDENIED is a legal return value, will fail.
To be allowed to interact with a Catalog, an application must be registered as the owner of the Catalog.

See also:


Constructor and Destructor Index


o CATFmCatalogFacade()
Constructs an empty Catalog Facade.
o CATFmCatalogFacade(CATFmCredentials&)
Constructs a Catalog Facade.
o CATFmCatalogFacade(CATFmCatalogFacade&)
Copy constructor.
o CATFmCatalogFacade(CATFmCredentials&,CATUnicodeString&)
Constructs a Catalog Facade.
o ~CATFmCatalogFacade()
Destructor.

Method Index


o BindTo(CATUnicodeString&)
Binds the Facade to a Catalog.
o Clear()
Unbinds the Facade from its bound Catalog.
o CompareCatalogWith(CATFmCatalogFacade&)
Compares the bound Catalogs of two Facades.
o GetCatalogName(CATUnicodeString&)
Retrieves the name of the bound Catalog.
o IsValid()
Checks the Facade validity.
o Subscribe(CATBaseUnknown&,CATFmEventSubscriberMethod)
Subscribes to events on all startups located in the bound Catalog.
o operator!()
Logical-negation (or logical-NOT) operator.
o operator=(CATFmCatalogFacade&)
Assignment operator.

Constructor and Destructor


o CATFmCatalogFacade
public CATFmCatalogFacade()
Constructs an empty Catalog Facade.
Role: This constructor creates a Facade with no accreditation and not bound to any Catalog.
Only the assignment operator can affect the Credentials Set of a Facade after its construction.
o CATFmCatalogFacade
public CATFmCatalogFacade( const iAccreditations)
Constructs a Catalog Facade.
Role: Creates a Facade with the provided Credentials and not bound to any Catalog.
Only the assignment operator can affect the Credentials Set of a Facade after its construction.
Parameters:
iAccreditations
[in] The set of Accreditations obtained by the application.
These Accreditations will be used to authorize or not any operation attempted on the bound Catalog.
Lifecycle: A Facade keeps a copy of the set of accreditations it created with. Any addition of accreditations performed on the Crendentials object after the Facade has been created will not be reflected.
o CATFmCatalogFacade
public CATFmCatalogFacade( const iCatalogFacade)
Copy constructor.
Role: This method creates an exact copy of a Catalog Facade.
Parameters:
iCatalogFacade
[in] The Facade to copy.
o CATFmCatalogFacade
public CATFmCatalogFacade( const iAccreditations,
const iCatalogName)
Constructs a Catalog Facade.
Role: This constructor creates a Facade with the provided credentials and bound to a Catalog.
Only the assignment operator can affect the Credentials Set of a Facade after its construction.
Parameters:
iAccreditations
[in] The set of Accreditations obtained by the application.
These Accreditations will be used to authorize or not any operation attempted on the bound Catalog.
Lifecycle: A Facade keeps a copy of the set of accreditations it created with. Any addition of accreditations performed on the Credentials object after the Facade has been created will not be reflected.
iCatalogName
[in] The name of the Catalog to bind, with its extension.
See also:
o ~CATFmCatalogFacade
public ~CATFmCatalogFacade()
Destructor.

Methods


o BindTo
public BindTo( const iCatalogName)
Binds the Facade to a Catalog.
This method does not affect the Accreditations Set of the Facade.
Parameters:
iCatalogName
The name of the catalog.
Returns:
An HRESULT value.
Legal values:
S_OK
The Catalog has been found and the Facade bound to it.
E_INVALIDARG
The Catalog can not been found.
E_ACCESSDENIED
Credentials do not grant access to this Catalog.
o Clear
public Clear()
Unbinds the Facade from its bound Catalog.
This method does not affect the Accreditations Set of the Facade.
Returns:
This Facade.
o CompareCatalogWith
public CompareCatalogWith( const iCatalogFacade)
Compares the bound Catalogs of two Facades.
Role: compares the bound Catalogs of two Facades without taking the Accreditations into account.
Parameters:
iCatalogFacade
[in] The Catalog to be compared to this.
Returns:
A boolean value.
Legal values:
  • TRUE: if the Facades are either both invalid or both bound to the same Catalog.
  • FALSE: in any other case.
o GetCatalogName
public GetCatalogName( oCatalogName)
Retrieves the name of the bound Catalog.
Parameters:
oCatalogName
[out] A (caller provided) string in which the name of the Catalog will be stored.
If the method fails oCatalogName is not modified, it is otherwise overwritten with the retrieved value.
Returns:
An HRESULT value.
Legal values:
S_OK
The Catalog name has been successfuly retrieved.
E_INVALIDARG
The Facade is not bound to a valid Catalog.
E_ACCESSDENIED
Credentials do not grant access to this Catalog.
E_FAIL
Another failure has occured.
o IsValid
public IsValid()
Checks the Facade validity.
A Catalog Facade remains valid until the PLM session is closed.
Returns:
A boolean value.
Legal values:
  • TRUE: if the Facade is valid.
  • FALSE: if the Facade is invalid.
o Subscribe
public Subscribe( iEventSubscriber,
iProcessingMethod)
Subscribes to events on all startups located in the bound Catalog.
Role: Subscribes to all kinds of events occurring on all late types of startups located in the bound Catalog.
The unsubscribing task is automatically done when the event subscriber instance dies.
Parameters:
iEventSubscriber
An instance of a user-defined class aimed at handling events.
iProcessingMethod
The method to call when an event is received.
Returns:
An HRESULT value.
Legal values:
S_OK
The subscription has been successfully done.
E_INVALIDARG
The Facade is not bound to a valid Catalog.
E_FAIL
Another failure has occured.
See also:
o operator!
public operator!()
Logical-negation (or logical-NOT) operator.
Role: Checks if the Facade is invalid.
A Catalog Facade remains valid until the PLM session is closed.
Returns:
An integer value.
Legal values:
  • 1: if the Facade is invalid.
  • 0: if the Facade is valid.
o operator=
public operator=( const iCatalogFacade)
Assignment operator.
Role: This method transforms this Facade to an exact copy of another Catalog Facade.
Both the Credentials and the bound Catalog are copied.
Parameters:
iCatalogFacade
[in] The Facade to assign.
Returns:
This Facade.

This object is included in the file: CATFmCatalogFacade.h
If needed, your Imakefile.mk should include the module: FeatureModelerExt

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.