public abstract class ServiceCommon<S extends Session,SI extends AbstractSessionImpl> extends java.lang.Object implements Service<S>
| Modifier and Type | Field and Description |
|---|---|
protected static AuthorizationResult |
DEFAULT_RESULT |
| Constructor and Description |
|---|
ServiceCommon() |
| Modifier and Type | Method and Description |
|---|---|
protected |
authorize(AuthorizationRequest request,
CallbackHandler callbackHandler) |
protected |
authorize(AuthorizationRequest request,
CallbackHandler callbackHandler,
AuthorizationResult defaultResult)
Authorize an operation
|
protected java.util.Set<java.lang.String> |
extractPrivileges(java.util.Properties properties) |
protected void |
fillSessionProperties(UserInformation userInformation,
java.util.Map<java.lang.String,java.lang.String> sessionResultProperties) |
protected |
loginUser(java.util.Properties properties,
CallbackHandler callbackHandler)
Wraps the call to
#authenticate(Properties) so that the correct
exceptions are thrown for a #createSession(Properties) call. |
protected |
makeEffectiveUserInformation(AbstractSessionImpl session,
java.lang.String targetUser,
CallbackHandler handler) |
void |
setAuditLogService(AuditLogService auditLogService) |
protected void |
setAuthenticationImplementation(AuthenticationImplementation authenticationImplementation) |
protected void |
setAuthorizationImplementation(AuthorizationImplementation authorizationImplementation) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseSession, createSessionpublic void setAuditLogService(AuditLogService auditLogService)
protected void setAuthenticationImplementation(AuthenticationImplementation authenticationImplementation)
protected void setAuthorizationImplementation(AuthorizationImplementation authorizationImplementation)
protected java.util.Set<java.lang.String> extractPrivileges(java.util.Properties properties)
protectedloginUser(java.util.Properties properties, CallbackHandler callbackHandler)
#authenticate(Properties) so that the correct
exceptions are thrown for a #createSession(Properties) call.properties - the user session propertiescallbackHandler - the callback handler which handles callbackssessionResultProperties - the map will be filled with the resulting session properties#authenticate(Properties)#authenticate(Properties)protected void fillSessionProperties(UserInformation userInformation,
java.util.Map<java.lang.String,java.lang.String> sessionResultProperties)
protectedauthorize(AuthorizationRequest request, CallbackHandler callbackHandler)
protectedauthorize(AuthorizationRequest request, CallbackHandler callbackHandler, AuthorizationResult defaultResult)
The default implementation grants everything. Override to change according to your needs.
objectType - the type of the object the operation takes placeobjectId - the id of the object the operation takes placeuserInformation - the user informationcontext - the context informationdefaultResult - the default result that should be returned if no one votes,
must not be nullnullprotectedmakeEffectiveUserInformation(AbstractSessionImpl session, java.lang.String targetUser, CallbackHandler handler)
Copyright (c) IBH SYSTEMS GmbH and others 2010, 2013.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0