gran.app.adapter.kernel.udf
Class BaseUDFAdapter

java.lang.Object
  extended bygran.app.adapter.kernel.udf.BaseUDFAdapter
All Implemented Interfaces:
Adapter, KernelAdapter, UDFAdapter

public class BaseUDFAdapter
extends java.lang.Object
implements UDFAdapter

User Defined Field (UDF) bean implementation

Version:
$Revision: 1.1.2.67 $
Author:
$Author: maximkr $

Constructor Summary
BaseUDFAdapter()
           
 
Method Summary
 java.lang.String getDescription()
          Get description of adapter as plain text
 java.util.HashMap getUdflistImpl(java.lang.String udfId, java.util.HashMap result)
           
 java.lang.String getUDFSourceImpl(java.lang.String id, int mode, java.lang.String result)
          select udfsource_id for task, workflow or user.
 java.util.HashMap getUDFValuesImpl(java.lang.String idVal, int modeVal, java.util.ArrayList udfList, java.util.HashMap result)
          Return HashMap of UDF values (key - UDF id)
 boolean init()
          Initialize adapter.
 java.util.ArrayList listTaskUDFImpl(java.lang.String taskid, java.util.ArrayList result)
           
 java.util.ArrayList listUDFImpl(java.lang.String udfsourceid, java.util.ArrayList result)
           
 java.util.ArrayList listUserUDFImpl(java.lang.String userid, java.util.ArrayList result)
           
 java.util.ArrayList listWorkflowUDFImpl(java.lang.String workflowid, java.util.ArrayList result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseUDFAdapter

public BaseUDFAdapter()
Method Detail

init

public boolean init()
Description copied from interface: Adapter
Initialize adapter. TrackStudio calls this method during startup.

Specified by:
init in interface Adapter
Returns:
true when adapter initialized, false otherwise.

getDescription

public java.lang.String getDescription()
Description copied from interface: Adapter
Get description of adapter as plain text

Specified by:
getDescription in interface Adapter

getUDFSourceImpl

public java.lang.String getUDFSourceImpl(java.lang.String id,
                                         int mode,
                                         java.lang.String result)
                                  throws GranException
Description copied from interface: UDFAdapter
select udfsource_id for task, workflow or user. If udfsource not exists - create it.

Specified by:
getUDFSourceImpl in interface UDFAdapter
Parameters:
id - id of task or user
mode -
  • UdfConstants.TASK_ALL - get udfsource for task
  • UdfConstants.USER_ALL - get udfsource for user
  • UdfConstants.WORKFLOW_ALL - get udfsource for workflow
Throws:
GranException

getUdflistImpl

public java.util.HashMap getUdflistImpl(java.lang.String udfId,
                                        java.util.HashMap result)
                                 throws GranException
Specified by:
getUdflistImpl in interface UDFAdapter
Throws:
GranException

listUDFImpl

public java.util.ArrayList listUDFImpl(java.lang.String udfsourceid,
                                       java.util.ArrayList result)
                                throws GranException
Specified by:
listUDFImpl in interface UDFAdapter
Throws:
GranException

listWorkflowUDFImpl

public java.util.ArrayList listWorkflowUDFImpl(java.lang.String workflowid,
                                               java.util.ArrayList result)
                                        throws GranException
Specified by:
listWorkflowUDFImpl in interface UDFAdapter
Throws:
GranException

listUserUDFImpl

public java.util.ArrayList listUserUDFImpl(java.lang.String userid,
                                           java.util.ArrayList result)
                                    throws GranException
Specified by:
listUserUDFImpl in interface UDFAdapter
Throws:
GranException

listTaskUDFImpl

public java.util.ArrayList listTaskUDFImpl(java.lang.String taskid,
                                           java.util.ArrayList result)
                                    throws GranException
Specified by:
listTaskUDFImpl in interface UDFAdapter
Throws:
GranException

getUDFValuesImpl

public java.util.HashMap getUDFValuesImpl(java.lang.String idVal,
                                          int modeVal,
                                          java.util.ArrayList udfList,
                                          java.util.HashMap result)
                                   throws GranException
Description copied from interface: UDFAdapter
Return HashMap of UDF values (key - UDF id)

Specified by:
getUDFValuesImpl in interface UDFAdapter
Parameters:
idVal - Идентификатор источника. Источником может быть Task, User. Workflow в этом случае быть не может, т.к. для Workflow создаются только поля, а не значения
modeVal - Переключатель источника. Указывает на то, какую природу имеет ID
udfList - Список UDF, для которых выбираются значения
result -
Returns:
a ArrayList of UDFValue
Throws:
GranException


Copyright © 2002-2004 TrackStudio, Ltd. All Rights Reserved.