public class DoclinkService extends AppService implements DoclinkServiceRemote
See Doclink Package description.
See Docinfo
for a description of the urltype attribute.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
URLTYPE_DMS
constant for urltype DMS
|
static java.lang.String |
URLTYPE_FILE
constant for urltype FILE
|
static java.lang.String |
URLTYPE_WWW
constant for urltype WWW
|
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 |
---|
DoclinkService() |
DoclinkService(MXServer mxServer) |
Modifier and Type | Method and Description |
---|---|
MboSetRemote |
addDocinfoAndLinks(java.lang.String urlname,
java.lang.String description,
java.lang.String[] urlparam,
java.lang.String doctype,
java.lang.String urltype,
java.lang.String keytable,
java.lang.String keycolumn,
java.lang.String[] keyvalue,
boolean forceAutokey,
java.lang.String application,
UserInfo userInfo)
Create a Docinfo and one or more Doclinks per the supplied parameters.
|
MboSetRemote |
addDocinfoAndLinks(java.lang.String urlname,
java.lang.String description,
java.lang.String assetType,
java.lang.String[] keyvalue,
UserInfo userInfo)
Wrapper method, calls
addDocinfoAndLinks
assuming the following values, and forcing autokey. |
void |
copyAssocDoclinks(MboSetRemote sourcelinks,
MboSetRemote targetLinks,
long targetId,
java.lang.String targetMboName)
Makes a duplicate copy of any doclink that is in the doclinks set that
has the copylinktowo flag set to true.
|
boolean |
doclinkExists(java.lang.String keytable,
java.lang.String keycolumn,
java.lang.String keyvalue,
UserInfo userInfo)
Identifies whether a row exists in the doclinks table for the specified params.
|
java.util.TreeMap |
getAppDoctypeLinks(java.lang.String appName,
java.lang.String keyTable,
java.lang.String keyColumn,
int keyValue,
UserInfo userInfo)
Get all the valid doctypes for the given app, and within each doctype, find
any doclinks that may exist for the given keytable, keycolumn, and keyvalue.
|
java.lang.String |
getDefaultFilePath(java.lang.String doctype,
UserInfo userInfo)
Given a doctype, get its defaultfilepath.
|
java.lang.String |
getFullPathFromRelativePath(java.lang.String path,
java.lang.String rootKey,
UserInfo ui)
Convert a valid tenant folder path as entered to be the absolute folder path based on the teannt's document root or the system default.
|
static java.lang.String |
getTenantFolderPathRootAsEntered(java.lang.String path)
Return the root folder name as in the relative path the tenant has entered.
|
checkSecurity, configure, destroy, freeDBConnection, freeMboSet, getCriteria, getCurrentState, getDBConnection, getLiveObjCount, getLoad, getMaximoDD, getMaxVar, getMboSet, getMXServer, getName, getProfile, getProxy, getSchemaOwner, getServiceInfo, getServiceLogger, getSetForRelationship, getSetFromKeys, getStateCmdList, getStateList, getURL, init, initCriteriaList, isAppService, isRunning, isSingletonService, restart, setProxy, setRunning, setURL, verifyUser, verifyUser
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkSecurity, getCriteria, getCurrentState, getLiveObjCount, getMboSet, getName, getSchemaOwner, getSetForRelationship, getSetFromKeys, getStateCmdList, getStateList, getURL, verifyUser, verifyUser
isAppService, isSingletonService, restart
public static final java.lang.String URLTYPE_FILE
public static final java.lang.String URLTYPE_WWW
public static final java.lang.String URLTYPE_DMS
public DoclinkService() throws java.rmi.RemoteException
java.rmi.RemoteException
public DoclinkService(MXServer mxServer) throws java.rmi.RemoteException
java.rmi.RemoteException
public boolean doclinkExists(java.lang.String keytable, java.lang.String keycolumn, java.lang.String keyvalue, UserInfo userInfo) throws MXException, java.rmi.RemoteException
doclinkExists
in interface DoclinkServiceRemote
keytable
- doclinks.keytable (e.g. ITEM
)keycolumn
- doclinks.keycolumn (e.g. ITEMNUM
)keyvalue
- doclinks.keyvalue (e.g. 4-0030
). This must not
contain any locale-specific formatting. For example, if the datatype on the
owner table is Integer, this parameter must not contain a comma.userInfo
- The UserInfo making the request.MXException
java.rmi.RemoteException
doclinkExists(java.lang.String, java.lang.String, java.lang.String, psdi.security.UserInfo)
public java.util.TreeMap getAppDoctypeLinks(java.lang.String appName, java.lang.String keyTable, java.lang.String keyColumn, int keyValue, UserInfo userInfo) throws MXException, java.rmi.RemoteException
getAppDoctypeLinks
in interface DoclinkServiceRemote
appName
- The application name (appdoctype.app).keyTable
- The table name of doclinks keytable.keyColumn
- The column name of doclinks keycolumn.keyValue
- The value of the specified column on the specified table.
For example, to get doclinks for a specified workorder,
specify appName = WOTRACK
, keyTable = WORKORDER
,
keyColumn = WONUM
, and keyValue = the workorder number
(e.g. 1002
).
It is important to note that the value provided for keyValue
must not include locale-specific formatting.
See javadoc comments on Doclinks
for more information on this attribute.
userInfo
- The user making the request.If you iterate the map from the beginning, the MboSets will be in sequence by doctype. This can be done as in the following example:
- Iterator it = docMap.keySet().iterator();
- while (it.hasNext())
- {
- String doctype = (String) it.next();
- MboSetRemote doclinksSet = (MboSetRemote) docMap.get(doctype);
- if (!doclinksSet.isEmpty())
- {
- (etc.)
- }
- }
MXException
java.rmi.RemoteException
AppDoctype
,
Doclinks
public MboSetRemote addDocinfoAndLinks(java.lang.String urlname, java.lang.String description, java.lang.String[] urlparam, java.lang.String doctype, java.lang.String urltype, java.lang.String keytable, java.lang.String keycolumn, java.lang.String[] keyvalue, boolean forceAutokey, java.lang.String application, UserInfo userInfo) throws MXException, java.rmi.RemoteException
If the docinfo already exists, the links are added to the existing docinfo. However, if the docinfo already exists but has the wrong urltype or doctype, an error will be thrown.
If any of the requested links already exists, that link is bypassed without error.
If this method adds a docinfo and the docinfo is not autokeyed, and the "forceAutokey" parameter is true, this method will force autokeying to assign a value to the "document" attribute.
This method will throw any of the standard validation errors if any value to be set on Docinfo or Doclinks is not valid. (This includes the doclink error "invalidkeyvalue".) In addition, if the Docinfo already exists but has the wrong urltype or doctype, this method will throw "doctypeBadMatch" or "urltypeBadMatch".
addDocinfoAndLinks
in interface DoclinkServiceRemote
urlname
- Value for docinfo urlname. Required.description
- Value for docinfo description.urlparam
- Value for docinfo urlparam(1-5). Can be null.doctype
- Value for docinfo doctype. Required.urltype
- Value for docinfo urltype. Required.keytable
- Value for doclinks keytable. If null, then no links are added.keycolumn
- Value for doclinks keytable. If null, then no links are added.keyvalue
- Array of values for doclinks keyvalue.
If null, then no links are added.
It is important to note that the values stored in this array
must not include locale-specific formatting (i.e. if the keyvalue
is numeric then the value supplied must not contain commas).forceAutokey
- If the docinfo document is not automatically, and this parameter is
True, then this method will force autokeying for the "document"
attribute. Otherwise, autokeying depends on the framework, as usual.application
- Application attribute for the docinfo. Generally this should be null.userInfo
- The user making the request.MXException
java.rmi.RemoteException
DocinfoSet.findDocinfo(java.lang.String, java.lang.String[])
,
Docinfo.addDocinfoAndLinks(java.lang.String, java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String[], boolean, java.lang.String)
,
Docinfo.addDoclinks(java.lang.String, java.lang.String, java.lang.String, java.lang.String[])
public MboSetRemote addDocinfoAndLinks(java.lang.String urlname, java.lang.String description, java.lang.String assetType, java.lang.String[] keyvalue, UserInfo userInfo) throws MXException, java.rmi.RemoteException
addDocinfoAndLinks
assuming the following values, and forcing autokey.
Attribute Name | Attribute Value |
---|---|
Application | IPC |
DocType | Retrieved from Maxvars depending on value of keytable.
|
KeyTable | Equals value of assetType. |
KeyColumn | Depends on value of keytable.
|
UrlParam | null |
UrlType | WWW |
addDocinfoAndLinks
in interface DoclinkServiceRemote
urlname
- Value for docinfo urlname. Required.description
- Value for docinfo description.assetType
- Identifier of what kind of asset the document pertains to. Required.
Valid values are "ITEM", "ASSET", and "LOCATIONS".keyvalue
- Array of values for doclinks keyvalue.
If null, then no links are added.
It is important to note that the values stored in this array
must not include locale-specific formatting (i.e. if the keyvalue
is numeric then the value supplied must not contain commas).userInfo
- The user making the request.MXException
java.rmi.RemoteException
addDocinfoAndLinks(String, String, String[], String, String, String, String, String[], boolean, String, UserInfo)
public static java.lang.String getTenantFolderPathRootAsEntered(java.lang.String path)
path
- public java.lang.String getFullPathFromRelativePath(java.lang.String path, java.lang.String rootKey, UserInfo ui) throws java.rmi.RemoteException, MXException
getFullPathFromRelativePath
in interface DoclinkServiceRemote
path
- rootKey
- ui
- java.rmi.RemoteException
MXException
getFullPathFromRelativePath(java.lang.String, java.lang.String, psdi.security.UserInfo)
public java.lang.String getDefaultFilePath(java.lang.String doctype, UserInfo userInfo) throws MXException, java.rmi.RemoteException
getDefaultFilePath
in interface DoclinkServiceRemote
doctype
- The doctype to be retrieved.userInfo
- UserInfo making the request.MXException
java.rmi.RemoteException
getDefaultFilePath(java.lang.String, psdi.security.UserInfo)
public void copyAssocDoclinks(MboSetRemote sourcelinks, MboSetRemote targetLinks, long targetId, java.lang.String targetMboName) throws MXException, java.rmi.RemoteException
copyAssocDoclinks
in interface DoclinkServiceRemote
sourcelinks
- The set of source Doclinks, should be of type DoclinksSettargetlinks
- The destination Doclinks set, can be the same as sourcetargetId
- The uniqueid for the owner of the doclinkstargetMboName
- The name of the mbo that owns the DoclinksSetMXException
java.rmi.RemoteException
copyAssocDoclinks(psdi.mbo.MboSetRemote, psdi.mbo.MboSetRemote, long, java.lang.String)