|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jetspeed.services.JetspeedSecurity
This is a commodity static accessor class around the
JetspeedSecurityService
JetspeedSecurityService
Field Summary | |
static java.lang.String |
JETSPEED_GROUP
|
static java.lang.String |
JETSPEED_GROUP_ID
|
static java.lang.String |
JETSPEED_ROLE_ADMIN
|
static java.lang.String |
JETSPEED_ROLE_USER
|
static char[] |
LC_NUMBERS_AND_LETTERS_ALPHABET
Alphabet consisting of lowercase letters a-z and the digits 0-9 Used to make a random password. |
static char[] |
NUMBERS_AND_LETTERS_ALPHABET
Alphabet consisting of upper and lowercase letters A-Z and the digits 0-9 Used to make a random password. |
static java.lang.String |
PERMISSION_CLOSE
|
static java.lang.String |
PERMISSION_CUSTOMIZE
|
static java.lang.String |
PERMISSION_DETACH
|
static java.lang.String |
PERMISSION_INFO
|
static java.lang.String |
PERMISSION_MAXIMIZE
|
static java.lang.String |
PERMISSION_MINIMIZE
|
static java.lang.String |
PERMISSION_PERSONALIZE
|
static java.lang.String |
PERMISSION_PRINT_FRIENDLY
|
static java.lang.String |
PERMISSION_VIEW
|
Constructor Summary | |
JetspeedSecurity()
|
Method Summary | |
static void |
addGroup(Group group)
|
static void |
addPermission(Permission permission)
|
static void |
addRole(Role role)
|
static void |
addUser(JetspeedUser user)
|
static boolean |
areActionsDisabledForAllUsers()
|
static boolean |
areActionsDisabledForAnon()
|
static void |
changePassword(JetspeedUser user,
java.lang.String oldPassword,
java.lang.String newPassword)
|
static boolean |
checkDisableAccount(java.lang.String username)
|
static boolean |
checkPermission(JetspeedRunData runData,
java.lang.String action,
Portlet portlet)
|
static boolean |
checkPermission(JetspeedRunData runData,
java.lang.String action,
RegistryEntry entry)
|
static boolean |
checkPermission(JetspeedUser user,
Entry entry,
java.lang.String action)
|
static boolean |
checkPermission(JetspeedUser user,
PortalResource resource,
java.lang.String action)
|
static boolean |
checkPermission(JetspeedUser user,
Portlet portlet,
java.lang.String action)
|
static java.lang.String |
convertPassword(java.lang.String password)
|
static java.lang.String |
convertUserName(java.lang.String username)
|
static java.lang.String |
encryptPassword(java.lang.String password)
|
static void |
forcePassword(JetspeedUser user,
java.lang.String password)
|
static java.lang.String |
generateLowerCasePassword(int length)
A utility method that will generate a lowercase password consisting of random numbers and letters of length N |
static java.lang.String |
generateMixedCasePassword(int length)
A utility method that will generate a password consisting of random numbers and letters of length N |
static java.lang.String |
generateUpperCasePassword(int length)
A utility method that will generate an uppercase password consisting of random numbers and letters of length N |
static java.util.List |
getAdminRoles()
|
static JetspeedUser |
getAnonymousUser()
|
static java.lang.String |
getAnonymousUserName()
|
static Group |
getGroup(java.lang.String groupname)
|
static java.util.Iterator |
getGroups()
|
static java.util.Iterator |
getGroups(java.lang.String username)
|
static Permission |
getPermission(java.lang.String permissionName)
|
static java.util.Iterator |
getPermissions()
|
static java.util.Iterator |
getPermissions(java.lang.String rolename)
|
static Role |
getRole(java.lang.String rolename)
|
static java.util.Iterator |
getRoles()
|
static java.util.Iterator |
getRoles(java.lang.String username)
|
static SecurityReference |
getSecurityReference(Entry entry,
JetspeedRunData rundata)
Utility method for retreiving the correct security reference based on profile and registry information. |
static int |
getSecuritySource(Entry entry,
JetspeedRunData rundata)
Checks where the security of this Entry is actually defined. |
static JetspeedSecurityService |
getService()
Commodity method for getting a reference to the service singleton |
static JetspeedUser |
getUser(java.security.Principal principal)
|
static JetspeedUser |
getUser(java.lang.String username)
|
static JetspeedUser |
getUserInstance()
|
static java.util.Iterator |
getUsers()
|
static java.util.Iterator |
getUsers(java.lang.String filter)
|
static void |
grantPermission(java.lang.String roleName,
java.lang.String permissionName)
|
static void |
grantRole(java.lang.String username,
java.lang.String rolename)
|
static void |
grantRole(java.lang.String username,
java.lang.String rolename,
java.lang.String groupname)
|
static boolean |
hasAdminRole(org.apache.turbine.om.security.User user)
|
static boolean |
hasPermission(java.lang.String roleName,
java.lang.String permissionName)
|
static boolean |
hasRole(java.lang.String username,
java.lang.String rolename)
|
static boolean |
hasRole(java.lang.String username,
java.lang.String rolename,
java.lang.String groupname)
|
static boolean |
inGroup(java.lang.String username,
java.lang.String groupname)
|
static boolean |
isDisableAccountCheckEnabled()
|
static void |
joinGroup(java.lang.String username,
java.lang.String groupname)
|
static void |
joinGroup(java.lang.String username,
java.lang.String groupname,
java.lang.String rolename)
|
static JetspeedUser |
login(java.lang.String username,
java.lang.String password)
|
static void |
logout()
|
static void |
removeGroup(java.lang.String groupname)
|
static void |
removePermission(java.lang.String permissionName)
|
static void |
removeRole(java.lang.String rolename)
|
static void |
removeUser(java.security.Principal principal)
|
static void |
removeUser(java.lang.String username)
|
static void |
resetDisableAccountCheck(java.lang.String username)
|
static void |
revokePermission(java.lang.String roleName,
java.lang.String permissionName)
|
static void |
revokeRole(java.lang.String username,
java.lang.String rolename)
|
static void |
revokeRole(java.lang.String username,
java.lang.String rolename,
java.lang.String groupname)
|
static void |
saveGroup(Group group)
|
static void |
savePermission(Permission permission)
|
static void |
saveRole(Role role)
|
static void |
saveUser(JetspeedUser user)
|
static void |
unjoinGroup(java.lang.String username,
java.lang.String groupname)
|
static void |
unjoinGroup(java.lang.String username,
java.lang.String groupname,
java.lang.String rolename)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PERMISSION_VIEW
public static final java.lang.String PERMISSION_CUSTOMIZE
public static final java.lang.String PERMISSION_MAXIMIZE
public static final java.lang.String PERMISSION_MINIMIZE
public static final java.lang.String PERMISSION_PERSONALIZE
public static final java.lang.String PERMISSION_DETACH
public static final java.lang.String PERMISSION_CLOSE
public static final java.lang.String PERMISSION_INFO
public static final java.lang.String PERMISSION_PRINT_FRIENDLY
public static final java.lang.String JETSPEED_GROUP
public static final java.lang.String JETSPEED_GROUP_ID
public static final java.lang.String JETSPEED_ROLE_USER
public static final java.lang.String JETSPEED_ROLE_ADMIN
public static final char[] NUMBERS_AND_LETTERS_ALPHABET
public static final char[] LC_NUMBERS_AND_LETTERS_ALPHABET
Constructor Detail |
public JetspeedSecurity()
Method Detail |
public static JetspeedSecurityService getService()
public static JetspeedUser login(java.lang.String username, java.lang.String password) throws LoginException
LoginException
PortalAuthentication#login
public static JetspeedUser getAnonymousUser() throws LoginException
LoginException
PortalAuthentication#getAnonymousUser
public static void logout() throws LoginException
LoginException
PortalAuthentication#logout
public static boolean checkPermission(JetspeedUser user, Entry entry, java.lang.String action)
JetspeedPortalAccessController.checkPermission(org.apache.jetspeed.om.security.JetspeedUser, org.apache.jetspeed.om.profile.Entry, java.lang.String)
public static boolean checkPermission(JetspeedUser user, Portlet portlet, java.lang.String action)
JetspeedPortalAccessController.checkPermission(org.apache.jetspeed.om.security.JetspeedUser, org.apache.jetspeed.om.profile.Entry, java.lang.String)
public static boolean checkPermission(JetspeedUser user, PortalResource resource, java.lang.String action)
JetspeedPortalAccessController.checkPermission(org.apache.jetspeed.om.security.JetspeedUser, org.apache.jetspeed.om.profile.Entry, java.lang.String)
public static JetspeedUser getUser(java.security.Principal principal) throws JetspeedSecurityException
JetspeedSecurityException
UserManagement#getUser
public static java.util.Iterator getUsers() throws JetspeedSecurityException
JetspeedSecurityException
UserManagement#getUsers
public static void saveUser(JetspeedUser user) throws JetspeedSecurityException
JetspeedSecurityException
UserManagement#saveUser
public static void addUser(JetspeedUser user) throws JetspeedSecurityException
JetspeedSecurityException
UserManagement#addUser
public static java.util.Iterator getUsers(java.lang.String filter) throws JetspeedSecurityException
JetspeedSecurityException
UserManagement#getUsers(String)
public static void removeUser(java.security.Principal principal) throws JetspeedSecurityException
JetspeedSecurityException
UserManagement#removeUser
public static JetspeedUser getUser(java.lang.String username) throws JetspeedSecurityException
JetspeedSecurityException
UserManagement#getUser
public static void removeUser(java.lang.String username) throws JetspeedSecurityException
JetspeedSecurityException
UserManagement#removeUser
public static void changePassword(JetspeedUser user, java.lang.String oldPassword, java.lang.String newPassword) throws JetspeedSecurityException
JetspeedSecurityException
CredentialsManagement#changePassword
public static void forcePassword(JetspeedUser user, java.lang.String password) throws JetspeedSecurityException
JetspeedSecurityException
CredentialsManagement#forcePassword
public static java.lang.String encryptPassword(java.lang.String password) throws JetspeedSecurityException
JetspeedSecurityException
CredentialsManagement#encryptPassword
public static java.util.Iterator getRoles(java.lang.String username) throws JetspeedSecurityException
JetspeedSecurityException
RoleManagement#getRoles(String)
public static java.util.Iterator getRoles() throws JetspeedSecurityException
JetspeedSecurityException
RoleManagement#getRoles
public static void addRole(Role role) throws JetspeedSecurityException
JetspeedSecurityException
RoleManagement#addRole
public static void saveRole(Role role) throws JetspeedSecurityException
JetspeedSecurityException
RoleManagement#saveRole
public static void removeRole(java.lang.String rolename) throws JetspeedSecurityException
JetspeedSecurityException
RoleManagement#removeRole
public static void grantRole(java.lang.String username, java.lang.String rolename) throws JetspeedSecurityException
JetspeedSecurityException
RoleManagement#grantRole
public static void grantRole(java.lang.String username, java.lang.String rolename, java.lang.String groupname) throws JetspeedSecurityException
JetspeedSecurityException
RoleManagement#grantRole
public static void revokeRole(java.lang.String username, java.lang.String rolename) throws JetspeedSecurityException
JetspeedSecurityException
RoleManagement#revokeRole
public static void revokeRole(java.lang.String username, java.lang.String rolename, java.lang.String groupname) throws JetspeedSecurityException
JetspeedSecurityException
RoleManagement#revokeRole()
public static boolean hasRole(java.lang.String username, java.lang.String rolename) throws JetspeedSecurityException
JetspeedSecurityException
RoleManagement#hasRole
public static boolean hasRole(java.lang.String username, java.lang.String rolename, java.lang.String groupname) throws JetspeedSecurityException
JetspeedSecurityException
public static Role getRole(java.lang.String rolename) throws JetspeedSecurityException
JetspeedSecurityException
RoleManagement#getRole
public static java.util.Iterator getGroups(java.lang.String username) throws JetspeedSecurityException
JetspeedSecurityException
GroupManagement#getGroups(String)
public static java.util.Iterator getGroups() throws JetspeedSecurityException
JetspeedSecurityException
GroupManagement#getGroups
public static void addGroup(Group group) throws JetspeedSecurityException
JetspeedSecurityException
GroupManagement#addGroup
public static void saveGroup(Group group) throws JetspeedSecurityException
JetspeedSecurityException
GroupManagement#saveGroup
public static void removeGroup(java.lang.String groupname) throws JetspeedSecurityException
JetspeedSecurityException
GroupManagement#removeGroup
public static void joinGroup(java.lang.String username, java.lang.String groupname) throws JetspeedSecurityException
JetspeedSecurityException
GroupManagement#joinGroup
public static void joinGroup(java.lang.String username, java.lang.String groupname, java.lang.String rolename) throws JetspeedSecurityException
JetspeedSecurityException
GroupManagement#joinGroup(String username, String groupname, String rolename)
public static void unjoinGroup(java.lang.String username, java.lang.String groupname) throws JetspeedSecurityException
JetspeedSecurityException
GroupManagement#revokeGroup
public static void unjoinGroup(java.lang.String username, java.lang.String groupname, java.lang.String rolename) throws JetspeedSecurityException
JetspeedSecurityException
GroupManagement#revokeGroup(String username, String groupname, String rolename)
public static boolean inGroup(java.lang.String username, java.lang.String groupname) throws JetspeedSecurityException
JetspeedSecurityException
GroupManagement#inGroup
public static Group getGroup(java.lang.String groupname) throws JetspeedSecurityException
JetspeedSecurityException
GroupManagement#getGroup
public static JetspeedUser getUserInstance()
JetspeedSecurityService.getUserInstance()
public static java.lang.String convertUserName(java.lang.String username)
JetspeedSecurityService.convertUserName(java.lang.String)
public static java.lang.String convertPassword(java.lang.String password)
JetspeedSecurityService.convertPassword(java.lang.String)
public static boolean checkDisableAccount(java.lang.String username)
JetspeedSecurityService#checkDisableAcccount
public static boolean isDisableAccountCheckEnabled()
JetspeedSecurityService#isDisableCountCheckEnabled
public static void resetDisableAccountCheck(java.lang.String username)
JetspeedSecurityService.resetDisableAccountCheck(java.lang.String)
public static boolean areActionsDisabledForAnon()
JetspeedSecurityService.areActionsDisabledForAnon()
public static boolean areActionsDisabledForAllUsers()
JetspeedSecurityService.areActionsDisabledForAllUsers()
public static java.lang.String getAnonymousUserName()
public static java.util.List getAdminRoles()
public static boolean hasAdminRole(org.apache.turbine.om.security.User user)
public static boolean checkPermission(JetspeedRunData runData, java.lang.String action, Portlet portlet)
JetspeedSecurityService.checkPermission(org.apache.jetspeed.services.rundata.JetspeedRunData, java.lang.String, org.apache.jetspeed.portal.Portlet)
public static boolean checkPermission(JetspeedRunData runData, java.lang.String action, RegistryEntry entry)
JetspeedSecurityService.checkPermission(org.apache.jetspeed.services.rundata.JetspeedRunData, java.lang.String, org.apache.jetspeed.portal.Portlet)
public static java.util.Iterator getPermissions(java.lang.String rolename) throws JetspeedSecurityException
JetspeedSecurityException
PermissionManagement#getPermissions(String)
public static java.util.Iterator getPermissions() throws JetspeedSecurityException
JetspeedSecurityException
PermissionManagement#getPermissions
public static void addPermission(Permission permission) throws JetspeedSecurityException
JetspeedSecurityException
PermissionManagement#addPermission
public static void savePermission(Permission permission) throws JetspeedSecurityException
JetspeedSecurityException
PermissionManagement#savePermission
public static void removePermission(java.lang.String permissionName) throws JetspeedSecurityException
JetspeedSecurityException
PermissionManagement#removePermission
public static void grantPermission(java.lang.String roleName, java.lang.String permissionName) throws JetspeedSecurityException
JetspeedSecurityException
PermissionManagement#grantPermission
public static void revokePermission(java.lang.String roleName, java.lang.String permissionName) throws JetspeedSecurityException
JetspeedSecurityException
PermissionManagement#revokePermission
public static boolean hasPermission(java.lang.String roleName, java.lang.String permissionName) throws JetspeedSecurityException
JetspeedSecurityException
PermissionManagement#hasPermission
public static Permission getPermission(java.lang.String permissionName) throws JetspeedSecurityException
JetspeedSecurityException
PermissionManagement#getPermission
public static java.lang.String generateMixedCasePassword(int length) throws JetspeedSecurityException
length
-
JetspeedSecurityException
public static java.lang.String generateLowerCasePassword(int length) throws JetspeedSecurityException
length
-
JetspeedSecurityException
public static java.lang.String generateUpperCasePassword(int length) throws JetspeedSecurityException
length
-
JetspeedSecurityException
public static SecurityReference getSecurityReference(Entry entry, JetspeedRunData rundata)
public static int getSecuritySource(Entry entry, JetspeedRunData rundata)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |