Skip to main content

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

Public Types

enum ACL_TEMPLATE_FLAG

ValueDescription
ACL_NONEfor internal use only
ACL_CREATOR_OWNERfor internal use only
ACL_CREATOR_INCLUDEDfor internal use only

Public Member Functions

MemberDescription
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() constThe 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() constThe getName method gets the ACL Template's name.
void setFlag(uint32_t flag)The setFlag method sets the flag.
ACL_TEMPLATE_FLAG getFlag() constThe getFlag method gets the flag.
uint32_t MemberCount() constThe MemberCount method returns the number of ACL Template Members in an ACLTemplate object.
void getMembers(TEObjectContainer &container) constThe 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) constThe operator method returns a constant pointer to the object at the position indicated by the given system id and principal id.
TEObject * clone() constThe 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

ParameterDescription
idAn 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

ParameterDescription
nameA 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

ParameterDescription
flagFlag 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

ParameterDescription
containerA 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

ParameterDescription
memberAn 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

ParameterDescription
memberAn 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

ParameterDescription
pidPrincipal 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

ParameterDescription
pidPrincipal 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.