org.apache.maven.continuum.xmlrpc.server
Class AbstractContinuumSecureService

java.lang.Object
  extended by org.apache.maven.continuum.xmlrpc.server.AbstractContinuumSecureService
All Implemented Interfaces:
ContinuumService, ContinuumXmlRpcComponent
Direct Known Subclasses:
ContinuumServiceImpl

public abstract class AbstractContinuumSecureService
extends Object
implements ContinuumService, ContinuumXmlRpcComponent

Version:
$Id: AbstractContinuumSecureService.java 1372260 2012-08-13 04:29:09Z brett $
Author:
Emmanuel Venisse

Constructor Summary
AbstractContinuumSecureService()
           
 
Method Summary
protected  void checkAddGroupBuildDefinitionAuthorization(String resource)
          Check if the current user is authorized to add a build definition for the specified project group
protected  void checkAddProjectBuildDefinitionAuthorization(String resource)
          Check if the current user is authorized to add a group build definition to a specific project
protected  void checkAddProjectGroupAuthorization()
          Check if the current user is authorized to add a project group
protected  void checkAddProjectGroupNotifierAuthorization(String resource)
          Check if the current user is authorized to add a notifier to the specified project group
protected  void checkAddProjectNotifierAuthorization(String resource)
          Check if the current user is authorized to add a notifier to a specific project
protected  void checkAddProjectToGroupAuthorization(String resource)
          Check if the current user is authorized to add a project to a specific project group
protected  void checkAuthorization(String role)
          Check if the current user is authorized to do the action
protected  void checkAuthorization(String role, String resource)
          Check if the current user is authorized to do the action
protected  void checkAuthorization(String role, String resource, boolean requiredResource)
          Check if the current user is authorized to do the action
protected  void checkBuildProjectGroupAuthorization(String resource)
          Check if the current user is authorized to build the specified project group
protected  void checkBuildProjectInGroupAuthorization(String resource)
          Check if the current user is authorized to build a project in the specified group
protected  void checkManageBuildDefinitionTemplatesAuthorization()
          Check if the current user is authorized to manage the build definitions templates
protected  void checkManageConfigurationAuthorization()
          Check if the current user is authorized to manage the application's configuration
protected  void checkManageInstallationsAuthorization()
          Check if the current user is authorized to manage the installations
protected  void checkManageProfilesAuthorization()
          Check if the current user is authorized to manage the profiles
protected  void checkManagePurgingAuthorization()
           
protected  void checkManageQueuesAuthorization()
           
protected  void checkManageRepositoriesAuthorization()
           
protected  void checkManageSchedulesAuthorization()
          Check if the current user is authorized to manage the project build schedules
protected  void checkModifyGroupBuildDefinitionAuthorization(String resource)
          Check if the current user is authorized to modify a build definition in the specified project group
protected  void checkModifyProjectBuildDefinitionAuthorization(String resource)
          Check if the current user is authorized to modify a build definition of a specific project
protected  void checkModifyProjectGroupAuthorization(String resource)
          Check if the current user is authorized to modify the specified project group
protected  void checkModifyProjectGroupNotifierAuthorization(String resource)
          Check if the current user is authorized to modify a notifier in the specified project group
protected  void checkModifyProjectInGroupAuthorization(String resource)
          Check if the current user is authorized to modify a project in the specified group
protected  void checkModifyProjectNotifierAuthorization(String resource)
          Check if the current user is authorized to modify a notifier in a specific project
protected  void checkRemoveGroupBuildDefinitionAuthorization(String resource)
          Check if the current user is authorized to delete a build definition in the specified project group
protected  void checkRemoveProjectBuildDefinitionAuthorization(String resource)
          Check if the current user is authorized to delete a build definition of a specific project
protected  void checkRemoveProjectFromGroupAuthorization(String resource)
          Check if the current user is authorized to delete a project from a specified group
protected  void checkRemoveProjectGroupAuthorization(String resource)
          Check if the current user is authorized to delete the specified project group
protected  void checkRemoveProjectGroupNotifierAuthorization(String resource)
          Check if the current user is authorized to delete a notifier in the specified project group
protected  void checkRemoveProjectNotifierAuthorization(String resource)
          Check if the current user is authorized to delete a notifier in a specific project
protected  void checkViewProjectGroupAuthorization(String resource)
          Check if the current user is authorized to view the specified project group
 org.codehaus.plexus.redback.system.SecuritySession getSecuritySession()
           
 org.codehaus.plexus.redback.system.SecuritySystem getSecuritySystem()
           
 boolean isAuthenticated()
          Check if the current user is already authenticated
protected  boolean isAuthorized(String role, String resource)
          Verify if the current user is authorized to do the action
protected  boolean isAuthorized(String role, String resource, boolean requiredResource)
          Verify if the current user is authorized to do the action
 void setConfig(ContinuumXmlRpcConfig config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.continuum.xmlrpc.ContinuumService
addAntProject, addAntProjectRPC, addBuildAgent, addBuildAgentGroup, addBuildAgentGroupRPC, addBuildAgentRPC, addBuildDefinitionToProject, addBuildDefinitionToProjectGroup, addBuildDefinitionToProjectGroupRPC, addBuildDefinitionToProjectRPC, addDirectoryPurgeConfiguration, addDirectoryPurgeConfigurationRPC, addGroupNotifier, addGroupNotifierRPC, addInstallation, addInstallationRPC, addLocalRepository, addLocalRepositoryRPC, addMavenOneProject, addMavenOneProjectRPC, addMavenTwoProject, addMavenTwoProject, addMavenTwoProject, addMavenTwoProject, addMavenTwoProjectAsSingleProject, addMavenTwoProjectAsSingleProjectRPC, addMavenTwoProjectRPC, addMavenTwoProjectRPC, addMavenTwoProjectRPC, addMavenTwoProjectRPC, addNotifier, addNotifierRPC, addProfile, addProfileRPC, addProjectGroup, addProjectGroupRPC, addProjectToBuildQueue, addProjectToBuildQueue, addRepositoryPurgeConfiguration, addRepositoryPurgeConfigurationRPC, addSchedule, addScheduleRPC, addShellProject, addShellProjectRPC, buildGroup, buildGroup, buildProject, buildProject, buildProject, buildProject, cancelBuild, cancelCurrentBuild, deleteInstallation, deleteProfile, getAllBuildAgents, getAllBuildAgentsRPC, getAllDirectoryPurgeConfigurations, getAllDirectoryPurgeConfigurationsRPC, getAllLocalRepositories, getAllLocalRepositoriesRPC, getAllProjectGroups, getAllProjectGroupsRPC, getAllProjectGroupsWithAllDetails, getAllProjectGroupsWithAllDetailsRPC, getAllProjectGroupsWithProjects, getAllRepositoryPurgeConfigurations, getAllRepositoryPurgeConfigurationsRPC, getBuildAgent, getBuildAgentGroup, getBuildAgentGroupRPC, getBuildAgentInstallations, getBuildAgentInstallationsRPC, getBuildAgentRPC, getBuildAgentsWithInstallations, getBuildAgentsWithInstallationsRPC, getBuildAgentUrl, getBuildDefinition, getBuildDefinitionRPC, getBuildDefinitionsForProject, getBuildDefinitionsForProjectGroup, getBuildDefinitionsForProjectGroupRPC, getBuildDefinitionsForProjectRPC, getBuildDefinitionTemplates, getBuildDefinitionTemplatesRPC, getBuildOutput, getBuildResult, getBuildResultRPC, getBuildResultsForProject, getBuildResultsForProjectRPC, getDirectoryPurgeConfiguration, getDirectoryPurgeConfigurationRPC, getGroupNotifier, getGroupNotifierRPC, getInstallation, getInstallation, getInstallationRPC, getInstallationRPC, getInstallations, getInstallationsRPC, getLatestBuildResult, getLatestBuildResultRPC, getListener, getLocalRepository, getLocalRepositoryRPC, getNotifier, getNotifierRPC, getProfile, getProfileRPC, getProfiles, getProfilesRPC, getProfileWithName, getProfileWithNameRPC, getProjectGroup, getProjectGroupRPC, getProjectGroupSummary, getProjectGroupSummaryRPC, getProjectGroupWithProjects, getProjectGroupWithProjectsRPC, getProjectReleaseAndDevelopmentVersions, getProjects, getProjectScmRootByProject, getProjectScmRootByProjectGroup, getProjectsInBuildQueue, getProjectsRPC, getProjectSummary, getProjectSummaryRPC, getProjectWithAllDetails, getProjectWithAllDetailsRPC, getReleaseOutput, getReleasePluginParameters, getReleaseResult, getReleaseResultRPC, getReleaseResultsForProjectGroup, getReleaseResultsForProjectGroupRPC, getRepositoryPurgeConfiguration, getRepositoryPurgeConfigurationRPC, getSchedule, getScheduleRPC, getSchedules, getSchedulesRPC, getSystemConfiguration, getSystemConfigurationRPC, isProjectCurrentlyBuilding, isProjectCurrentlyBuilding, isProjectCurrentlyPreparingBuild, isProjectCurrentlyPreparingBuild, isProjectInBuildingQueue, isProjectInBuildingQueue, isProjectInPrepareBuildQueue, isProjectInPrepareBuildQueue, ping, pingBuildAgent, purgeDirectory, purgeLocalRepository, releaseCleanup, releaseCleanup, releasePerform, releasePrepare, releaseRollback, removeBuildAgent, removeBuildAgentGroup, removeBuildDefinitionFromProjectGroup, removeBuildResult, removeBuildResultRPC, removeDirectoryPurgeConfiguration, removeGroupNotifier, removeLocalRepository, removeNotifier, removeProject, removeProjectGroup, removeProjectsFromBuildingQueue, removeReleaseResult, removeReleaseResultRPC, removeRepositoryPurgeConfiguration, updateBuildAgent, updateBuildAgentGroup, updateBuildAgentGroupRPC, updateBuildAgentRPC, updateBuildDefinitionForProject, updateBuildDefinitionForProjectGroup, updateBuildDefinitionForProjectGroupRPC, updateBuildDefinitionForProjectRPC, updateDirectoryPurgeConfiguration, updateDirectoryPurgeConfigurationRPC, updateGroupNotifier, updateGroupNotifierRPC, updateInstallation, updateInstallationRPC, updateLocalRepository, updateLocalRepositoryRPC, updateNotifier, updateNotifierRPC, updateProfile, updateProfileRPC, updateProject, updateProjectGroup, updateProjectGroupRPC, updateProjectRPC, updateRepositoryPurgeConfiguration, updateRepositoryPurgeConfigurationRPC, updateSchedule, updateScheduleRPC
 

Constructor Detail

AbstractContinuumSecureService

public AbstractContinuumSecureService()
Method Detail

setConfig

public void setConfig(ContinuumXmlRpcConfig config)
Specified by:
setConfig in interface ContinuumXmlRpcComponent

getSecuritySystem

public org.codehaus.plexus.redback.system.SecuritySystem getSecuritySystem()

getSecuritySession

public org.codehaus.plexus.redback.system.SecuritySession getSecuritySession()

isAuthenticated

public boolean isAuthenticated()
Check if the current user is already authenticated

Returns:
true if the user is authenticated

checkAuthorization

protected void checkAuthorization(String role)
                           throws ContinuumException
Check if the current user is authorized to do the action

Parameters:
role - the role
Throws:
ContinuumException - if the user isn't authorized

checkAuthorization

protected void checkAuthorization(String role,
                                  String resource)
                           throws ContinuumException
Check if the current user is authorized to do the action

Parameters:
role - the role
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized

isAuthorized

protected boolean isAuthorized(String role,
                               String resource)
                        throws org.codehaus.plexus.redback.authorization.AuthorizationException
Verify if the current user is authorized to do the action

Parameters:
role - the role
resource - the operation resource
Returns:
true if the user is authorized
Throws:
org.codehaus.plexus.redback.authorization.AuthorizationException - if the authorizing request generate an error

isAuthorized

protected boolean isAuthorized(String role,
                               String resource,
                               boolean requiredResource)
                        throws org.codehaus.plexus.redback.authorization.AuthorizationException
Verify if the current user is authorized to do the action

Parameters:
role - the role
resource - the operation resource
requiredResource - true if resource can't be null
Returns:
true if the user is authorized
Throws:
org.codehaus.plexus.redback.authorization.AuthorizationException - if the authorizing request generate an error

checkAuthorization

protected void checkAuthorization(String role,
                                  String resource,
                                  boolean requiredResource)
                           throws ContinuumException
Check if the current user is authorized to do the action

Parameters:
role - the role
resource - the operation resource
requiredResource - true if resource can't be null
Throws:
ContinuumException - if the user isn't authorized

checkViewProjectGroupAuthorization

protected void checkViewProjectGroupAuthorization(String resource)
                                           throws ContinuumException
Check if the current user is authorized to view the specified project group

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkAddProjectGroupAuthorization

protected void checkAddProjectGroupAuthorization()
                                          throws ContinuumException
Check if the current user is authorized to add a project group

Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkRemoveProjectGroupAuthorization

protected void checkRemoveProjectGroupAuthorization(String resource)
                                             throws ContinuumException
Check if the current user is authorized to delete the specified project group

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkBuildProjectGroupAuthorization

protected void checkBuildProjectGroupAuthorization(String resource)
                                            throws ContinuumException
Check if the current user is authorized to build the specified project group

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkModifyProjectGroupAuthorization

protected void checkModifyProjectGroupAuthorization(String resource)
                                             throws ContinuumException
Check if the current user is authorized to modify the specified project group

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkAddProjectToGroupAuthorization

protected void checkAddProjectToGroupAuthorization(String resource)
                                            throws ContinuumException
Check if the current user is authorized to add a project to a specific project group

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkRemoveProjectFromGroupAuthorization

protected void checkRemoveProjectFromGroupAuthorization(String resource)
                                                 throws ContinuumException
Check if the current user is authorized to delete a project from a specified group

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkModifyProjectInGroupAuthorization

protected void checkModifyProjectInGroupAuthorization(String resource)
                                               throws ContinuumException
Check if the current user is authorized to modify a project in the specified group

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkBuildProjectInGroupAuthorization

protected void checkBuildProjectInGroupAuthorization(String resource)
                                              throws ContinuumException
Check if the current user is authorized to build a project in the specified group

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkAddGroupBuildDefinitionAuthorization

protected void checkAddGroupBuildDefinitionAuthorization(String resource)
                                                  throws ContinuumException
Check if the current user is authorized to add a build definition for the specified project group

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkRemoveGroupBuildDefinitionAuthorization

protected void checkRemoveGroupBuildDefinitionAuthorization(String resource)
                                                     throws ContinuumException
Check if the current user is authorized to delete a build definition in the specified project group

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkModifyGroupBuildDefinitionAuthorization

protected void checkModifyGroupBuildDefinitionAuthorization(String resource)
                                                     throws ContinuumException
Check if the current user is authorized to modify a build definition in the specified project group

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkAddProjectBuildDefinitionAuthorization

protected void checkAddProjectBuildDefinitionAuthorization(String resource)
                                                    throws ContinuumException
Check if the current user is authorized to add a group build definition to a specific project

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkModifyProjectBuildDefinitionAuthorization

protected void checkModifyProjectBuildDefinitionAuthorization(String resource)
                                                       throws ContinuumException
Check if the current user is authorized to modify a build definition of a specific project

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkRemoveProjectBuildDefinitionAuthorization

protected void checkRemoveProjectBuildDefinitionAuthorization(String resource)
                                                       throws ContinuumException
Check if the current user is authorized to delete a build definition of a specific project

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkAddProjectGroupNotifierAuthorization

protected void checkAddProjectGroupNotifierAuthorization(String resource)
                                                  throws ContinuumException
Check if the current user is authorized to add a notifier to the specified project group

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkRemoveProjectGroupNotifierAuthorization

protected void checkRemoveProjectGroupNotifierAuthorization(String resource)
                                                     throws ContinuumException
Check if the current user is authorized to delete a notifier in the specified project group

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkModifyProjectGroupNotifierAuthorization

protected void checkModifyProjectGroupNotifierAuthorization(String resource)
                                                     throws ContinuumException
Check if the current user is authorized to modify a notifier in the specified project group

Parameters:
resource - the operartion resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkAddProjectNotifierAuthorization

protected void checkAddProjectNotifierAuthorization(String resource)
                                             throws ContinuumException
Check if the current user is authorized to add a notifier to a specific project

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkRemoveProjectNotifierAuthorization

protected void checkRemoveProjectNotifierAuthorization(String resource)
                                                throws ContinuumException
Check if the current user is authorized to delete a notifier in a specific project

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkModifyProjectNotifierAuthorization

protected void checkModifyProjectNotifierAuthorization(String resource)
                                                throws ContinuumException
Check if the current user is authorized to modify a notifier in a specific project

Parameters:
resource - the operation resource
Throws:
ContinuumException - if the user isn't authorized if the user isn't authorized

checkManageConfigurationAuthorization

protected void checkManageConfigurationAuthorization()
                                              throws ContinuumException
Check if the current user is authorized to manage the application's configuration

Throws:
ContinuumException - if the user isn't authorized if the user isn't authenticated

checkManageSchedulesAuthorization

protected void checkManageSchedulesAuthorization()
                                          throws ContinuumException
Check if the current user is authorized to manage the project build schedules

Throws:
ContinuumException - if the user isn't authorized if the user isn't authenticated

checkManageInstallationsAuthorization

protected void checkManageInstallationsAuthorization()
                                              throws ContinuumException
Check if the current user is authorized to manage the installations

Throws:
ContinuumException - if the user isn't authorized if the user isn't authenticated

checkManageProfilesAuthorization

protected void checkManageProfilesAuthorization()
                                         throws ContinuumException
Check if the current user is authorized to manage the profiles

Throws:
ContinuumException - if the user isn't authorized if the user isn't authenticated

checkManageBuildDefinitionTemplatesAuthorization

protected void checkManageBuildDefinitionTemplatesAuthorization()
                                                         throws ContinuumException
Check if the current user is authorized to manage the build definitions templates

Throws:
ContinuumException - if the user isn't authorized if the user isn't authenticated

checkManageQueuesAuthorization

protected void checkManageQueuesAuthorization()
                                       throws ContinuumException
Throws:
ContinuumException

checkManagePurgingAuthorization

protected void checkManagePurgingAuthorization()
                                        throws ContinuumException
Throws:
ContinuumException

checkManageRepositoriesAuthorization

protected void checkManageRepositoriesAuthorization()
                                             throws ContinuumException
Throws:
ContinuumException


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.