|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.security.CmsOrganizationalUnit
public class 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_LOGIN
The flag constant to hide the organizational units from the login form. |
static int |
FLAG_WEBUSERS
The flag constant to mark the organizational units as containing only webusers. |
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 |
hasFlagHideLogin()
Checks if this organizational unit has the "hide from login form" flag set. |
boolean |
hasFlagWebuser()
Checks if this organizational unit has the "webusers" 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 |
setFlagHideLogin()
Sets the "hide from login form" flag. |
void |
setFlags(int value)
Sets this organizational unit flags to the specified value. |
void |
setFlagWebusers()
Sets the "webusers" flag. |
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_LOGIN
public static final int FLAG_WEBUSERS
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()
clone
in class java.lang.Object
Object.clone()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
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 hasFlagHideLogin()
true
if this organizational unit has the "hide from login form" flag setpublic boolean hasFlagWebuser()
true
if this organizational unit has the "webusers" flag setpublic int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public void setDescription(java.lang.String description)
description
- the principal organizational unit to setpublic void setFlagHideLogin()
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 void setFlagWebusers()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |