com.sage.accpac.sm
Class SharedDataSet

java.lang.Object
  extended by com.sage.accpac.sm.SharedDataSet
All Implemented Interfaces:
ISharedDataSet

@ThreadSafe
public class SharedDataSet
extends java.lang.Object
implements ISharedDataSet

The SharedDataSet class implements ISharedDataSet


Nested Class Summary
static class SharedDataSet.PasswordStatus
          The possible statuses that can be returned when processing passwords (e.g.
 
Constructor Summary
SharedDataSet()
          Provides access to the default or single shared data set.
SharedDataSet(java.lang.String directory)
          Provides access to the shared data set in the specified shared data directory.
 
Method Summary
 SharedDataSet.PasswordStatus changePassword(java.lang.String userID, java.lang.String oldPassword, java.lang.String newPassword)
          attempts to change the password for the given user
 SharedDataSet.PasswordStatus checkValidLogin(java.lang.String userID)
          Check the user name, returning the status
 SharedDataSet.PasswordStatus checkValidLogin(java.lang.String userID, java.lang.String password)
          Check the user name and password, returning the status
 java.lang.String getDirectory()
          Gets the file-system directory name for this directory.
 Organizations getOrganizations()
          Gets a list of organizations set up in the system.
 java.lang.String getSysOrg(java.lang.String company)
          Gets the system org ID of the given company
 boolean isSecurityEnabled(java.lang.String orgID)
          Is the security enabled for the given OrgID?
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SharedDataSet

public SharedDataSet()
Provides access to the default or single shared data set.


SharedDataSet

public SharedDataSet(java.lang.String directory)
Provides access to the shared data set in the specified shared data directory.

Parameters:
directory - the directory where the shared data is
Throws:
java.lang.NullPointerException - if the argument is a null reference
java.lang.IllegalArgumentException - if the directory is not a valid shared data directory including not having the correct form or if the file system permissions etc. do not permit enough access to the directory at this time.
Method Detail

changePassword

public SharedDataSet.PasswordStatus changePassword(java.lang.String userID,
                                                   java.lang.String oldPassword,
                                                   java.lang.String newPassword)
attempts to change the password for the given user

Specified by:
changePassword in interface ISharedDataSet
Parameters:
userID - the ID of the user
oldPassword - the old password for the user
newPassword - the new password for the user
Returns:
the status of the request

checkValidLogin

public SharedDataSet.PasswordStatus checkValidLogin(java.lang.String userID)
Check the user name, returning the status

Specified by:
checkValidLogin in interface ISharedDataSet
Parameters:
userID - the ID of the user
Returns:
a SharedDataSet.PasswordStatus indicating the result. Note that there are several that reflect success.

checkValidLogin

public SharedDataSet.PasswordStatus checkValidLogin(java.lang.String userID,
                                                    java.lang.String password)
Check the user name and password, returning the status

Specified by:
checkValidLogin in interface ISharedDataSet
Parameters:
userID - the ID of the user
password - the password for the user
Returns:
a SharedDataSet.PasswordStatus indicating the result. Note that there are several that reflect success.

getDirectory

public java.lang.String getDirectory()
Gets the file-system directory name for this directory.

Specified by:
getDirectory in interface ISharedDataSet
Returns:
the directory name

getOrganizations

public Organizations getOrganizations()
Gets a list of organizations set up in the system.

Specified by:
getOrganizations in interface ISharedDataSet
Returns:
an Organizations collection

getSysOrg

public java.lang.String getSysOrg(java.lang.String company)
Gets the system org ID of the given company

Specified by:
getSysOrg in interface ISharedDataSet
Parameters:
company - company org ID
Returns:
Corresponding system org ID

isSecurityEnabled

public final boolean isSecurityEnabled(java.lang.String orgID)
Is the security enabled for the given OrgID?

Specified by:
isSecurityEnabled in interface ISharedDataSet
Parameters:
orgID - Organization ID (either Company or System)
Returns:
true if security is enabled

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2011 Sage Software, Inc. All rights reserved.