*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.user
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
ConstructorsConstructorDescriptionProfileDomain(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 TypeMethodDescriptionObjectclone()Creates a clone of this object by copying the values for each of its attributes.booleanequals(Object o) Compare against another object for equality.StringgetBase()Get the LDAP search base to use when retrieving the profile object.StringGet the Java class name.StringGet the filter information.StringGets a localized value describing the resource's type.StringGets a localized value describing the resource's type and value.StringGets the id that uniquely identifies the resource within a service's configuration.StringGets a value describing the resource's type.intGets the code describing the resource's type.StringGets the value used to identify the service configuration resource.StringgetType()Get the repository type to search for when loading this type of profile.StringgetUrl()Get the URL of the service that contains the profile information.inthashCode()Gets the hash code.booleanDetermines if this resource is required by the service's configuration.voidsetBase(String base) Set the base to use for searching LDAP for this profile object.voidsetClassName(String className) Set the Java class name to instantiate when creating an instance of this profile.voidsetFilter(String filter) Sets the filter information.voidsetType(String type) Sets the repository type to search for when loading this type of profile.voidsetUrl(String url) Sets the URL of the service that contains the profile information.StringtoString()Gets a string representation of this profile domain.static voidvalidateDomainURL(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
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:9999or
dav://myhost.mycompany.com:9999or
omi://myhost.mycompany.com:9999ldap://myhost.mycompany.comor
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:
equalsin classObject- Parameters:
o- The object to compare against.- Returns:
trueif the objects are equal,falseotherwise
-
hashCode
public int hashCode()Gets the hash code.- Overrides:
hashCodein classObject- Returns:
- Hash code.
-
clone
public Object clone()Creates a clone of this object by copying the values for each of its attributes.- Specified by:
clonein interfaceConsumedResourceInterface- Overrides:
clonein classObject- Returns:
- Clone of this object.
-
getResourceID
public String getResourceID()Description copied from interface:ConsumedResourceInterfaceGets the id that uniquely identifies the resource within a service's configuration.- Specified by:
getResourceIDin interfaceConsumedResourceInterface- Returns:
- Resource's ID.
-
getResourceValue
public String getResourceValue()Description copied from interface:ConsumedResourceInterfaceGets the value used to identify the service configuration resource.- Specified by:
getResourceValuein interfaceConsumedResourceInterface- Returns:
- Service configuration resource's value.
-
getLocalizedResourceType
public String getLocalizedResourceType()Description copied from interface:ConsumedResourceInterfaceGets a localized value describing the resource's type.- Specified by:
getLocalizedResourceTypein interfaceConsumedResourceInterface- 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:ConsumedResourceInterfaceGets a localized value describing the resource's type and value.- Specified by:
getLocalizedResourceTypeAndValuein interfaceConsumedResourceInterface- 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:ConsumedResourceInterfaceGets a value describing the resource's type.- Specified by:
getResourceTypein interfaceConsumedResourceInterface- 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:ConsumedResourceInterfaceGets the code describing the resource's type.- Specified by:
getResourceTypeCodein interfaceConsumedResourceInterface- Returns:
- Resource's type code.
-
isRequired
public boolean isRequired()Description copied from interface:ConsumedResourceInterfaceDetermines if this resource is required by the service's configuration.- Specified by:
isRequiredin interfaceConsumedResourceInterface- Returns:
trueif 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:
toStringin classObject
-