Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.search.api.client.query.impl
Class SearchPrincipalImpl

java.lang.Object
  extended by org.nuxeo.ecm.core.search.api.client.query.impl.SearchPrincipalImpl
All Implemented Interfaces:
java.io.Serializable, java.security.Principal, SearchPrincipal

public class SearchPrincipalImpl
extends java.lang.Object
implements SearchPrincipal

Search principal implementation.

Author:
Julien Anguenot
See Also:
Serialized Form

Constructor Summary
SearchPrincipalImpl()
           
SearchPrincipalImpl(java.lang.String name)
           
SearchPrincipalImpl(java.lang.String name, java.lang.String[] groups, boolean isSystemUser)
          Deprecated. 
SearchPrincipalImpl(java.lang.String name, java.lang.String[] groups, boolean isSystemUser, boolean isAdministrator)
           
SearchPrincipalImpl(java.lang.String name, java.lang.String[] groups, boolean isSystemUser, boolean isAdministrator, java.security.Principal originalPrincipal)
           
SearchPrincipalImpl(java.lang.String name, java.lang.String[] groups, boolean isSystemUser, java.security.Principal originalPrincipal)
          Deprecated. 
 
Method Summary
 java.lang.String[] getGroups()
          Return the groups the principal belong to.
 java.lang.String getName()
           
 java.io.Serializable getOriginalPrincipal()
          Returns the original principal from which the search principal has been constructed.
 boolean isAdministrator()
          Returns tru if user is an administrator Security will still apply to this user
 boolean isSystemUser()
          Is the search principal a system user.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, hashCode, toString
 

Constructor Detail

SearchPrincipalImpl

public SearchPrincipalImpl()

SearchPrincipalImpl

public SearchPrincipalImpl(java.lang.String name)

SearchPrincipalImpl

@Deprecated
public SearchPrincipalImpl(java.lang.String name,
                                      java.lang.String[] groups,
                                      boolean isSystemUser)
Deprecated. 


SearchPrincipalImpl

public SearchPrincipalImpl(java.lang.String name,
                           java.lang.String[] groups,
                           boolean isSystemUser,
                           boolean isAdministrator)

SearchPrincipalImpl

@Deprecated
public SearchPrincipalImpl(java.lang.String name,
                                      java.lang.String[] groups,
                                      boolean isSystemUser,
                                      java.security.Principal originalPrincipal)
Deprecated. 


SearchPrincipalImpl

public SearchPrincipalImpl(java.lang.String name,
                           java.lang.String[] groups,
                           boolean isSystemUser,
                           boolean isAdministrator,
                           java.security.Principal originalPrincipal)
Method Detail

getGroups

public java.lang.String[] getGroups()
Description copied from interface: SearchPrincipal
Return the groups the principal belong to.

Specified by:
getGroups in interface SearchPrincipal
Returns:
a list of group identifiers.

getName

public java.lang.String getName()
Specified by:
getName in interface java.security.Principal

isSystemUser

public boolean isSystemUser()
Description copied from interface: SearchPrincipal
Is the search principal a system user.

A system user is a user which doesn't have security restriction at application level. (i.e : only used internally by application components)

This is will be helpful for the backend to decide if wether or not it should apply stack security queries.

Specified by:
isSystemUser in interface SearchPrincipal
Returns:
true if wether or not this principal is a system principal.

getOriginalPrincipal

public java.io.Serializable getOriginalPrincipal()
Description copied from interface: SearchPrincipal
Returns the original principal from which the search principal has been constructed.

It returns a Serializable instance since Principal since Principal is not a Serializable.

If not constructed from a principal then this method will return null.

Specified by:
getOriginalPrincipal in interface SearchPrincipal
Returns:
a principal instance.

isAdministrator

public boolean isAdministrator()
Description copied from interface: SearchPrincipal
Returns tru if user is an administrator

Security will still apply to this user

Specified by:
isAdministrator in interface SearchPrincipal

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.