gran.app.adapter.kernel.task
Class BaseTaskAdapter

java.lang.Object
  extended bygran.app.adapter.kernel.task.BaseTaskAdapter
All Implemented Interfaces:
Adapter, KernelAdapter, TaskAdapter

public class BaseTaskAdapter
extends java.lang.Object
implements TaskAdapter


Constructor Summary
BaseTaskAdapter()
           
 
Method Summary
 java.util.HashSet allowedChildsImpl(java.lang.String taskid, java.lang.String userid, java.util.HashSet result)
          Get collection of of allowed childs
 java.util.HashSet allowedChildsWithSubtasksImpl(java.lang.String taskid, java.lang.String userid, java.util.HashSet result)
          Get collection of of allowed childs
 int containSubtaskImpl(java.lang.String taskid, int result)
          Get amount of subtasks for current task
 void deleteTasksImpl(java.lang.String[] ids)
          delete selected task
 java.lang.String findByNameImpl(java.lang.String userid, java.lang.String name, java.lang.String result)
           
 java.lang.String findByNumberImpl(java.lang.String name, java.lang.String result)
           
 java.lang.String findByShortNameImpl(java.lang.String name, java.lang.String result)
          Find task by short name
 java.lang.String findTaskImpl(java.lang.String quick_go, gran.model.User u, java.lang.String result)
           
 java.util.Collection getChildrenIdCollectionImpl(java.lang.String taskId, java.util.Collection result)
           
 java.util.Collection getChildsHashImpl(java.lang.String id, java.util.Collection result)
           
 java.lang.String getDescription()
          Get description of adapter as plain text
 int getMessageCountImpl(java.lang.String id, int result)
          Get amount of messages for current task
 java.util.Collection getPossibleParentListImpl(java.lang.String taskid, java.util.Collection tasksWithShortNames, java.util.Collection result)
          Get list of possible task parents.
 java.util.Collection getProjectListImpl(java.lang.String userid, java.util.Collection result)
          Get list of available projects for current user
 java.lang.String getProjectNameImpl(java.lang.String id, java.lang.String result)
           
 java.util.ArrayList getTaskChainImpl(java.lang.String startid, java.lang.String stopid, java.util.ArrayList result)
          Get list of task from startid to stopid.
 java.util.ArrayList getTaskIdChainImpl(java.lang.String startid, java.lang.String stopid, java.util.ArrayList result)
          Get list of task from startid to stopid.
 gran.app.slider.Slider getTaskListImpl(java.lang.String taskid, java.lang.String userid, gran.app.filter.FValue flthm, boolean vABACL, boolean withUDF, int pagen, java.lang.String keyword, gran.app.slider.Slider result)
          Get list of subtasks
 java.util.Collection getUsersImpl(java.lang.String id, java.util.Collection result)
          Get has of allowed users
 boolean init()
          Initialize adapter.
 gran.model.Task newTaskImpl(java.lang.String taskid, java.lang.String userid, java.lang.String categoryid, java.lang.String name, gran.model.Task result)
          create new child task
 void saveTaskImpl(java.lang.String id, java.lang.String shortname, java.lang.String name, java.lang.String description, java.lang.String hrs, java.lang.String mns, java.lang.String deadline, java.lang.String category, java.lang.String priority, java.lang.String parent, java.lang.String userid, java.lang.String handlerId, boolean sendMail)
          Save task
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseTaskAdapter

public BaseTaskAdapter()
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

saveTaskImpl

public void saveTaskImpl(java.lang.String id,
                         java.lang.String shortname,
                         java.lang.String name,
                         java.lang.String description,
                         java.lang.String hrs,
                         java.lang.String mns,
                         java.lang.String deadline,
                         java.lang.String category,
                         java.lang.String priority,
                         java.lang.String parent,
                         java.lang.String userid,
                         java.lang.String handlerId,
                         boolean sendMail)
                  throws gran.exception.CantCreateTaskException,
                         gran.exception.GranException
Description copied from interface: TaskAdapter
Save task

Specified by:
saveTaskImpl in interface TaskAdapter
Parameters:
id - - task id
shortname - - task alias
name - - название задачи
description - - task description
hrs - - budget (hh)
mns - - budget (mm)
deadline - - task deadline
category - - task category
priority - - task priority
parent - - task parent
userid - - submitter identifier
sendMail - - send mail when create this message
Throws:
gran.exception.CantCreateTaskException
gran.exception.GranException

newTaskImpl

public gran.model.Task newTaskImpl(java.lang.String taskid,
                                   java.lang.String userid,
                                   java.lang.String categoryid,
                                   java.lang.String name,
                                   gran.model.Task result)
                            throws gran.exception.GranException
Description copied from interface: TaskAdapter
create new child task

Specified by:
newTaskImpl in interface TaskAdapter
Parameters:
taskid - - parent task identifier
userid - - submitter identifier
categoryid - - category of new task identifier
name - - name of new task
Throws:
gran.exception.GranException

deleteTasksImpl

public void deleteTasksImpl(java.lang.String[] ids)
                     throws gran.exception.GranException
Description copied from interface: TaskAdapter
delete selected task

Specified by:
deleteTasksImpl in interface TaskAdapter
Parameters:
ids - array of task identifiers
Throws:
gran.exception.GranException

getTaskListImpl

public gran.app.slider.Slider getTaskListImpl(java.lang.String taskid,
                                              java.lang.String userid,
                                              gran.app.filter.FValue flthm,
                                              boolean vABACL,
                                              boolean withUDF,
                                              int pagen,
                                              java.lang.String keyword,
                                              gran.app.slider.Slider result)
                                       throws java.lang.Exception
Description copied from interface: TaskAdapter
Get list of subtasks

Specified by:
getTaskListImpl in interface TaskAdapter
Parameters:
taskid - - task identifier
userid - - logged user identifier
flthm - - filter
vABACL - - is access to taskid allowed by ACL ?
withUDF - - any UDFs for taskid
pagen - - page number
Throws:
java.lang.Exception

findByShortNameImpl

public java.lang.String findByShortNameImpl(java.lang.String name,
                                            java.lang.String result)
                                     throws gran.exception.GranException
Description copied from interface: TaskAdapter
Find task by short name

Specified by:
findByShortNameImpl in interface TaskAdapter
Throws:
gran.exception.GranException

findByNameImpl

public java.lang.String findByNameImpl(java.lang.String userid,
                                       java.lang.String name,
                                       java.lang.String result)
                                throws gran.exception.GranException
Specified by:
findByNameImpl in interface TaskAdapter
Throws:
gran.exception.GranException

findByNumberImpl

public java.lang.String findByNumberImpl(java.lang.String name,
                                         java.lang.String result)
                                  throws gran.exception.GranException
Specified by:
findByNumberImpl in interface TaskAdapter
Throws:
gran.exception.GranException

getPossibleParentListImpl

public java.util.Collection getPossibleParentListImpl(java.lang.String taskid,
                                                      java.util.Collection tasksWithShortNames,
                                                      java.util.Collection result)
                                               throws gran.exception.GranException
Description copied from interface: TaskAdapter
Get list of possible task parents.

Specified by:
getPossibleParentListImpl in interface TaskAdapter
Throws:
gran.exception.GranException

containSubtaskImpl

public int containSubtaskImpl(java.lang.String taskid,
                              int result)
                       throws gran.exception.GranException
Description copied from interface: TaskAdapter
Get amount of subtasks for current task

Specified by:
containSubtaskImpl in interface TaskAdapter
Throws:
gran.exception.GranException

getTaskChainImpl

public java.util.ArrayList getTaskChainImpl(java.lang.String startid,
                                            java.lang.String stopid,
                                            java.util.ArrayList result)
                                     throws gran.exception.GranException
Description copied from interface: TaskAdapter
Get list of task from startid to stopid. Set startid = null for list from root task

Specified by:
getTaskChainImpl in interface TaskAdapter
Throws:
gran.exception.GranException

getTaskIdChainImpl

public java.util.ArrayList getTaskIdChainImpl(java.lang.String startid,
                                              java.lang.String stopid,
                                              java.util.ArrayList result)
                                       throws gran.exception.GranException
Description copied from interface: TaskAdapter
Get list of task from startid to stopid. Set startid = null for list from root task

Specified by:
getTaskIdChainImpl in interface TaskAdapter
Throws:
gran.exception.GranException

getProjectListImpl

public java.util.Collection getProjectListImpl(java.lang.String userid,
                                               java.util.Collection result)
                                        throws gran.exception.GranException
Description copied from interface: TaskAdapter
Get list of available projects for current user

Specified by:
getProjectListImpl in interface TaskAdapter
Throws:
gran.exception.GranException

allowedChildsImpl

public java.util.HashSet allowedChildsImpl(java.lang.String taskid,
                                           java.lang.String userid,
                                           java.util.HashSet result)
                                    throws gran.exception.GranException
Description copied from interface: TaskAdapter
Get collection of of allowed childs

Specified by:
allowedChildsImpl in interface TaskAdapter
Throws:
gran.exception.GranException

allowedChildsWithSubtasksImpl

public java.util.HashSet allowedChildsWithSubtasksImpl(java.lang.String taskid,
                                                       java.lang.String userid,
                                                       java.util.HashSet result)
                                                throws gran.exception.GranException
Description copied from interface: TaskAdapter
Get collection of of allowed childs

Specified by:
allowedChildsWithSubtasksImpl in interface TaskAdapter
Throws:
gran.exception.GranException

getProjectNameImpl

public java.lang.String getProjectNameImpl(java.lang.String id,
                                           java.lang.String result)
                                    throws gran.exception.GranException
Specified by:
getProjectNameImpl in interface TaskAdapter
Throws:
gran.exception.GranException

getChildrenIdCollectionImpl

public java.util.Collection getChildrenIdCollectionImpl(java.lang.String taskId,
                                                        java.util.Collection result)
                                                 throws gran.exception.GranException
Specified by:
getChildrenIdCollectionImpl in interface TaskAdapter
Throws:
gran.exception.GranException

getChildsHashImpl

public java.util.Collection getChildsHashImpl(java.lang.String id,
                                              java.util.Collection result)
                                       throws gran.exception.GranException
Specified by:
getChildsHashImpl in interface TaskAdapter
Throws:
gran.exception.GranException

getUsersImpl

public java.util.Collection getUsersImpl(java.lang.String id,
                                         java.util.Collection result)
                                  throws gran.exception.GranException
Description copied from interface: TaskAdapter
Get has of allowed users

Specified by:
getUsersImpl in interface TaskAdapter
Throws:
gran.exception.GranException

getMessageCountImpl

public int getMessageCountImpl(java.lang.String id,
                               int result)
                        throws gran.exception.GranException
Description copied from interface: TaskAdapter
Get amount of messages for current task

Specified by:
getMessageCountImpl in interface TaskAdapter
Throws:
gran.exception.GranException

findTaskImpl

public java.lang.String findTaskImpl(java.lang.String quick_go,
                                     gran.model.User u,
                                     java.lang.String result)
                              throws gran.exception.GranException
Specified by:
findTaskImpl in interface TaskAdapter
Throws:
gran.exception.GranException


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