All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.util.login
Class LoginBeanBIPValidate

    com.sas.util.login.LoginBeanBIPValidate

All Implemented Interfaces:
  com.sas.util.login.LoginBeanValidateInterface

    public class LoginBeanBIPValidate

implements com.sas.util.login.LoginBeanValidateInterface

The LoginBeanBIPValidate class is an implementation of the LoginBeanValidateInterface for the SAS Foundation Services. It performs login credential validation for the services. This class can be set as a validation handler for the LoginBean and the bean will then perform Foundation Services validation for the credentials entered in by the user.

The following example illustrates a typical use of the LoginBean in conjunction with this class.

     LoginBean bean = new LoginBean();
     bean.setTitle("Enter your username and password:");

     // Provide a default value for the username.
     bean.setUsername("James");

     // Allow 2 retry attempts before failing (default is 3).
     bean.setAttempts(2);

     // Instantiate the LoginBeanSwingUtil class using the constructor which sets the
     // login bean as the model.
     LoginBeanSwingUtil beanUtil = new LoginBeanSwingUtil(bean);

     // Set our LoginBeanSwingUtil instance as the action handler for the login bean.
     // Note that the LoginBeanSwingUtil class implements LoginBeanActionInterface as a convenience for
     // typical usage scenarios.
     bean.setActionHandler(beanUtil);

     // Instantiate this validation class, providing the login bean in the constructor.
     LoginBeanBIPValidate BIPValidate = new LoginBeanBIPValidate(bean);

     // Set this instance as the validation handler for the login bean.
     bean.setValidateHandler(BIPValidate);

     // Configure the validation instance with information needed to access SAS Foundation Services.
     String pfsConfigFileBase = "C:\\AppDevStudio\\webAF\\resources";
     BIPValidate.setSecurityPolicy(pfsConfigFileBase + "\\policy");
     BIPValidate.setSecurityLoginConfig(pfsConfigFileBase + "\\login.config");
     BIPValidate.setPFSDeploymentFileURL("file:\\"+pfsConfigFileBase+"\\sas_pfs_services_core.xml");
     BIPValidate.setSoftwareComponentName("Query and Reporting");
     BIPValidate.setDomain("CARYNT");

     // Call the showDialog method to display a model Swing dialog with a visual representation
     // of the login bean.
     beanUtil.showDialog("LoginBean", null);

Field Summary
`protected boolean` | `debug` A flag indicating whether debugging information should be displayed.
`protected java.lang.String` | `domain` The domain to authenticate against.
`protected com.sas.util.login.LoginBean` | `loginBean` The associated LoginBean instance.
`protected java.lang.String` | `pfsDeploymentFileURL` The Foundation Services deployment filename.
`protected java.lang.String` | `securityLoginConfigFilename` The filename for the login configuration
`protected java.lang.String` | `securityPolicyFilename` The filename for the Java2 security policy file.
`protected java.lang.String` | `serviceDeploymentName` The name of the Foundation Services deployment group within the application
`protected java.lang.String` | `softwareComponentName` The name of the Foundation Services application

Constructor Summary
`LoginBeanBIPValidate()` Default constructor.
`LoginBeanBIPValidate(com.sas.util.login.LoginBean bean)` Constructor allowing for the specification of a LoginBean

Method Summary
`boolean` | `getDebug()` Returns the value for the debug property.
`java.lang.String` | `getDomain()` Returns the domain name that the credentials will be authenticated against.
`com.sas.util.login.LoginBean` | `getLoginBean()` Returns the LoginBean instance associated with this class.
`java.lang.String` | `getPFSDeploymentFileURL()` Returns the URL of the configuration file that defines the Foundation Services application for deployment.
`java.lang.String` | `getSecurityLoginConfig()` Returns the name of the configuration file that defines the JAAS security login.
`java.lang.String` | `getSecurityPolicy()` Returns the name of the configuration file that defines the Java2 security policy.
`java.lang.String` | `getServiceDeploymentName()` Returns the name of the service deployment for use by Foundation Services.
`java.lang.String` | `getSoftwareComponentName()` Returns the name of the software component for use by Foundation Services.
`protected void` | `init()` Initialization of member variables.
`static void` | `main(java.lang.String[] argv)` The main program serves as a testing facility for this class.
`void` | `setDebug(boolean value)` Sets the debug property, which when enabled can assist in tracking down login validation problems.
`void` | `setDomain(java.lang.String value)` Sets the domain name that the credentials will be authenticated against.
`void` | `setLoginBean(com.sas.util.login.LoginBean bean)` Sets the LoginBean associated with this util class.
`void` | `setPFSDeploymentFileURL(java.lang.String URL)` Sets the URL of the configuration file that defines the Foundation Services application to deploy.
`void` | `setSecurityLoginConfig(java.lang.String filename)` Sets the name of the configuration file that defines the JAAS security login.
`void` | `setSecurityPolicy(java.lang.String filename)` Sets the name of the configuration file that defines the Java2 security policy.
`void` | `setServiceDeploymentName(java.lang.String name)` Sets the name of the service deployment for use by Foundation Services.
`void` | `setSoftwareComponentName(java.lang.String name)` Sets the name of the software component for use by Foundation Services.
`boolean` | `validate(java.lang.String username, java.lang.String password)` Implementation of the LoginBeanValidateInterface.

Field Detail

### loginBean

    protected com.sas.util.login.LoginBean loginBean

  The associated LoginBean instance.

### securityPolicyFilename

    protected java.lang.String securityPolicyFilename

  The filename for the Java2 security policy file.

### securityLoginConfigFilename

    protected java.lang.String securityLoginConfigFilename

  The filename for the login configuration

