Class 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
    Author:
    mrogers
    See Also:
    Serialized Form
    • 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
    • Method Detail

      • getShortName

        public java.lang.String getShortName()
        Specified by:
        getShortName in interface Authority
      • 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
      • 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
      • getZones

        public java.util.Set<java.lang.String> getZones()
        Gets all the zones of this user
        Specified by:
        getZones in interface Authority
        Returns:
        The name of the zones of this user.
        Since:
        4.1.3