Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.jaspersoft.jasperserver.api.metadata.user.service.impl
Class UserAuthorityServiceImpl

    java.lang.Object
      org.springframework.dao.support.DaoSupport
          org.springframework.orm.hibernate3.support.HibernateDaoSupport
              com.jaspersoft.jasperserver.api.metadata.common.service.impl.HibernateDaoImpl
                  com.jaspersoft.jasperserver.api.metadata.user.service.impl.UserAuthorityServiceImpl

All Implemented Interfaces:
  PersistentObjectResolver, ExternalUserService, UserAuthorityService, org.acegisecurity.userdetails.UserDetailsService, org.springframework.beans.factory.InitializingBean

    public class UserAuthorityServiceImpl

extends HibernateDaoImpl
implements org.acegisecurity.userdetails.UserDetailsService, ExternalUserService, PersistentObjectResolver

Version:
  $Id: UserAuthorityServiceImpl.java 9541 2007-08-14 19:25:01Z sbirney $
Author:
  swood

Nested Class Summary

Nested classes/interfaces inherited from class com.jaspersoft.jasperserver.api.metadata.common.service.impl.HibernateDaoImpl
`HibernateDaoImpl.DaoCallback`

Field Summary
`protected static org.apache.commons.logging.Log` | `log`

Fields inherited from class org.springframework.dao.support.DaoSupport
`logger`

Constructor Summary
`UserAuthorityServiceImpl()`

Method Summary
`void` | `addRole(ExecutionContext context, User user, Role role)`
`void` | `deleteRole(ExecutionContext context, java.lang.String roleName)`
`void` | `deleteUser(ExecutionContext context, java.lang.String username)`
`protected boolean` | `disableUser(ExecutionContext context, java.lang.Long id)`
`boolean` | `disableUser(ExecutionContext context, java.lang.String username)`
`protected boolean` | `enableUser(ExecutionContext context, java.lang.Long id)`
`boolean` | `enableUser(ExecutionContext context, java.lang.String username)`
`java.util.List` | `getAssignedRoles(ExecutionContext context, java.lang.String userName)`
`java.util.List` | `getAvailableRoles(ExecutionContext context, java.lang.String userName)`
`java.util.List` | `getDefaultInternalRoles()`
`ResourceFactory` | `getObjectMappingFactory()`
`ResourceFactory` | `getPersistentClassFactory()`
`java.lang.Object` | `getPersistentObject(java.lang.Object clientObject)`
`ProfileAttributeService` | `getProfileAttributeService()`
`protected RepoRole` | `getRepoRole(ExecutionContext context, java.lang.String roleName)`
`protected RepoUser` | `getRepoUser(ExecutionContext context, java.lang.Long id)`
`protected RepoUser` | `getRepoUser(ExecutionContext context, java.lang.String username)`
`Role` | `getRole(ExecutionContext context, java.lang.String roleName)`
`java.util.List` | `getRoles(ExecutionContext context, FilterCriteria filterCriteria)` Return everything for now (non-Javadoc)
`static org.acegisecurity.Authentication` | `getSourceAuthentication()`
`protected User` | `getUser(ExecutionContext context, java.lang.Long id)`
`User` | `getUser(ExecutionContext context, java.lang.String username)`
`java.util.List` | `getUsers(ExecutionContext context, FilterCriteria filterCriteria)` return everything for now (non-Javadoc)
`java.util.List` | `getUsersInRole(ExecutionContext context, java.lang.String roleName)`
`java.util.List` | `getUsersNotInRole(ExecutionContext context, java.lang.String roleName)`
`static boolean` | `isUserSwitched()`
`org.acegisecurity.userdetails.UserDetails` | `loadUserByUsername(java.lang.String username)`
`void` | `maintainInternalUser(org.acegisecurity.userdetails.UserDetails externalUserDetails)` From an external user, maintain the shadow internal user
`void` | `makeUserLoggedIn(java.lang.String username)`
`Role` | `newRole(ExecutionContext context)`
`User` | `newUser(ExecutionContext context)` DTO for the User interface (non-Javadoc)
`void` | `putRole(ExecutionContext context, Role aRole)`
`void` | `putUser(ExecutionContext context, User aUser)`
`void` | `removeAllRoles(ExecutionContext context, User user)`
`void` | `removeRole(ExecutionContext context, User user, Role role)`
`boolean` | `roleExists(ExecutionContext context, java.lang.String roleName)`
`void` | `setDefaultInternalRoles(java.util.List defaultInternalRoles)`
`void` | `setObjectMappingFactory(ResourceFactory objectFactory)`
`void` | `setPersistentClassFactory(ResourceFactory persistentClassFactory)`
`void` | `setProfileAttributeService(ProfileAttributeService p)`
`boolean` | `userExists(ExecutionContext context, java.lang.String username)`