### pfsDeploymentFileURL

    protected java.lang.String pfsDeploymentFileURL

  The Foundation Services deployment filename.

### softwareComponentName

    protected java.lang.String softwareComponentName

  The name of the Foundation Services application

### serviceDeploymentName

    protected java.lang.String serviceDeploymentName

  The name of the Foundation Services deployment group within the application

### domain

    protected java.lang.String domain

  The domain to authenticate against.

### debug

    protected boolean debug

  A flag indicating whether debugging information should be displayed.

Constructor Detail

### LoginBeanBIPValidate

    public LoginBeanBIPValidate()

  Default constructor.

### LoginBeanBIPValidate

    public LoginBeanBIPValidate(com.sas.util.login.LoginBean bean)

  Constructor allowing for the specification of a LoginBean

  Parameters:
    `bean` - An instance of LoginBean associated with this class.

Method Detail

### init

    protected void init()

  Initialization of member variables.

### setLoginBean

    public void setLoginBean(com.sas.util.login.LoginBean bean)

  Sets the LoginBean associated with this util class.

  Parameters:
    `bean` - An instance of LoginBean to associate with this class.
  See Also:
    `getLoginBean()`

### getLoginBean

    public com.sas.util.login.LoginBean getLoginBean()

  Returns the LoginBean instance associated with this class.

  Returns:
    The instance of LoginBean.
  See Also:
    `setLoginBean(LoginBean)`

### setSecurityPolicy

    public void setSecurityPolicy(java.lang.String filename)

  Sets the name of the configuration file that defines the Java2 security policy.

  Parameters:
    `filename` - The name of the configuration file.
  See Also:
    `getSecurityPolicy()`

### getSecurityPolicy

    public java.lang.String getSecurityPolicy()

  Returns the name of the configuration file that defines the Java2 security policy.

  Returns:
    The name of the configuration file.
  See Also:
    `setSecurityPolicy(String)`

### setSecurityLoginConfig

    public void setSecurityLoginConfig(java.lang.String filename)

  Sets the name of the configuration file that defines the JAAS security login.

  Parameters:
    `filename` - The name of the configuration file.
  See Also:
    `getSecurityLoginConfig()`

### getSecurityLoginConfig

    public java.lang.String getSecurityLoginConfig()

  Returns the name of the configuration file that defines the JAAS security login.

  Returns:
    The name of the configuration file.
  See Also:
    `setSecurityLoginConfig(String)`

### setPFSDeploymentFileURL

    public void setPFSDeploymentFileURL(java.lang.String URL)

  Sets the URL of the configuration file that defines the Foundation Services application to deploy.

  Parameters:
    `URL` - The URL of the configuration file.
  See Also:
    `getPFSDeploymentFileURL()`

### getPFSDeploymentFileURL

    public java.lang.String getPFSDeploymentFileURL()

  Returns the URL of the configuration file that defines the Foundation Services application for deployment.

  Returns:
    The URL of the configuration file.
  See Also:
    `setPFSDeploymentFileURL(String)`

### setSoftwareComponentName

    public void setSoftwareComponentName(java.lang.String name)

  Sets the name of the software component for use by Foundation Services.

  Parameters:
    `name` - The software component name.
  See Also:
    `getSoftwareComponentName()`

### getSoftwareComponentName

    public java.lang.String getSoftwareComponentName()

  Returns the name of the software component for use by Foundation Services.

  Returns:
    The software component name.
  See Also:
    `setSoftwareComponentName(String)`

### setServiceDeploymentName

    public void setServiceDeploymentName(java.lang.String name)

  Sets the name of the service deployment for use by Foundation Services. Defaults to "BIP Core Services".

  Parameters:
    `name` - The name of the service deployment.
  See Also:
    `getServiceDeploymentName()`

### getServiceDeploymentName

    public java.lang.String getServiceDeploymentName()

  Returns the name of the service deployment for use by Foundation Services.

  Returns:
    The name of the service deployment.
  See Also:
    `setServiceDeploymentName(String)`

### setDomain

    public void setDomain(java.lang.String value)

  Sets the domain name that the credentials will be authenticated against.

  Parameters:
    `value` - The name of the domain.
  See Also:
    `getDomain()`

### getDomain

    public java.lang.String getDomain()

  Returns the domain name that the credentials will be authenticated against.

  Returns:
    The name of the domain.
  See Also:
    `setDomain(String)`

### setDebug

    public void setDebug(boolean value)

  Sets the debug property, which when enabled can assist in tracking down login validation problems.

  Parameters:
    `value` - The boolean value for whether or not debugging should be enabled.
  See Also:
    `getDebug()`

### getDebug

    public boolean getDebug()

  Returns the value for the debug property.

  Returns:
    The boolean value for whether or not debugging is enabled.
  See Also:
    `setDebug(boolean)`

### validate

    public boolean validate(java.lang.String username,
                            java.lang.String password)

  Implementation of the LoginBeanValidateInterface. The validate method performs the validation of the supplied credentials within SAS Foundation Services.
  If exceptions are thrown during validation within SAS Foundation Services, they are caught and analyzed to in an attempt to notify the LoginBean of the type of failure encountered. This information can then be presented to the user in some manner to highlight the type of problem.

  Specified by:
    `validate` in interface `com.sas.util.login.LoginBeanValidateInterface`
  Parameters:
    `username` - The name of the user.
    `password` - The password for the specified username.
  Returns:
    True if validation succeeded, otherwise false.

### main

    public static void main(java.lang.String[] argv)

  The main program serves as a testing facility for this class. It instantiates LoginBean, LoginBeanSwingUtil and LoginBeanBIPValidate, sets various properties, and then calls the showDialog method on LoginBeanSwingUtil to display a modal dialog and validate entered credentials against SAS Foundation Services.

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.