*** This class provides Binary Compatibility only, not Source Compatibility ***

Class ProfileDomain

java.lang.Object
com.sas.services.user.ProfileDomain
All Implemented Interfaces:
ConsumedResourceInterface, Serializable, Cloneable

@SASScope("ALL") @BinaryCompatibilityOnly public final class ProfileDomain extends Object implements Cloneable, ConsumedResourceInterface, Serializable
This class is used by the UserServiceInitializer to hold the configuration data about Profiles. It has the URL of the server, a repository type, filtering information, a base (for LDAP), and a Java class name to instantiate. The UserService loadProfile() method passes this object to the Profile object's load() method so it will have the information it needs to perform the load from the persistent store.
Since:
1.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProfileDomain(String url, String type, String filter, String className)
    Construct a new ProfileDomain with the configuration information from the UserService initialization.
    ProfileDomain(String uid, String url, String type, String filter, String className)
    Construct a new ProfileDomain with the configuration information from the UserService initialization.
  • Method Summary

    Modifier and Type
    Method
    Description
    Object
    Creates a clone of this object by copying the values for each of its attributes.
    boolean
    equals(Object o)
    Compare against another object for equality.
    String
    Get the LDAP search base to use when retrieving the profile object.
    String
    Get the Java class name.
    String
    Get the filter information.
    String
    Gets a localized value describing the resource's type.
    String
    Gets a localized value describing the resource's type and value.
    String
    Gets the id that uniquely identifies the resource within a service's configuration.
    String
    Gets a value describing the resource's type.
    int
    Gets the code describing the resource's type.
    String
    Gets the value used to identify the service configuration resource.
    String
    Get the repository type to search for when loading this type of profile.
    String
    Get the URL of the service that contains the profile information.
    int
    Gets the hash code.
    boolean
    Determines if this resource is required by the service's configuration.
    void
    setBase(String base)
    Set the base to use for searching LDAP for this profile object.
    void
    setClassName(String className)
    Set the Java class name to instantiate when creating an instance of this profile.
    void
    setFilter(String filter)
    Sets the filter information.
    void
    setType(String type)
    Sets the repository type to search for when loading this type of profile.
    void
    setUrl(String url)
    Sets the URL of the service that contains the profile information.
    String
    Gets a string representation of this profile domain.
    static void
    validateDomainURL(String domainURL)
    Determines whether the candidate domain URL is syntactically valid.

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ProfileDomain

      public ProfileDomain(String url, String type, String filter, String className)
      Construct a new ProfileDomain with the configuration information from the UserService initialization.
      Parameters:
      url - The URL of the service that the profile data is to be retrieved from.
      type - The repository type of the profile entity. The load method may not need this, and this can be null.
      filter - Filter information that can be used to search the repository for the correct entity.
      className - The Java class name to instantiate when this profile is created. This parameter is required for profile loading to work correctly.
    • ProfileDomain

      public ProfileDomain(String uid, String url, String type, String filter, String className)
      Construct a new ProfileDomain with the configuration information from the UserService initialization.
      Parameters:
      uid - Unique identifier.
      url - The URL of the service that the profile data is to be retrieved from.
      type - The repository type of the profile entity. The load method may not need this, and this can be null.
      filter - Filter information that can be used to search the repository for the correct entity.
      className - The Java class name to instantiate when this profile is created. This parameter is required for profile loading to work correctly.
  • Method Details

    • validateDomainURL

      public static void validateDomainURL(String domainURL) throws SyntaxException
      Determines whether the candidate domain URL is syntactically valid. A valid domain URL must satisfy the following syntax:
       <protocol>://<DNS host>[:<port number>]
       
      For example, ldap://myhost.mycompany.com:9999 or
      dav://myhost.mycompany.com:9999 or
      omi://myhost.mycompany.com:9999 ldap://myhost.mycompany.com or
      dav://myhost.mycompany.com:9999
      Parameters:
      domainURL - Domain URL.
      Throws:
      SyntaxException - if the candidate domain URL is invalid. The exception's message will provide a description of the syntax violation suitable for presentation to the user.
    • getUrl

      public String getUrl()
      Get the URL of the service that contains the profile information.

      Returns:
      The service URL.
    • setUrl

      public void setUrl(String url)
      Sets the URL of the service that contains the profile information.
      Parameters:
      url - URL of the service that contains profile information.
    • getType

      public String getType()
      Get the repository type to search for when loading this type of profile.

      Returns:
      The repository type.
    • setType

      public void setType(String type)
      Sets the repository type to search for when loading this type of profile.
      Parameters:
      type - Repository's type.
    • getFilter

      public String getFilter()
      Get the filter information. This can be used by the load method to retrieve the correct object from the repository.

      Returns:
      The filter information.
    • setFilter

      public void setFilter(String filter)
      Sets the filter information. This can be used by the load method to retrieve the correct object from the repository.
      Parameters:
      filter - Filter.
    • setBase

      public void setBase(String base)
      Set the base to use for searching LDAP for this profile object.

      Parameters:
      base - The LDAP search base.
    • getBase

      public String getBase()
      Get the LDAP search base to use when retrieving the profile object.

      Returns:
      The LDAP search base.
    • setClassName

      public void setClassName(String className)
      Set the Java class name to instantiate when creating an instance of this profile.

      Parameters:
      className - The Java class name.
    • getClassName

      public String getClassName()
      Get the Java class name.

      Returns:
      The Java class name.
    • equals

      public boolean equals(Object o)
      Compare against another object for equality.
      Overrides:
      equals in class Object
      Parameters:
      o - The object to compare against.
      Returns:
      true if the objects are equal, false otherwise
    • hashCode

      public int hashCode()
      Gets the hash code.
      Overrides:
      hashCode in class Object
      Returns:
      Hash code.
    • clone

      public Object clone()
      Creates a clone of this object by copying the values for each of its attributes.
      Specified by:
      clone in interface ConsumedResourceInterface
      Overrides:
      clone in class Object
      Returns:
      Clone of this object.
    • getResourceID

      public String getResourceID()
      Description copied from interface: ConsumedResourceInterface
      Gets the id that uniquely identifies the resource within a service's configuration.
      Specified by:
      getResourceID in interface ConsumedResourceInterface
      Returns:
      Resource's ID.
    • getResourceValue

      public String getResourceValue()
      Description copied from interface: ConsumedResourceInterface
      Gets the value used to identify the service configuration resource.
      Specified by:
      getResourceValue in interface ConsumedResourceInterface
      Returns:
      Service configuration resource's value.
    • getLocalizedResourceType

      public String getLocalizedResourceType()
      Description copied from interface: ConsumedResourceInterface
      Gets a localized value describing the resource's type.
      Specified by:
      getLocalizedResourceType in interface ConsumedResourceInterface
      Returns:
      Resource's type. For example, a Logging Service configuration's resource types would be localized values for "Context", "Output", and "Renderer".
    • getLocalizedResourceTypeAndValue

      public String getLocalizedResourceTypeAndValue()
      Description copied from interface: ConsumedResourceInterface
      Gets a localized value describing the resource's type and value.
      Specified by:
      getLocalizedResourceTypeAndValue in interface ConsumedResourceInterface
      Returns:
      Resource's type. For example, a Logging Service configuration's resource types would be localized values for
      • "Context : com.sas.services"
      • "Output : A1"
      • "Renderer: com.sas.MyRenderer"
    • getResourceType

      public String getResourceType()
      Description copied from interface: ConsumedResourceInterface
      Gets a value describing the resource's type.
      Specified by:
      getResourceType in interface ConsumedResourceInterface
      Returns:
      Resource's type. For example, a Logging Service configuration's resource types would be "Context", "Output", and "Renderer".
    • getResourceTypeCode

      public int getResourceTypeCode()
      Description copied from interface: ConsumedResourceInterface
      Gets the code describing the resource's type.
      Specified by:
      getResourceTypeCode in interface ConsumedResourceInterface
      Returns:
      Resource's type code.
    • isRequired

      public boolean isRequired()
      Description copied from interface: ConsumedResourceInterface
      Determines if this resource is required by the service's configuration.
      Specified by:
      isRequired in interface ConsumedResourceInterface
      Returns:
      true if this resource is required by the service's configuration.
    • toString

      public String toString()
      Gets a string representation of this profile domain. The following values are summarized.
      • type
      • URL
      • class name
      • filter
      • base
      Overrides:
      toString in class Object