@Path(value="/") @Consumes(value={"application/json","application/text","text/html","application/x-www-form-urlencoded"}) @Produces(value="application/json;charset=utf-8") @Secured(value={"ROLE_USER","ROLE_ADMIN"}) public class UserLookupService extends AuthorizableSecurableService
ConfigurationSource
; namely following types of lookups applicable to the user:
ConfigurationSource
AnyWebService.CACHE
One can override getVal(ConfigurationSource, User, String, String)
to determine how a ConfigurationSource
is looked up.Modifier and Type | Field and Description |
---|---|
protected AuthorizationModule<Void> |
authorizationModule |
applicationContext, CACHE, NO_CACHE, request, response
Constructor and Description |
---|
UserLookupService() |
UserLookupService(boolean checkAuthFiltered) |
Modifier and Type | Method and Description |
---|---|
Boolean |
getAuthorizableIdAssignable()
Is the
Authorizable.getAuthorizableId() of this instance to be considered in the global list of Authorizations.If true, it will appear in the List of Authorizations that can be assigned to users. |
protected IAuthorizationService |
getAuthorizableService()
Define an
AuthorizationService |
AuthorizationModule<Void> |
getAuthorizationModule() |
List<ConfigurationSource> |
getConfigurationSources()
Will iteratively look for the requested configuration from the specified sources
|
protected User |
getUser(javax.servlet.http.HttpServletRequest request)
Get
User for the current HttpServletRequest |
protected Object |
getVal(ConfigurationSource cs,
User user,
String namespace,
String key) |
javax.ws.rs.core.Response |
lookup(String namespace,
String key) |
javax.ws.rs.core.Response |
lookups(String configNamesJSONArray) |
void |
setAuthorizationModule(AuthorizationModule<Void> authorizationModule) |
void |
setConfigurationSources(List<ConfigurationSource> configurationSources)
Will iteratively look for the requested configuration from the specified sources
|
filter, getAuthorizableId, getAuthorizations, setAuthorizableId, setAuthorizations
checkAuthFilterInvoked, query
filter, getCacheDef, getTestString, query
protected AuthorizationModule<Void> authorizationModule
public UserLookupService()
public UserLookupService(boolean checkAuthFiltered)
public Boolean getAuthorizableIdAssignable()
Authorizable
Authorizable.getAuthorizableId()
of this instance to be considered in the global list of Authorizations.Boolean
@Nullableprotected IAuthorizationService getAuthorizableService()
AuthorizableSecurableService
AuthorizationService
getAuthorizableService
in class AuthorizableSecurableService
protected User getUser(javax.servlet.http.HttpServletRequest request)
AuthorizableSecurableService
User
for the current HttpServletRequest
getUser
in class AuthorizableSecurableService
request
- as HttpServletRequest
User
protected Object getVal(ConfigurationSource cs, User user, String namespace, String key)
@GET @Path(value="lookup/{namespace}") public javax.ws.rs.core.Response lookup(@PathParam(value="namespace") String namespace, @QueryParam(value="key") String key) throws Exception
Exception
@POST @Path(value="lookups") public javax.ws.rs.core.Response lookups(@QueryParam(value="configNamesJSONArray") String configNamesJSONArray) throws Exception
Exception
public AuthorizationModule<Void> getAuthorizationModule()
public void setAuthorizationModule(AuthorizationModule<Void> authorizationModule)
public List<ConfigurationSource> getConfigurationSources()
public void setConfigurationSources(List<ConfigurationSource> configurationSources)
Copyright © 2018. All rights reserved.