Class OrganizationalUnitP
- java.lang.Object
-
- org.apache.directory.fortress.core.impl.OrganizationalUnitP
-
public class OrganizationalUnitP extends Object
Process module for the container node used for grouping related nodes within Fortress directory structure. The organizational unit represents the middle nodes that act as containers for other nodes, i.e. ou=People container which groups Users. The organizational unit data is passed usingOrganizationalUnit
class. This class does perform simple data validations. TheFortressAntTask.addContainers()
method calls theadd(org.apache.directory.fortress.core.model.OrganizationalUnit)
from this class during initial base loads. RemovalFortressAntTask.deleteContainers()
is performed during regression tests and should never be executed targeting enabled production directory system datasets.
This class will acceptOrganizationalUnit
, and forward on to it's corresponding DAO classOrganizationalUnitDAO
for add/delete of container.Class will throw
SecurityException
to caller in the event of security policy, data constraint violation or system error internal to DAO object. This class will forward DAO exceptions (CreateException
,,RemoveException
), orValidationException
asSecurityException
s with appropriate error id fromGlobalErrIds
.The
delete(org.apache.directory.fortress.core.model.OrganizationalUnit)
method in this class is destructive as it will remove all nodes below the container using recursive delete function.
Extreme care should be taken during execution to ensure target dn is correct and permanent removal of data is intended. There is no 'undo' for this operation.Simple error mapping is performed in
validate(org.apache.directory.fortress.core.model.OrganizationalUnit)
class.This class is thread safe.
- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description OrganizationalUnitP()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(OrganizationalUnit orgUnit)
Add a new container to the Directory Information Tree (DIT).void
delete(OrganizationalUnit orgUnit)
Remove a container from the Directory Information Tree (DIT).
-
-
-
Method Detail
-
add
public final void add(OrganizationalUnit orgUnit) throws SecurityException
Add a new container to the Directory Information Tree (DIT). After added the node will be inserted after suffix, i.e. ou=NewContainerName, dc=companyName, dc=com.- Parameters:
orgUnit
- contains the ou name and description for target node.- Throws:
SecurityException
- in the event node already present,GlobalErrIds.CNTR_CREATE_FAILED
, validation,GlobalErrIds.CNTR_NAME_NULL
,GlobalErrIds.CNTR_NAME_INVLD
or system error.
-
delete
public final void delete(OrganizationalUnit orgUnit) throws SecurityException
Remove a container from the Directory Information Tree (DIT). After this operation the node will be removed after suffix.The
delete(org.apache.directory.fortress.core.model.OrganizationalUnit)
method in this class is destructive as it will remove all nodes below the container using recursive delete function.
Extreme care should be taken during execution to ensure target dn is correct and permanent removal of data is intended. There is no 'undo' for this operation.- Parameters:
orgUnit
- contains the ou name of container targeted for removal.- Throws:
SecurityException
- in the event node not present,GlobalErrIds.CNTR_DELETE_FAILED
, validation,GlobalErrIds.CNTR_NAME_NULL
,GlobalErrIds.CNTR_NAME_INVLD
or system error.
-
-