Class SecurityContext

java.lang.Object
com.j_spaces.core.SecurityContext
All Implemented Interfaces:
SmartExternalizable, Externalizable, Serializable

@Deprecated public class SecurityContext extends Object implements SmartExternalizable
Deprecated.
The SecurityContext class defines security info passed from the proxy to the space, and is used by the security filters to validate access to space functions.
Version:
1.0
Author:
Yechiel Fefer
See Also:
  • Field Details

    • PERMISSION_READ

      public static final char PERMISSION_READ
      Deprecated.
      Read permission.
      See Also:
    • PERMISSION_WRITE

      public static final char PERMISSION_WRITE
      Deprecated.
      Write/Take/Update/Replace permission.
      See Also:
    • PERMISSION_ADMIN

      public static final char PERMISSION_ADMIN
      Deprecated.
      Admin functions permission.
      See Also:
    • PERMISSION_EXECUTE

      public static final char PERMISSION_EXECUTE
      Deprecated.
      Task executions permission
      See Also:
    • ANONYMOUS_USER

      public static final String ANONYMOUS_USER
      Deprecated.
      Default user name and password, when default constructor is used.
      See Also:
  • Constructor Details

    • SecurityContext

      public SecurityContext()
      Deprecated.
      The default constructor shall create a security context used for ANONYMOUS_USER user account.
    • SecurityContext

      public SecurityContext(String username, String password)
      Deprecated.
      Create new security context.
      Parameters:
      username - - User name shouldn't be null value.
      password - - Password shouldn't be null value.
  • Method Details

    • disableAllOperations

      public void disableAllOperations()
      Deprecated.
      Disable all operations to user represented by this security context.
    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Deprecated.
      Specified by:
      writeExternal in interface Externalizable
      Throws:
      IOException
    • readExternal

      public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
      Deprecated.
      Specified by:
      readExternal in interface Externalizable
      Throws:
      IOException
      ClassNotFoundException
    • setUsername

      public void setUsername(String username)
      Deprecated.
      Sets user name.
      Parameters:
      username - the user name
    • getUsername

      public String getUsername()
      Deprecated.
      Gets user name.
      Returns:
      user name
    • setPassword

      public void setPassword(String pass)
      Deprecated.
      Sets password.
      Parameters:
      pass - the password
    • getPassword

      public String getPassword()
      Deprecated.
      Gets the password.
      Returns:
      the password
    • setEncrypted

      public void setEncrypted(boolean isEncrypted)
      Deprecated.
      Set indicator if encrypted.
      Parameters:
      isEncrypted - true if encrypted
    • isEncrypted

      public boolean isEncrypted()
      Deprecated.
      Check is encrypted.
      Returns:
      true if encrypted
    • setPermissions

      public void setPermissions(String permissions)
      Deprecated.
      Set the permission.
       For example:
       
          SecurityContext context = ...;
          context.setPermissions("" + PERMISSION_WRITE + PERMISSION_READ); // read & write
       permission
       
       
      Parameters:
      permissions - the permission string
    • getPermissions

      public String getPermissions()
      Deprecated.
      Gets the the permission String.
      Returns:
      the permission String
      See Also:
    • setImplementorContext

      public void setImplementorContext(Object implementorContext)
      Deprecated.
      Set implementation specific free context, must implement Serializable. This can be used to attach a metadata to the context.
      Parameters:
      implementorContext - implementation specific free context
    • getImplementorContext

      public Object getImplementorContext()
      Deprecated.
      Get the implementation specific free context.
      Returns:
      implementation specific free context
      See Also:
    • isInitialized

      public boolean isInitialized()
      Deprecated.
    • setInitialized

      public void setInitialized(boolean initialized)
      Deprecated.