ERUCES::TEACLTemplate
#include <teacl_template.h>
The TEACLTemplate class represents an access control list (ACL) template.
The TEACLTemplate class represents an ACL template. ACL Template class TEACLTemplate keeps a group of access rights of principals (TEACLTemplateMember). The relationship between ACLTemplate and ACLTemplateMember is one to many relationship.
Inheritance
- Inherits ERUCES::TEUpdatableObject
Public Types
enum ACL_TEMPLATE_FLAG
| Value | Description |
|---|---|
ACL_NONE | for internal use only |
ACL_CREATOR_OWNER | for internal use only |
ACL_CREATOR_INCLUDED | for internal use only |
Public Member Functions
| Member | Description |
|---|---|
TEACLTemplate() | The TEACLTemplate constructor is the default class constructor. |
TEACLTemplate(const TEACLTemplate &) | The TEACLTemplate constructor is the copy constructor. |
~TEACLTemplate() | The TEACLTemplate constructor is the class destructor. |
void setACLTemplateId(te_oid id) | The setACLTemplateId method sets an ACL's unique Template ID. |
te_oid getACLTemplateId() const | The getACLTemplateId method gets an ACL's unique Template ID. |
void setName(const _TESTD string &name) | The setName method sets the ACL Template's name. |
const _TESTD string getName() const | The getName method gets the ACL Template's name. |
void setFlag(uint32_t flag) | The setFlag method sets the flag. |
ACL_TEMPLATE_FLAG getFlag() const | The getFlag method gets the flag. |
uint32_t MemberCount() const | The MemberCount method returns the number of ACL Template Members in an ACLTemplate object. |
void getMembers(TEObjectContainer &container) const | The getMembers method gets a copy of all ACL Template Members in an ACLTempalte object. |
bool addMember(const TEACLTemplateMember &member) | The addMember method adds an ACL Template Member to an ACL Template object. |
void removeMember(const TEACLTemplateMember &member) | The removeMember method removes an ACL Template Member from a TEACLTemplate object. |
void clearMember() | The clearMember method clears all ACL Template Members from a TEACLTemplate object. |
TEACLTemplateMember operator[](_TESTD pair< uint32_t, te_oid > pid) | The operator method returns a pointer to a TEACLTemplateMember object at the position indicated by the given system id and principal id. |
const TEACLTemplateMember operator[](_TESTD pair< uint32_t, te_oid > pid) const | The operator method returns a constant pointer to the object at the position indicated by the given system id and principal id. |
TEObject * clone() const | The clone method clones an TEACLTemplate object. |
Member Function Documentation
TEACLTemplate()
The TEACLTemplate constructor is the default class constructor.
TEACLTemplate(const TEACLTemplate &)
The TEACLTemplate constructor is the copy constructor.
~TEACLTemplate()
The TEACLTemplate constructor is the class destructor.
void setACLTemplateId(te_oid id)
The setACLTemplateId method sets an ACL's unique Template ID.
Parameters
| Parameter | Description |
|---|---|
id | An object representing the ACL Template ID. |
te_oid getACLTemplateId() const
The getACLTemplateId method gets an ACL's unique Template ID.
Returns: An object representing the ACL Template ID.
void setName(const _TESTD string &name)
The setName method sets the ACL Template's name.
Parameters
| Parameter | Description |
|---|---|
name | A string representing the ACL Template's name. |
const _TESTD string getName() const
The getName method gets the ACL Template's name.
Returns: A string representing the ACL Template's name.
void setFlag(uint32_t flag)
The setFlag method sets the flag.
Parameters
| Parameter | Description |
|---|---|
flag | Flag to be set. Not neccessary to set. Defaults to 1. |
Remark: for internal use only
ACL_TEMPLATE_FLAG getFlag() const
The getFlag method gets the flag.
Returns: Returns the template flag. Usually=1
Remark: for internal use only
uint32_t MemberCount() const
The MemberCount method returns the number of ACL Template Members in an ACLTemplate object.
Returns: An integer representing the number of ACL Template Members in an ACLTemplate object.
void getMembers(TEObjectContainer &container) const
The getMembers method gets a copy of all ACL Template Members in an ACLTempalte object.
Parameters
| Parameter | Description |
|---|---|
container | A container to hold the ACL Template Members. Type of object in the container will be TEACLTempalteMember. |
bool addMember(const TEACLTemplateMember &member)
The addMember method adds an ACL Template Member to an ACL Template object.
Parameters
| Parameter | Description |
|---|---|
member | An TEACLTemplateMember object representing the ACL Template Member to be added. |
Returns: Returns a boolean value indicating if the ACL Template Member has been added to the ACL Template object successfully.
void removeMember(const TEACLTemplateMember &member)
The removeMember method removes an ACL Template Member from a TEACLTemplate object.
Parameters
| Parameter | Description |
|---|---|
member | An TEACLTemplateMember object representing the ACL Template Member to be removed. |
void clearMember()
The clearMember method clears all ACL Template Members from a TEACLTemplate object.
TEACLTemplateMember operator[](_TESTD pair< uint32_t, te_oid > pid)
The operator method returns a pointer to a TEACLTemplateMember object at the position indicated by the given system id and principal id.
Parameters
| Parameter | Description |
|---|---|
pid | Principal identification pair with system id |
Returns: Returns a pointer to the TEACLTemplateMember object.
const TEACLTemplateMember operator[](_TESTD pair< uint32_t, te_oid > pid) const
The operator method returns a constant pointer to the object at the position indicated by the given system id and principal id.
Parameters
| Parameter | Description |
|---|---|
pid | Principal identification pair with system id |
Returns: Returns a constant pointer to the TEACLTemplateMember object.
TEObject * clone() const
The clone method clones an TEACLTemplate object.
Returns: Returns a cloned TEACLTemplate object.