org.apache.jetspeed.services.security
Interface JetspeedSecurityService

All Superinterfaces:
org.apache.turbine.services.Initable, org.apache.turbine.services.Service
All Known Implementing Classes:
JetspeedDBSecurityService

public interface JetspeedSecurityService
extends org.apache.turbine.services.Service

The Security Service manages Users, Groups Roles and Permissions in the system. The Jetspeed Security Service extends the interface of the Turbine Security Service, adding on the Jetspeed specific interface: AccessControl for controlling access to portal resources (portlets, panes).

Version:
$Id: JetspeedSecurityService.java,v 1.12 2004/03/31 04:49:10 morciuch Exp $
Author:
David Sean Taylor

Field Summary
static java.lang.String SERVICE_NAME
          The name of this service
 
Method Summary
 boolean areActionsDisabledForAllUsers()
           
 boolean areActionsDisabledForAnon()
          Helper to PortalAuthorization.
 boolean checkDisableAccount(java.lang.String username)
           
 boolean checkPermission(JetspeedRunData runData, java.lang.String action, Portlet portlet)
          Helper to PortalAuthorization.
 java.lang.String convertPassword(java.lang.String password)
           
 java.lang.String convertUserName(java.lang.String username)
           
 java.util.List getAdminRoles()
           
 java.lang.String getAnonymousUserName()
           
 JetspeedUser getUser(java.lang.String username)
          Helper to UserManagement.
 JetspeedUser getUserInstance()
           
 boolean hasAdminRole(org.apache.turbine.om.security.User user)
           
 boolean isDisableAccountCheckEnabled()
           
 void resetDisableAccountCheck(java.lang.String username)
           
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
The name of this service

See Also:
Constant Field Values
Method Detail

getUserInstance

public JetspeedUser getUserInstance()

convertUserName

public java.lang.String convertUserName(java.lang.String username)

convertPassword

public java.lang.String convertPassword(java.lang.String password)

checkDisableAccount

public boolean checkDisableAccount(java.lang.String username)

isDisableAccountCheckEnabled

public boolean isDisableAccountCheckEnabled()

resetDisableAccountCheck

public void resetDisableAccountCheck(java.lang.String username)

getUser

public JetspeedUser getUser(java.lang.String username)
                     throws JetspeedSecurityException
Helper to UserManagement. Retrieves a JetspeedUser given the primary principle username. The principal can be any valid Jetspeed Security Principal: org.apache.jetspeed.om.security.UserNamePrincipal org.apache.jetspeed.om.security.UserIdPrincipal The security service may optionally check the current user context to determine if the requestor has permission to perform this action.

Parameters:
username - The username principal.
Returns:
a JetspeedUser associated to the principal identity.
Throws:
UserException - when the security provider has a general failure retrieving a user.
UnknownUserException - when the security provider cannot match the principal identity to a user.
InsufficientPrivilegeException - when the requestor is denied due to insufficient privilege
JetspeedSecurityException

checkPermission

public boolean checkPermission(JetspeedRunData runData,
                               java.lang.String action,
                               Portlet portlet)
Helper to PortalAuthorization. Gets a JetspeedUser from rundata, authorize user to perform the secured action on the given Portlet resource. If the user does not have sufficient privilege to perform the action on the resource, the check returns false, otherwise when sufficient privilege is present, checkPermission returns true.

Parameters:
action - the secured action to be performed on the resource by the user.
portlet - the portlet resource.
Returns:
boolean true if the user has sufficient privilege.

areActionsDisabledForAnon

public boolean areActionsDisabledForAnon()
Helper to PortalAuthorization. Gets a JetspeedUser from rundata, authorize user to perform the secured action on the given Entry resource. If the user does not have sufficient privilege to perform the action on the resource, the check returns false, otherwise when sufficient privilege is present, checkPermission returns true.

Returns:
boolean true if the user has sufficient privilege.

areActionsDisabledForAllUsers

public boolean areActionsDisabledForAllUsers()

getAnonymousUserName

public java.lang.String getAnonymousUserName()

getAdminRoles

public java.util.List getAdminRoles()

hasAdminRole

public boolean hasAdminRole(org.apache.turbine.om.security.User user)


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.