Class SecurityRegistry

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String MBEAN_ID
      Id of the MBean.
      static java.lang.String MBEAN_TYPE
      Type of the MBean.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getId()
      Reads attribute "Id".
      java.lang.String getType()
      Reads attribute "Type".
      java.lang.Boolean userCanExecuteAL​(java.lang.String aUserId, java.lang.String aConfigId, java.lang.String aAssemblyLine)
      Returns whether specified user is allowed to execute given AL from a given configuration.
      java.lang.Boolean userCanExecuteAll​(java.lang.String aUserId)
      Returns whether specified user is allowed to execute everything.
      java.lang.Boolean userCanExecuteConfig​(java.lang.String aUserId, java.lang.String aConfigId)
      Returns whether specified user is allowed to execute given configuration.
      java.lang.Boolean userCanExecuteConfigALs​(java.lang.String aUserId, java.lang.String aConfigId)
      Returns whether specified user is allowed to execute assembly lines from a given configuration.
      java.lang.Boolean userCanReadAll​(java.lang.String aUserId)
      Returns whether specified user is allowed to read everything.
      java.lang.Boolean userCanReadConfig​(java.lang.String aUserId, java.lang.String aConfigId)
      Returns whether specified user is allowed to read given configuration.
      java.lang.Boolean userIsAdmin​(java.lang.String aUserId)
      Returns whether specified user is granted admin role.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MBEAN_TYPE

        public static final java.lang.String MBEAN_TYPE
        Type of the MBean.
        See Also:
        Constant Field Values
      • MBEAN_ID

        public static final java.lang.String MBEAN_ID
        Id of the MBean.
        See Also:
        Constant Field Values
    • Method Detail

      • getType

        public java.lang.String getType()
        Reads attribute "Type".

        getType() and getId() are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as "type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".

        Specified by:
        getType in interface BaseMBean
        Returns:
        the type of this MBean.
      • getId

        public java.lang.String getId()
        Reads attribute "Id". The "Id" value should be different for different MBeans of the same type.

        getType() and getId() are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as "type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".

        Specified by:
        getId in interface BaseMBean
        Returns:
        the Id of this MBean.
      • userIsAdmin

        public java.lang.Boolean userIsAdmin​(java.lang.String aUserId)
                                      throws DIException
        Returns whether specified user is granted admin role.
        Specified by:
        userIsAdmin in interface SecurityRegistryMBean
        Parameters:
        aUserId - the id of the user
        Returns:
        true if the user is granted the admin role
        Throws:
        DIException - if Runtime or Security exception occurs
      • userCanReadConfig

        public java.lang.Boolean userCanReadConfig​(java.lang.String aUserId,
                                                   java.lang.String aConfigId)
                                            throws DIException
        Returns whether specified user is allowed to read given configuration.
        Specified by:
        userCanReadConfig in interface SecurityRegistryMBean
        Parameters:
        aUserId - the id of the user
        aConfigId - the id of the configuration
        Returns:
        return true only if aUserId is allowed to read aConfigId.
        Throws:
        DIException - if Runtime or Security exception occurs
      • userCanExecuteAL

        public java.lang.Boolean userCanExecuteAL​(java.lang.String aUserId,
                                                  java.lang.String aConfigId,
                                                  java.lang.String aAssemblyLine)
                                           throws DIException
        Returns whether specified user is allowed to execute given AL from a given configuration.
        Specified by:
        userCanExecuteAL in interface SecurityRegistryMBean
        Parameters:
        aUserId - the id of the user
        aConfigId - the id of the configuration
        aAssemblyLine - the name of the assembly line
        Returns:
        return true only if aUserId is allowed to execute aAssemblyLine from configuration aConfigId.
        Throws:
        DIException - if Runtime or Security exception occurs
      • userCanExecuteConfig

        public java.lang.Boolean userCanExecuteConfig​(java.lang.String aUserId,
                                                      java.lang.String aConfigId)
                                               throws DIException
        Returns whether specified user is allowed to execute given configuration.
        Specified by:
        userCanExecuteConfig in interface SecurityRegistryMBean
        Parameters:
        aUserId - the id of the user
        aConfigId - the id of the configuration
        Returns:
        return true only if aUserId is allowed to execute configuration aConfigId.
        Throws:
        DIException - if Runtime or Security exception occurs
      • userCanExecuteConfigALs

        public java.lang.Boolean userCanExecuteConfigALs​(java.lang.String aUserId,
                                                         java.lang.String aConfigId)
                                                  throws DIException
        Returns whether specified user is allowed to execute assembly lines from a given configuration.
        Specified by:
        userCanExecuteConfigALs in interface SecurityRegistryMBean
        Parameters:
        aUserId - the id of the user
        aConfigId - the id of the configuration
        Returns:
        return true only if aUserId is allowed to execute assembly lines from configuration aConfigId.
        Throws:
        DIException - if Runtime or Security exception occurs
      • userCanExecuteAll

        public java.lang.Boolean userCanExecuteAll​(java.lang.String aUserId)
                                            throws DIException
        Returns whether specified user is allowed to execute everything.
        Specified by:
        userCanExecuteAll in interface SecurityRegistryMBean
        Parameters:
        aUserId - the id of the user
        Returns:
        return true only if aUserId is allowed to execute everything.
        Throws:
        DIException - if Runtime or Security exception occurs
      • userCanReadAll

        public java.lang.Boolean userCanReadAll​(java.lang.String aUserId)
                                         throws DIException
        Returns whether specified user is allowed to read everything.
        Specified by:
        userCanReadAll in interface SecurityRegistryMBean
        Parameters:
        aUserId - the id of the user
        Returns:
        return true only if aUserId is allowed to read everything.
        Throws:
        DIException - if Runtime or Security exception occurs