Methods inherited from class com.jaspersoft.jasperserver.api.metadata.common.service.impl.HibernateDaoImpl
`endOperation, executeCallback, executeWriteCallback, executeWriteCallback, getOperationTimestamp, startOperation`

Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
`checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory`

Methods inherited from class org.springframework.dao.support.DaoSupport
`afterPropertiesSet, initDao`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    protected static final org.apache.commons.logging.Log log

Constructor Detail

### UserAuthorityServiceImpl

    public UserAuthorityServiceImpl()

Method Detail

### getObjectMappingFactory

    public ResourceFactory getObjectMappingFactory()

### setObjectMappingFactory

    public void setObjectMappingFactory(ResourceFactory objectFactory)

### getPersistentClassFactory

    public ResourceFactory getPersistentClassFactory()

### setPersistentClassFactory

    public void setPersistentClassFactory(ResourceFactory persistentClassFactory)

### getProfileAttributeService

    public ProfileAttributeService getProfileAttributeService()

### setProfileAttributeService

    public void setProfileAttributeService(ProfileAttributeService p)

### getRepoUser

    protected RepoUser getRepoUser(ExecutionContext context,
                                   java.lang.String username)

### getUser

    public User getUser(ExecutionContext context,
                        java.lang.String username)

  Specified by:
    `getUser` in interface `UserAuthorityService`

### getRepoUser

    protected RepoUser getRepoUser(ExecutionContext context,
                                   java.lang.Long id)

### getUser

    protected User getUser(ExecutionContext context,
                           java.lang.Long id)

### loadUserByUsername

    public org.acegisecurity.userdetails.UserDetails loadUserByUsername(java.lang.String username)
                                                                 throws org.acegisecurity.userdetails.UsernameNotFoundException,
                                                                        org.springframework.dao.DataAccessException

  Specified by:
    `loadUserByUsername` in interface `org.acegisecurity.userdetails.UserDetailsService`
  Throws:
    `org.acegisecurity.userdetails.UsernameNotFoundException`
    `org.springframework.dao.DataAccessException`

### putUser

    public void putUser(ExecutionContext context,
                        User aUser)

  Specified by:
    `putUser` in interface `UserAuthorityService`

### getUsers

    public java.util.List getUsers(ExecutionContext context,
                                   FilterCriteria filterCriteria)

  return everything for now (non-Javadoc)

  Specified by:
    `getUsers` in interface `UserAuthorityService`
  See Also:
    `UserAuthorityService.getUsers(com.jaspersoft.jasperserver.api.common.domain.ExecutionContext, com.jaspersoft.jasperserver.api.metadata.view.domain.FilterCriteria)`

### newUser

    public User newUser(ExecutionContext context)

  DTO for the User interface (non-Javadoc)

  Specified by:
    `newUser` in interface `UserAuthorityService`
  See Also:
    `UserAuthorityService.newUser(com.jaspersoft.jasperserver.api.common.domain.ExecutionContext)`

### disableUser

    protected boolean disableUser(ExecutionContext context,
                                  java.lang.Long id)

### disableUser

    public boolean disableUser(ExecutionContext context,
                               java.lang.String username)

  Specified by:
    `disableUser` in interface `UserAuthorityService`

### enableUser

    protected boolean enableUser(ExecutionContext context,
                                 java.lang.Long id)

### enableUser

    public boolean enableUser(ExecutionContext context,
                              java.lang.String username)

  Specified by:
    `enableUser` in interface `UserAuthorityService`

### deleteUser

    public void deleteUser(ExecutionContext context,
                           java.lang.String username)

  Specified by:
    `deleteUser` in interface `UserAuthorityService`

### addRole

    public void addRole(ExecutionContext context,
                        User user,
                        Role role)

  Specified by:
    `addRole` in interface `UserAuthorityService`

### removeRole

    public void removeRole(ExecutionContext context,
                           User user,
                           Role role)

  Specified by:
    `removeRole` in interface `UserAuthorityService`

### removeAllRoles

    public void removeAllRoles(ExecutionContext context,
                               User user)

  Specified by:
    `removeAllRoles` in interface `UserAuthorityService`

### getRole

    public Role getRole(ExecutionContext context,
                        java.lang.String roleName)

  Specified by:
    `getRole` in interface `UserAuthorityService`

### getRepoRole

    protected RepoRole getRepoRole(ExecutionContext context,
                                   java.lang.String roleName)

### putRole

    public void putRole(ExecutionContext context,
                        Role aRole)

  Specified by:
    `putRole` in interface `UserAuthorityService`

### getRoles

    public java.util.List getRoles(ExecutionContext context,
                                   FilterCriteria filterCriteria)

  Return everything for now (non-Javadoc)

  Specified by:
    `getRoles` in interface `UserAuthorityService`
  See Also:
    `UserAuthorityService.getRoles(com.jaspersoft.jasperserver.api.common.domain.ExecutionContext, com.jaspersoft.jasperserver.api.metadata.view.domain.FilterCriteria)`

### newRole

    public Role newRole(ExecutionContext context)

  Specified by:
    `newRole` in interface `UserAuthorityService`

### deleteRole

    public void deleteRole(ExecutionContext context,
                           java.lang.String roleName)

  Specified by:
    `deleteRole` in interface `UserAuthorityService`

### getUsersNotInRole

    public java.util.List getUsersNotInRole(ExecutionContext context,
                                            java.lang.String roleName)

  Specified by:
    `getUsersNotInRole` in interface `UserAuthorityService`

### getUsersInRole

    public java.util.List getUsersInRole(ExecutionContext context,
                                         java.lang.String roleName)

  Specified by:
    `getUsersInRole` in interface `UserAuthorityService`

### getAssignedRoles

    public java.util.List getAssignedRoles(ExecutionContext context,
                                           java.lang.String userName)

  Specified by:
    `getAssignedRoles` in interface `UserAuthorityService`

### getAvailableRoles

    public java.util.List getAvailableRoles(ExecutionContext context,
                                            java.lang.String userName)

  Specified by:
    `getAvailableRoles` in interface `UserAuthorityService`

### roleExists

    public boolean roleExists(ExecutionContext context,
                              java.lang.String roleName)

  Specified by:
    `roleExists` in interface `UserAuthorityService`

### getPersistentObject

    public java.lang.Object getPersistentObject(java.lang.Object clientObject)

  Specified by:
    `getPersistentObject` in interface `PersistentObjectResolver`

### maintainInternalUser

    public void maintainInternalUser(org.acegisecurity.userdetails.UserDetails externalUserDetails)

  From an external user, maintain the shadow internal user

  Specified by:
    `maintainInternalUser` in interface `ExternalUserService`
  Parameters:
    `externalUserDetails` -

### getSourceAuthentication

    public static org.acegisecurity.Authentication getSourceAuthentication()

  Returns:
    the Authentication corresponding to the principal who used the "Switch User" feature to login as the current principal if any, or null, if the current principal is not a switched user.

### isUserSwitched

    public static boolean isUserSwitched()

### makeUserLoggedIn

    public void makeUserLoggedIn(java.lang.String username)

  Specified by:
    `makeUserLoggedIn` in interface `ExternalUserService`

### getDefaultInternalRoles

    public java.util.List getDefaultInternalRoles()

  Returns:
    Returns the defaultInternalRoles.

### setDefaultInternalRoles

    public void setDefaultInternalRoles(java.util.List defaultInternalRoles)

  Parameters:
    `defaultInternalRoles` - The defaultInternalRoles to set.

### userExists

    public boolean userExists(ExecutionContext context,
                              java.lang.String username)

  Specified by:
    `userExists` in interface `UserAuthorityService`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007. All Rights Reserved.