gran.app.adapter.kernel.category
Class BaseCategoryAdapter

java.lang.Object
  extended bygran.app.adapter.kernel.category.BaseCategoryAdapter
All Implemented Interfaces:
Adapter, CategoryAdapter, KernelAdapter

public class BaseCategoryAdapter
extends java.lang.Object
implements CategoryAdapter


Constructor Summary
BaseCategoryAdapter()
           
 
Method Summary
 java.lang.String addCategoryImpl(java.lang.String taskid, java.lang.String name, java.lang.String workflowid, java.lang.String isproject, java.lang.String result)
          Add new category
 java.lang.String addCategoryRuleImpl(java.lang.String category, java.lang.String prstatus, java.lang.String type, java.lang.String result)
           
 java.lang.String addChildCategoryImpl(java.lang.String catid, java.lang.String child, java.lang.String result)
          Add category to the list of allowed subctegories
 java.util.Collection availableCategoryListImpl(java.lang.String taskid, java.lang.String workflowid, java.util.Collection result)
          get available category list each task has own list of available category
 java.util.HashMap availableCategoryMapImpl(java.lang.String taskid, java.util.HashMap result)
           
 boolean canChangeWorkflowImpl(java.lang.String categoryid, boolean result)
           
 void deleteCategoriesImpl(java.lang.String[] ids)
          Delete one or several categories
 void deleteChildCategoryImpl(java.lang.String catid, java.lang.String child)
          Delete category from the list of allowed categories
 void deleteCreatableCategoryImpl(java.lang.String category, java.lang.String prstatus)
          Set, that users with some prstatus (group) can't create tasks of some category
 void deleteDeletableCategoryImpl(java.lang.String category, java.lang.String prstatus)
          Set, that users with some prstatus (group) can't delete tasks of some category
 void deleteEditableCategoryImpl(java.lang.String category, java.lang.String prstatus)
          Set, that users with some prstatus (group) can't edit tasks of some category
 java.util.Collection getCategoryRuleImpl(java.lang.String prstatus, java.lang.String categoryid, java.util.Collection result)
           
 java.util.Collection getChildCategoriesImpl(java.lang.String catid, java.util.Collection result)
          Get list of available subcategories of category
 java.lang.String getDescription()
          Get description of adapter as plain text
 boolean init()
          Initialize adapter.
 java.util.Collection listCreatableCategoriesImpl(java.lang.String userid, java.lang.String taskid, java.util.Collection result)
          Get list of categories, that some user can create
 java.util.Collection listDeletableCategoriesImpl(java.lang.String userid, java.lang.String taskid, java.util.Collection result)
          Get list of categories, that some user can delete
 java.util.Collection listEditableCategoriesImpl(java.lang.String userid, java.lang.String taskid, java.util.Collection result)
          Get list of categories, that some user can edit
 void updateCategoryImpl(java.lang.String catid, java.lang.String name, java.lang.String workflowid, java.lang.String isproject)
          Update general category description
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseCategoryAdapter

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

deleteCategoriesImpl

public void deleteCategoriesImpl(java.lang.String[] ids)
                          throws gran.exception.GranException
Description copied from interface: CategoryAdapter
Delete one or several categories

Specified by:
deleteCategoriesImpl in interface CategoryAdapter
Throws:
gran.exception.GranException

updateCategoryImpl

public void updateCategoryImpl(java.lang.String catid,
                               java.lang.String name,
                               java.lang.String workflowid,
                               java.lang.String isproject)
                        throws gran.exception.GranException
Description copied from interface: CategoryAdapter
Update general category description

Specified by:
updateCategoryImpl in interface CategoryAdapter
Parameters:
catid - - category identifier
name - - catefory name
workflowid - - identifier of workflow for this category
isproject - - this is project category or task category ?
Throws:
gran.exception.GranException

availableCategoryListImpl

public java.util.Collection availableCategoryListImpl(java.lang.String taskid,
                                                      java.lang.String workflowid,
                                                      java.util.Collection result)
                                               throws gran.exception.GranException
Description copied from interface: CategoryAdapter
get available category list each task has own list of available category

Specified by:
availableCategoryListImpl in interface CategoryAdapter
Parameters:
workflowid - if specified - gets list for this workflow, else for all available
Throws:
gran.exception.GranException

availableCategoryMapImpl

public java.util.HashMap availableCategoryMapImpl(java.lang.String taskid,
                                                  java.util.HashMap result)
                                           throws gran.exception.GranException
Specified by:
availableCategoryMapImpl in interface CategoryAdapter
Throws:
gran.exception.GranException

addCategoryImpl

public java.lang.String addCategoryImpl(java.lang.String taskid,
                                        java.lang.String name,
                                        java.lang.String workflowid,
                                        java.lang.String isproject,
                                        java.lang.String result)
                                 throws gran.exception.GranException
