org.alfresco.repo.security.authority.script
Class ScriptUser

java.lang.Object
  extended by org.alfresco.repo.security.authority.script.ScriptUser
All Implemented Interfaces:
java.io.Serializable, Authority

public class ScriptUser
extends java.lang.Object
implements Authority, java.io.Serializable

The Script user is a USER authority exposed to the scripting API

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.alfresco.repo.security.authority.script.Authority
Authority.AuthorityComparator, Authority.ScriptAuthorityType
 
Constructor Summary
ScriptUser(java.lang.String userName, AuthorityService authorityService)
          Deprecated. The ServiceRegistry and a Scriptable scope are now required
ScriptUser(java.lang.String userName, org.alfresco.service.cmr.repository.NodeRef personNodeRef, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
          Constructs a scriptable object representing a user.
 
Method Summary
 Authority.ScriptAuthorityType getAuthorityType()
           
 java.lang.String getDisplayName()
           
 java.lang.String getFullName()
           
 ScriptNode getPerson()
          Return a ScriptNode wrapping the person
 org.alfresco.service.cmr.repository.NodeRef getPersonNodeRef()
          Return the NodeRef of the person
 java.lang.String getShortName()
           
 java.lang.String getUserName()
          Return the User Name, also known as the Authority Full Name
 void setAuthorityType(Authority.ScriptAuthorityType authorityType)
           
 void setDisplayName(java.lang.String displayName)
           
 void setFullName(java.lang.String fullName)
           
 void setShortName(java.lang.String shortName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptUser

public ScriptUser(java.lang.String userName,
                  org.alfresco.service.cmr.repository.NodeRef personNodeRef,
                  ServiceRegistry serviceRegistry,
                  org.mozilla.javascript.Scriptable scope)
Constructs a scriptable object representing a user.

Parameters:
userName - The username
personNodeRef - The NodeRef
serviceRegistry - A ServiceRegistry instance
scope - Script scope
Since:
4.0

ScriptUser

public ScriptUser(java.lang.String userName,
                  AuthorityService authorityService)
Deprecated. The ServiceRegistry and a Scriptable scope are now required

Method Detail

setAuthorityType

public void setAuthorityType(Authority.ScriptAuthorityType authorityType)

getAuthorityType

public Authority.ScriptAuthorityType getAuthorityType()
Specified by:
getAuthorityType in interface Authority

setShortName

public void setShortName(java.lang.String shortName)

getShortName

public java.lang.String getShortName()
Specified by:
getShortName in interface Authority

setFullName

public void setFullName(java.lang.String fullName)

getFullName

public java.lang.String getFullName()
Specified by:
getFullName in interface Authority

getUserName

public java.lang.String getUserName()
Return the User Name, also known as the Authority Full Name


setDisplayName

public void setDisplayName(java.lang.String displayName)

getDisplayName

public java.lang.String getDisplayName()
Specified by:
getDisplayName in interface Authority

getPersonNodeRef

public org.alfresco.service.cmr.repository.NodeRef getPersonNodeRef()
Return the NodeRef of the person

Since:
4.0

getPerson

public ScriptNode getPerson()
Return a ScriptNode wrapping the person

Since:
4.0


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.