public class OrgUnit extends FortEntity implements Graphable, Serializable
AdminRole
, OrgUnit
,
SDSet
etc...) are used to carry data between three Fortress
layers.starting with the (1) Manager layer down thru middle (2) Process layer and it's processing rules into
(3) DAO layer where persistence with the OpenLDAP server occurs.
DelAdminMgrImpl
, DelAccessMgrImpl
, DelReviewMgrImpl
,...AdminRoleP
, OrgUnitP
,...AdminRoleDAO
, OrgUnitDAO
,...name
and type
set before passing into DelAdminMgrImpl
or DelReviewMgrImpl
APIs.
Create methods usually require more attributes (than Read) due to constraints enforced between entities.
This entity implements both User and Permission OU pool functionality that defines org membership of entities for ARBAC02 style admin checks..
The unique key to locate an OrgUnit entity (which is subsequently assigned both to Users and Permissions) is 'OrgUnit.name' and 'OrgUnit.Type'.
An OrgUnit name may contain alphanumeric and simple symbols that are safe text (.,:;-_). Any non-safe text will be encoded before persistence. Valid names include:
There is a Many-to-One relationship between a User and OrgUnit.
User
*<->1 OrgUnit
There is a Many-to-One relationship between a PermObj
object and OrgUnit
.
PermObj
*<->1 OrgUnit
Example to create new ARBAC User OrgUnit:
OrgUnit myUserOU = new OrgUnit("MyUserOrgName", OrgUnit.Type.USER);
myUserOU.setDescription("This is a test User OrgUnit");
DelAdminMgr delAdminMgr = DelAdminMgrFactory.createInstance();
delAdminMgr.add(myUserOU);
This will create a User OrgUnit that can be used as a target for User OU and AdminRole OS-U assignments.
Example to create new ARBAC Perm OrgUnit:
OrgUnit myPermOU = new OrgUnit("MyPermOrgName", OrgUnit.Type.PERM);
myPermOU.setDescription("This is a test Perm OrgUnit");
DelAdminMgr delAdminMgr = DelAdminMgrFactory.createInstance();
delAdminMgr.add(myPermOU);
This will create a Perm OrgUnit that can be used as a target for Perm OU and AdminRole OS-P assignments.
1. organizationalUnit Structural Object Class is used to store basic attributes like ou and description.
------------------------------------------ objectclass ( 2.5.6.5 NAME 'organizationalUnit' DESC 'RFC2256: an organizational unit' SUP top STRUCTURAL MUST ou MAY ( userPassword $ searchGuide $ seeAlso $ businessCategory $ x121Address $ registeredAddress $ destinationIndicator $ preferredDeliveryMethod $ telexNumber $ teletexTerminalIdentifier $ telephoneNumber $ internationaliSDNNumber $ facsimileTelephoneNumber $ street $ postOfficeBox $ postalCode $ postalAddress $ physicalDeliveryOfficeName $ st $ l $ description ) ) ------------------------------------------
2. ftOrgUnit Structural objectclass is used to store the OrgUnit internal id.
------------------------------------------ Fortress Organizational Structural Object Class objectclass ( 1.3.6.1.4.1.38088.2.6 NAME 'ftOrgUnit' DESC 'Fortress OrgUnit Structural Object Class' SUP organizationalunit STRUCTURAL MUST ( ftId ) MAY ( ftParents ) ) ------------------------------------------
3. ftMods AUXILIARY Object Class is used to store Fortress audit variables on target entity.
------------------------------------------ Fortress Audit Modification Auxiliary Object Class objectclass ( 1.3.6.1.4.1.38088.3.4 NAME 'ftMods' DESC 'Fortress Modifiers AUX Object Class' AUXILIARY MAY ( ftModifier $ ftModCode $ ftModId ) ) ------------------------------------------
Modifier and Type | Class and Description |
---|---|
static class |
OrgUnit.Type
The OrgUnit 'Type' attribute is required and used to specify which OrgUnit tree a particular entity is in reference to.
|
Modifier and Type | Field and Description |
---|---|
OrgUnit.Type |
type
Maps to the location for a particular OrgUnit entity to either the User,
ou=OS-U , or Permission, ou=OS-P , tree in ldap. |
adminSession, contextId, modCode, modId, sequenceId
Constructor and Description |
---|
OrgUnit()
Default constructor is used by internal Fortress classes.
|
OrgUnit(String ou)
Construct a OrgUnit entity with a given ou name.
|
OrgUnit(String ou,
OrgUnit.Type type)
Construct a OrgUnit entity with a given ou name and specified type - 'USER' or 'PERM'.
|
Modifier and Type | Method and Description |
---|---|
void |
delParent(String parent)
Set the occupant attribute with the contents of the User dn.
|
boolean |
equals(Object thatObj) |
Set<String> |
getChildren()
Return the Set of child orgUnit names (direct descendants) of this orgUnit.
|
String |
getDescription()
Returns optional description that is associated with OrgUnit.
|
String |
getId()
Return the internal id that is associated with OrgUnit.
|
String |
getName()
Get the name required attribute of the OrgUnit object
|
Set<String> |
getParents()
Get the names of orgUnits that are parents (direct ascendants) of this orgUnit.
|
OrgUnit.Type |
getType()
Return the type of OrgUnit for this entity.
|
int |
hashCode() |
void |
setChildren(Set<String> children)
Set the Set of child orgUnit names (direct descendants) of this orgUnit
|
void |
setDescription(String description)
Sets the optional description that is associated with OrgUnit.
|
void |
setId()
Generate an internal Id that is associated with OrgUnit.
|
void |
setId(String id)
Set the internal Id that is associated with OrgUnit.
|
void |
setName(String name)
Sets the required name attribute on the OrgUnit object
|
void |
setParent(String parent)
Set the occupant attribute with the contents of the User dn.
|
void |
setParents(Set<String> parents)
Set the names of orgUnit names that are parents (direct ascendants) of this orgUnit.
|
void |
setType(OrgUnit.Type type)
Get the type of OrgUnit for this entity.
|
String |
toString() |
getAdminSession, getContextId, getModCode, getModId, getSequenceId, setAdminSession, setContextId, setModCode, setSequenceId
public OrgUnit.Type type
ou=OS-U
, or Permission, ou=OS-P
, tree in ldap.public OrgUnit()
public OrgUnit(String ou)
ou
- maps to same name on on 'organizationalUnit' object class.public OrgUnit(String ou, OrgUnit.Type type)
ou
- maps to same name on on 'organizationalUnit' object class.type
- is used to determine which OrgUnit tree is being targeted - 'USER' or 'PERM'.public String getName()
public void setName(String name)
public String getId()
public void setId(String id)
id
- maps to 'ftId' in 'ftOrgUnit' object class.public void setId()
public OrgUnit.Type getType()
public void setType(OrgUnit.Type type)
type
- contains 'PERM' or 'USER'.public String getDescription()
public void setDescription(String description)
description
- that is mapped to same name in 'organizationalUnit' object class.public Set<String> getParents()
getParents
in interface Graphable
public void setParents(Set<String> parents)
setParents
in interface Graphable
parents
- contains the Set of parent orgUnit names assigned to this orgUnit.public void setParent(String parent)
public void delParent(String parent)
public Set<String> getChildren()
public void setChildren(Set<String> children)
children
- contains the Set of child orgUnit names assigned to this orgUnit.public boolean equals(Object thatObj)
public String toString()
toString
in class Object
Object.toString()
Copyright © 2003-2016, The Apache Software Foundation. All Rights Reserved. Generated 20160718-1621