public abstract class AppService extends java.lang.Object implements MboServerInterface, Service, AppServiceRemote, Dependable, FixedLoggers, MaxRemoteProxy
MXServer
,
Service
,
ConfigFile
APPLOGGER, CRONTASKLOGGER, CRONTASKMGRLOGGER, CRONTASKMGRSQLLOGGER, DBCONNECTIONLOGGER, DDLOGGER, DMLOGGER, EVENTLOGGER, EXCEPTIONLOGGER, MAILLOGGER, MAXIMOLOGGER, MTLOGGER, NULLMBOPOINTER, SECURITY, SENDFAILEDLOGGER, SERVICELOGGER, SQLLOGGER
appenderPrefix, LOGGERNAME_APP, LOGGERNAME_CRONTASK, LOGGERNAME_CRONTASKMGR, LOGGERNAME_DBCONNECTION, LOGGERNAME_DD, LOGGERNAME_DM, LOGGERNAME_DMPREVIEW, LOGGERNAME_EVENT, LOGGERNAME_EXCEPTION, LOGGERNAME_MAIL, LOGGERNAME_MAXIMO, LOGGERNAME_MT, LOGGERNAME_NULLMBOPOINTER, LOGGERNAME_SECURITY, LOGGERNAME_SENDFAILED, LOGGERNAME_SERVICE, LOGGERNAME_SQL, LOGGERNAME_SQL_CRONTASKMGR, LOGGERNAME_TXN, loggerPrefix
Constructor and Description |
---|
AppService()
Default Constructor.
|
AppService(MXServer mxServer) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkSecurity(java.lang.String methodname,
UserInfo userInfo)
Look in MaxServSecurity to see if a SigOption has been defined for this servicename
and methodname.
|
void |
configure(java.util.Properties cf)
Configure the AppService.
|
void |
destroy()
Release system resources.
|
void |
freeDBConnection(ConnectionKey conKey)
Makes the connection used by the ConnectionKey object
available for others.
|
void |
freeMboSet()
Reduces the liveObjCount, invoked by java.rmi.server.Unreferenced.unreferenced()
implemented in psdi.mbo.MboSet
|
java.lang.String |
getCriteria(java.lang.String criteriaName)
Retrieve a criteria using its name.
|
java.lang.String |
getCurrentState()
Used for remote Management.
|
java.sql.Connection |
getDBConnection(ConnectionKey conKey)
Gets a database connection for reading and writing to the
database.
|
int |
getLiveObjCount()
Used to determine the "load" on this Application Service within this MXServer.
|
int |
getLoad()
Used by ServiceCoordinator
|
MaximoDD |
getMaximoDD()
Implementing MboServerInterface...
uses the mxServer.getMaximoDD(); |
MaxVarServiceRemote |
getMaxVar()
Return a reference to the MaxVar service
|
MboSetRemote |
getMboSet(java.lang.String setName,
UserInfo user)
This one should go away...
|
MXServer |
getMXServer()
Used by the delegates of this class.
|
java.lang.String |
getName()
Used by classes that contain this class
|
ProfileRemote |
getProfile(UserInfo userInfo)
Get the security profile for the specified user.
|
java.rmi.Remote |
getProxy() |
java.lang.String |
getSchemaOwner()
Returns the database schema owner.
|
java.lang.String |
getServiceInfo()
Returns Service name, author and version information.
|
MXLogger |
getServiceLogger()
Returns a logger to log messages related to this service.
|
MboSetRemote |
getSetForRelationship(java.lang.String relOwner,
java.lang.String relName,
java.lang.String[] relColumn,
java.lang.String[] relValue,
UserInfo userInfo)
This is used by the Java UI dialog boxes.
|
MboSetRemote |
getSetFromKeys(java.lang.String setName,
java.lang.String[] keyNames,
java.lang.String[][] keyValues,
UserInfo user)
This method constructs a MboSet to contain all the records based on their key values as
specified through the parameters.
|
java.lang.String[] |
getStateCmdList()
Used for remote Management.
|
java.lang.String[] |
getStateList()
Used for remote Management.
|
java.lang.String |
getURL()
Used by ServiceCoordinator
|
void |
init()
Initialize the Application Service.
|
void |
initCriteriaList(java.util.Hashtable criteriaTable)
Create the criteria list for use with getCriteria.
|
boolean |
isAppService()
Used by ServiceCoordinator
|
boolean |
isRunning()
Get the value of the running variable.
|
boolean |
isSingletonService()
Is used to setup singleton services, i.e.
|
void |
restart()
Indicates that the Service should reload any cached
information.
|
void |
setProxy(java.rmi.Remote proxy) |
void |
setRunning(boolean value)
Set the value of the running variable.
|
void |
setURL(java.lang.String url)
Used by ServiceCoordinator
|
void |
verifyUser(java.lang.String loginCheck,
java.lang.String passCheck,
UserInfo userinfo)
After a user has connected, re-verify the username and password.
|
boolean |
verifyUser(java.lang.String loginCheck,
java.lang.String passCheck,
UserInfo userinfo,
java.lang.String app,
java.lang.String reason,
java.lang.String transid,
java.lang.String[] keyvalue)
After a user has connected, re-verify the username and password.
|
public AppService() throws java.rmi.RemoteException
java.rmi.RemoteException
public AppService(MXServer mxServer) throws java.rmi.RemoteException
srvEnv
- -- the "Server Environment" this Service is being
created in.java.rmi.RemoteException
public boolean isRunning()
isRunning
in interface Dependable
public void setRunning(boolean value)
setRunning
in interface Dependable
public void configure(java.util.Properties cf)
public void setProxy(java.rmi.Remote proxy)
setProxy
in interface MaxRemoteProxy
public java.rmi.Remote getProxy()
getProxy
in interface MaxRemoteProxy
public void init()
public void destroy()
Service
public MXServer getMXServer()
public java.lang.String getName()
getName
in interface AppServiceRemote
getName
in interface Service
getName
in interface ServiceRemote
public java.lang.String getURL()
getURL
in interface AppServiceRemote
getURL
in interface Service
getURL
in interface ServiceRemote
public void setURL(java.lang.String url)
public int getLoad()
public boolean isAppService()
isAppService
in interface Service
isAppService
in interface ServiceRemote
public boolean isSingletonService()
isSingletonService
in interface Service
isSingletonService
in interface ServiceRemote
public java.lang.String getServiceInfo()
public MaxVarServiceRemote getMaxVar() throws MXException, java.rmi.RemoteException
getMaxVar
in interface MboServerInterface
MXException
java.rmi.RemoteException
public ProfileRemote getProfile(UserInfo userInfo) throws MXException, java.rmi.RemoteException
getProfile
in interface MboServerInterface
userInfo
- MXException
java.rmi.RemoteException
SecurityService.getProfile(psdi.security.UserInfo)
public MaximoDD getMaximoDD()
getMaximoDD
in interface MboServerInterface
public java.lang.String getSchemaOwner()
getSchemaOwner
in interface MboServerInterface
getSchemaOwner
in interface AppServiceRemote
DBManager
public MboSetRemote getSetFromKeys(java.lang.String setName, java.lang.String[] keyNames, java.lang.String[][] keyValues, UserInfo user) throws MXException, java.rmi.RemoteException
getSetFromKeys
in interface AppServiceRemote
setName
- the name of the objectkeyNames
- The name of the keys in the same order keyValues are specifiedkeyValues
- Two dimentially string array. Each row contain the values of the
keys specified in keyNames in the same order. Each record is represented by a rowuser
- userInfo objectMXException
java.rmi.RemoteException
getSetFromKeys(String, String[], String[][], UserInfo )
public MboSetRemote getMboSet(java.lang.String setName, UserInfo user) throws MXException, java.rmi.RemoteException
getMboSet
in interface MboServerInterface
getMboSet
in interface AppServiceRemote
MXException
java.rmi.RemoteException
public void freeMboSet()
freeMboSet
in interface MboServerInterface
MboSet
public int getLiveObjCount()
getLiveObjCount
in interface AppServiceRemote
public java.sql.Connection getDBConnection(ConnectionKey conKey)
getDBConnection
in interface MboServerInterface
public void freeDBConnection(ConnectionKey conKey)
freeDBConnection
in interface MboServerInterface
public java.lang.String getCurrentState() throws java.rmi.RemoteException
getCurrentState
in interface AppServiceRemote
java.rmi.RemoteException
public java.lang.String[] getStateList() throws java.rmi.RemoteException
getStateList
in interface AppServiceRemote
java.rmi.RemoteException
public java.lang.String[] getStateCmdList() throws java.rmi.RemoteException
getStateCmdList
in interface AppServiceRemote
java.rmi.RemoteException
public void restart() throws java.rmi.RemoteException
restart
in interface ServiceRemote
java.rmi.RemoteException
public void initCriteriaList(java.util.Hashtable criteriaTable) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public java.lang.String getCriteria(java.lang.String criteriaName) throws java.rmi.RemoteException
getCriteria
in interface AppServiceRemote
java.rmi.RemoteException
public void verifyUser(java.lang.String loginCheck, java.lang.String passCheck, UserInfo userinfo) throws MXException, java.rmi.RemoteException
verifyUser
.
If the entered username is blocked, an error is thrown (signature / blockedUser).
If the entered username and password do not equal those used to log on,
an error is thrown (signature / badVerify).verifyUser
in interface AppServiceRemote
loginCheck
- The newly entered Login ID to be compared to the
logon loginid.passCheck
- The newly entered password to be compared to the
logon password.userInfo
- The current UserInfo.MXException
java.rmi.RemoteException
verifyUser(String, String, UserInfo, String, String, String, String[])
public boolean verifyUser(java.lang.String loginCheck, java.lang.String passCheck, UserInfo userinfo, java.lang.String app, java.lang.String reason, java.lang.String transid, java.lang.String[] keyvalue) throws MXException, java.rmi.RemoteException
verifyUser
in interface MboServerInterface
verifyUser
in interface AppServiceRemote
loginCheck
- The newly entered Login ID to be compared to the
logon loginid.passCheck
- The newly entered password to be compared to the
logon password.userInfo
- The current UserInfo.app
- The application name (optional). Used for ESIG.reason
- The reason code (optional). Used for ESIG.transid
- The transaction ID (optional). Used for ESIG.keyvalue
- Array of up to seven key values (optional).
Used for ESIG to identify a mbo in the main set for the app.MXException
java.rmi.RemoteException
SignatureService.isBlocked(java.lang.String, psdi.security.UserInfo)
,
SignatureService.addLoginTracking(java.lang.String, boolean, psdi.security.UserInfo)
,
psdi.security.UserInfo#isUser
,
SignatureService.isBlocked(java.lang.String, psdi.security.UserInfo)
,
psdi.security.SerucityService#isUser
public MboSetRemote getSetForRelationship(java.lang.String relOwner, java.lang.String relName, java.lang.String[] relColumn, java.lang.String[] relValue, UserInfo userInfo) throws MXException, java.rmi.RemoteException
Given a relationship name and an array of String parameters, get the relationship, substitute the parameters, get the MboSet, and return the Set. This presumes that the bind variables in the relationship Sql are identified by sequential integers and that the correct number of substitution variables are provided in the array.
getSetForRelationship
in interface AppServiceRemote
relOwner
- The "owner" of the relationship name.
This is NOT the actual owner of the set to be returned.
It is needed so that this method can get the relationship Sql.relName
- The relationship name.relColumn
- Array of column names. This is used to configure the Sql with the proper datatype.
There should be the same number of elements in relColumns and relValues, and they should
match by index (relColumn[0] is the column name for relValue[0], etc.).
These must be valid attribute names for relOwner, OR be specified as
tbname.colname.relValue
- Array of bind variables for the given relationship.userInfo
- The userInfo making the request.MXException
java.rmi.RemoteException
getSetForRelationship(java.lang.String, java.lang.String, java.lang.String[], java.lang.String[], psdi.security.UserInfo)
public MXLogger getServiceLogger()
public boolean checkSecurity(java.lang.String methodname, UserInfo userInfo) throws MXException, java.rmi.RemoteException
This method is supplied so that web services can check security before invoking a method on an app service.
checkSecurity
in interface AppServiceRemote
methodname
- The name of the method to be checked.userInfo
- The UserInfo whose privilege should be checked.MXException
java.rmi.RemoteException
Profile.getAppOptionAuth(java.lang.String, java.lang.String, java.lang.String)