public class OrganizationalUnitP extends Object
OrganizationalUnit
class.
This class does perform simple data validations.
The FortressAntTask.addContainers()
method calls the add(org.apache.directory.fortress.core.model.OrganizationalUnit)
from this
class during initial base loads.
Removal FortressAntTask.deleteContainers()
is performed during regression
tests and should never be executed targeting enabled production directory system datasets.OrganizationalUnit
, and forward on to it's
corresponding DAO class OrganizationalUnitDAO
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
),
or ValidationException
as
SecurityException
s with appropriate
error id from GlobalErrIds
.
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.
Constructor and Description |
---|
OrganizationalUnitP() |
Modifier and Type | Method and 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).
|
public final void add(OrganizationalUnit orgUnit) throws SecurityException
orgUnit
- contains the ou name and description for target node.SecurityException
- in the event node already present,
GlobalErrIds.CNTR_CREATE_FAILED
, validation, GlobalErrIds.CNTR_NAME_NULL
,
GlobalErrIds.CNTR_NAME_INVLD
or system error.public final void delete(OrganizationalUnit orgUnit) throws SecurityException
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.
orgUnit
- contains the ou name of container targeted for removal.SecurityException
- in the event node not present,
GlobalErrIds.CNTR_DELETE_FAILED
, validation,
GlobalErrIds.CNTR_NAME_NULL
,
GlobalErrIds.CNTR_NAME_INVLD
or system error.Copyright © 2003-2016, The Apache Software Foundation. All Rights Reserved. Generated 20160718-1621