Description copied from interface: CategoryAdapter
Add new category

Specified by:
addCategoryImpl in interface CategoryAdapter
Throws:
gran.exception.GranException

getChildCategoriesImpl

public java.util.Collection getChildCategoriesImpl(java.lang.String catid,
                                                   java.util.Collection result)
                                            throws gran.exception.GranException
Description copied from interface: CategoryAdapter
Get list of available subcategories of category

Specified by:
getChildCategoriesImpl in interface CategoryAdapter
Throws:
gran.exception.GranException

getCategoryRuleImpl

public java.util.Collection getCategoryRuleImpl(java.lang.String prstatus,
                                                java.lang.String categoryid,
                                                java.util.Collection result)
                                         throws gran.exception.GranException
Specified by:
getCategoryRuleImpl in interface CategoryAdapter
Throws:
gran.exception.GranException

canChangeWorkflowImpl

public boolean canChangeWorkflowImpl(java.lang.String categoryid,
                                     boolean result)
                              throws gran.exception.GranException
Specified by:
canChangeWorkflowImpl in interface CategoryAdapter
Throws:
gran.exception.GranException

addCategoryRuleImpl

public java.lang.String addCategoryRuleImpl(java.lang.String category,
                                            java.lang.String prstatus,
                                            java.lang.String type,
                                            java.lang.String result)
                                     throws gran.exception.GranException
Specified by:
addCategoryRuleImpl in interface CategoryAdapter
Throws:
gran.exception.GranException

deleteEditableCategoryImpl

public void deleteEditableCategoryImpl(java.lang.String category,
                                       java.lang.String prstatus)
                                throws gran.exception.GranException
Description copied from interface: CategoryAdapter
Set, that users with some prstatus (group) can't edit tasks of some category

Specified by:
deleteEditableCategoryImpl in interface CategoryAdapter
Throws:
gran.exception.GranException

deleteCreatableCategoryImpl

public void deleteCreatableCategoryImpl(java.lang.String category,
                                        java.lang.String prstatus)
                                 throws gran.exception.GranException
Description copied from interface: CategoryAdapter
Set, that users with some prstatus (group) can't create tasks of some category

Specified by:
deleteCreatableCategoryImpl in interface CategoryAdapter
Throws:
gran.exception.GranException

deleteDeletableCategoryImpl

public void deleteDeletableCategoryImpl(java.lang.String category,
                                        java.lang.String prstatus)
                                 throws gran.exception.GranException
Description copied from interface: CategoryAdapter
Set, that users with some prstatus (group) can't delete tasks of some category

Specified by:
deleteDeletableCategoryImpl in interface CategoryAdapter
Throws:
gran.exception.GranException

addChildCategoryImpl

public java.lang.String addChildCategoryImpl(java.lang.String catid,
                                             java.lang.String child,
                                             java.lang.String result)
                                      throws gran.exception.GranException
Description copied from interface: CategoryAdapter
Add category to the list of allowed subctegories

Specified by:
addChildCategoryImpl in interface CategoryAdapter
Throws:
gran.exception.GranException

deleteChildCategoryImpl

public void deleteChildCategoryImpl(java.lang.String catid,
                                    java.lang.String child)
                             throws gran.exception.GranException
Description copied from interface: CategoryAdapter
Delete category from the list of allowed categories

Specified by:
deleteChildCategoryImpl in interface CategoryAdapter
Throws:
gran.exception.GranException

listCreatableCategoriesImpl

public java.util.Collection listCreatableCategoriesImpl(java.lang.String userid,
                                                        java.lang.String taskid,
                                                        java.util.Collection result)
                                                 throws gran.exception.GranException
Description copied from interface: CategoryAdapter
Get list of categories, that some user can create

Specified by:
listCreatableCategoriesImpl in interface CategoryAdapter
Throws:
gran.exception.GranException

listEditableCategoriesImpl

public java.util.Collection listEditableCategoriesImpl(java.lang.String userid,
                                                       java.lang.String taskid,
                                                       java.util.Collection result)
                                                throws gran.exception.GranException
Description copied from interface: CategoryAdapter
Get list of categories, that some user can edit

Specified by:
listEditableCategoriesImpl in interface CategoryAdapter
Throws:
gran.exception.GranException

listDeletableCategoriesImpl

public java.util.Collection listDeletableCategoriesImpl(java.lang.String userid,
                                                        java.lang.String taskid,
                                                        java.util.Collection result)
                                                 throws gran.exception.GranException
Description copied from interface: CategoryAdapter
Get list of categories, that some user can delete

Specified by:
listDeletableCategoriesImpl in interface CategoryAdapter
Throws:
gran.exception.GranException


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