|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.security.CmsOrganizationalUnit
An organizational unit in OpenCms.
Be sure the flags does not conflict with the flags defined in CmsResource
.
Field Summary | |
static int |
FLAG_HIDE
The flag constant to hide the organizational units from the login form and account management. |
static int |
FLAG_NO_DEFAULTS
The flag constant to prevent default groups and projects to be created while creating the organizational unit. |
static java.lang.String |
SEPARATOR
The character used to separate each level in a fully qualified name. |
Constructor Summary | |
CmsOrganizationalUnit(CmsUUID id,
java.lang.String fqn,
java.lang.String description,
int flags,
CmsUUID projectId)
Creates a new OpenCms organizational unit principal. |
Method Summary | |
void |
addFlag(int flag)
Adds the given flag to the flags for this organizational unit. |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getDescription()
Returns the description of this organizational unit. |
java.lang.String |
getDescription(java.util.Locale locale)
Returns the description of this organizational unit. |
java.lang.String |
getDisplayName(java.util.Locale locale)
Returns the display name for this organizational unit. |
int |
getFlags()
Returns the flags of this organizational unit. |
CmsUUID |
getId()
Returns the id of this organizational unit. |
java.lang.String |
getName()
Returns the fully qualified name of this organizational unit. |
java.lang.String |
getParentFqn()
Returns the full qualified name of the parent organizational unit of this organizational unit. |
static java.lang.String |
getParentFqn(java.lang.String fqn)
Returns the parent fully qualified name. |
CmsUUID |
getProjectId()
Returns the id of the related default project. |
java.lang.String |
getSimpleName()
Returns the simple name of this organizational unit. |
static java.lang.String |
getSimpleName(java.lang.String fqn)
Returns the last name of the given fully qualified name. |
boolean |
hasFlag(int flag)
Checks if this organizational unit has the given flag set. |
boolean |
hasFlagHide()
Checks if this organizational unit has the "hide" flag set. |
boolean |
hasFlagNoDefaults()
Checks if this organizational unit has the "no defaults" flag set. |
int |
hashCode()
|
static java.lang.String |
removeLeadingSeparator(java.lang.String fqn)
Returns the given fully qualified name without leading separator. |
void |
setDescription(java.lang.String description)
Sets the description of this organizational unit. |
void |
setFlagHide()
Sets the "hide" flag. |
void |
setFlagNoDefaults()
Sets the "no defaults" flag. |
void |
setFlags(int value)
Sets this organizational unit flags to the specified value. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int FLAG_HIDE
public static final int FLAG_NO_DEFAULTS
public static final java.lang.String SEPARATOR
Constructor Detail |
public CmsOrganizationalUnit(CmsUUID id, java.lang.String fqn, java.lang.String description, int flags, CmsUUID projectId)
id
- the unique id of the organizational unitfqn
- the fully qualified name of the this organizational unit (should end with slash)description
- the description of the organizational unitflags
- the flags of the organizational unitprojectId
- the id of the related default projectMethod Detail |
public static final java.lang.String getParentFqn(java.lang.String fqn)
This is null
for the root ou, and
the empty string for first level ous.
fqn
- the fully qualified name to get the parent from
public static final java.lang.String getSimpleName(java.lang.String fqn)
fqn
- the fully qualified name to get the last name from
public static java.lang.String removeLeadingSeparator(java.lang.String fqn)
fqn
- the fully qualified name to fix
public void addFlag(int flag)
flag
- the flag to addpublic java.lang.Object clone()
Object.clone()
public boolean equals(java.lang.Object obj)
Object.equals(java.lang.Object)
public java.lang.String getDescription()
This could return also just a macro, so please use the
getDescription(Locale)
method.
public java.lang.String getDescription(java.util.Locale locale)
locale
- the locale
public java.lang.String getDisplayName(java.util.Locale locale)
locale
- the locale
public int getFlags()
The organizational unit flags are used to store special information about the organizational unit state encoded bitwise. Usually the flags int value should not be directly accessed.
public CmsUUID getId()
public java.lang.String getName()
public java.lang.String getParentFqn()
This is null
for the root ou, and the empty string for first level ous.
public CmsUUID getProjectId()
public java.lang.String getSimpleName()
public boolean hasFlag(int flag)
flag
- the flag to check
true
if this organizational unit has the given flag setpublic boolean hasFlagHide()
true
if this organizational unit has the "hide" flag setpublic boolean hasFlagNoDefaults()
true
if this organizational unit has the "no defaults" flag setpublic int hashCode()
Object.hashCode()
public void setDescription(java.lang.String description)
description
- the principal organizational unit to setpublic void setFlagHide()
public void setFlagNoDefaults()
public void setFlags(int value)
The organizational unit flags are used to store special information about the organizational units state encoded bitwise. Usually the flags int value should not be directly accessed.
value
- the value to set this organizational units flags topublic java.lang.String toString()
Object.toString()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |