gran.app.adapter.kernel.filter
Class BaseFilterAdapter

java.lang.Object
  extended bygran.app.adapter.kernel.filter.BaseFilterAdapter
All Implemented Interfaces:
Adapter, FilterAdapter, KernelAdapter

public class BaseFilterAdapter
extends java.lang.Object
implements FilterAdapter


Constructor Summary
BaseFilterAdapter()
           
 
Method Summary
 void addNotificationImpl(java.lang.String filter, java.lang.String userid, java.lang.String taskid)
           
 java.lang.String copyFilterImpl(java.lang.String id, java.lang.String currentTaskId, gran.model.User loggedUser)
           
 java.lang.String createFilterImpl(java.lang.String name, java.lang.String description, java.lang.Integer active, java.lang.Integer priv, java.lang.String task, java.lang.String owner, java.lang.String result)
          Create new filter
 gran.model.Subscriber createSubscriberImpl(java.lang.String id, java.lang.String user, java.lang.String filter, java.lang.String task, java.sql.Timestamp startDate, java.sql.Timestamp stopDate, java.sql.Timestamp nextRun, java.lang.Integer interval, gran.model.Subscriber result)
          Set subscriber information.
 void deleteFiltersImpl(java.lang.String[] ids)
          Delete filter
 void deleteNotificationImpl(java.lang.String filter, java.lang.String userid, java.lang.String taskid)
           
 java.util.LinkedList findNotificationImpl(java.lang.String taskid, java.lang.String userid, java.util.LinkedList result)
          Returns ArrayList of Notifications
 java.lang.String getDescription()
          Get description of adapter as plain text
 java.lang.String getFilterImpl(java.lang.String taskid, java.lang.String userid, java.lang.String result)
          Get current filter for specified task and user
 gran.app.filter.FValue getFValueImpl(java.lang.String filter, gran.app.filter.FValue result)
          Get filter properties
 java.lang.String getNotificationImpl(java.lang.String filter, java.lang.String userid, java.lang.String taskid, java.lang.String result)
           
 gran.model.Subscriber getSubscribeImpl(java.lang.String filter, java.lang.String userid, java.lang.String taskid, gran.model.Subscriber result)
          Get filter subscription information
 boolean hasParentNotificationImpl(java.lang.String filter, java.lang.String userid, java.lang.String taskid, boolean result)
           
 boolean init()
          Initialize adapter.
 java.util.Collection listFiltersImpl(java.lang.String taskid, java.lang.String userid, java.util.Collection result)
          Get list of available filter.
 java.util.Collection listNotificationsImpl(java.lang.String taskid, java.util.Collection result)
           
 java.lang.String setFilterImpl(java.lang.String taskid, java.lang.String userid, java.lang.String filterid, java.lang.String result)
          Set current filter for specified task and user
 void setFValueImpl(java.lang.String filter, gran.app.filter.FValue map)
          Set filter properties
 void subscribeImpl(java.lang.String filter, gran.model.Subscriber sli)
          Subscribe on the filter
 void unSubscribeImpl(java.lang.String filter, java.lang.String userid, java.lang.String taskid)
          Unsubscribe
 void updateFilterImpl(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.Integer privateflag)
          updates existing filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseFilterAdapter

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

deleteFiltersImpl

public void deleteFiltersImpl(java.lang.String[] ids)
                       throws gran.exception.GranException
Description copied from interface: FilterAdapter
Delete filter

Specified by:
deleteFiltersImpl in interface FilterAdapter
Parameters:
ids - - array of ID
Throws:
gran.exception.GranException

createFilterImpl

public java.lang.String createFilterImpl(java.lang.String name,
                                         java.lang.String description,
                                         java.lang.Integer active,
                                         java.lang.Integer priv,
                                         java.lang.String task,
                                         java.lang.String owner,
                                         java.lang.String result)
                                  throws gran.exception.GranException
Description copied from interface: FilterAdapter
Create new filter

Specified by:
createFilterImpl in interface FilterAdapter
Parameters:
name - - filter name
description - - filter description
active - - is filter active or not
priv - - is filter private or not.
task - - parent task for filter
owner - - filter owner
Throws:
gran.exception.GranException

copyFilterImpl

public java.lang.String copyFilterImpl(java.lang.String id,
                                       java.lang.String currentTaskId,
                                       gran.model.User loggedUser)
                                throws gran.exception.GranException
Specified by:
copyFilterImpl in interface FilterAdapter
Throws:
gran.exception.GranException

updateFilterImpl

public void updateFilterImpl(java.lang.String id,
                             java.lang.String name,
                             java.lang.String description,
                             java.lang.Integer privateflag)
                      throws gran.exception.GranException
Description copied from interface: FilterAdapter
updates existing filter. Can change name and description

Specified by:
updateFilterImpl in interface FilterAdapter
Throws:
gran.exception.GranException

listFiltersImpl

public java.util.Collection listFiltersImpl(java.lang.String taskid,
                                            java.lang.String userid,
                                            java.util.Collection result)
                                     throws gran.exception.GranException
Description copied from interface: FilterAdapter
Get list of available filter. This list includes inherited and private-filters.

Specified by:
listFiltersImpl in interface FilterAdapter
Parameters:
taskid - - current task
userid - - current user
Throws:
gran.exception.GranException

getFValueImpl

public gran.app.filter.FValue getFValueImpl(java.lang.String filter,
                                            gran.app.filter.FValue result)
                                     throws gran.exception.GranException
Description copied from interface: FilterAdapter
Get filter properties

Specified by:
getFValueImpl in interface FilterAdapter
Throws:
gran.exception.GranException

setFValueImpl

public void setFValueImpl(java.lang.String filter,
                          gran.app.filter.FValue map)
                   throws gran.exception.GranException
Description copied from interface: FilterAdapter
Set filter properties

Specified by:
setFValueImpl in interface FilterAdapter
Throws:
gran.exception.GranException

getSubscribeImpl

public gran.model.Subscriber getSubscribeImpl(java.lang.String filter,
                                              java.lang.String userid,
                                              java.lang.String taskid,
                                              gran.model.Subscriber result)
                                       throws gran.exception.GranException
Description copied from interface: FilterAdapter
Get filter subscription information

Specified by:
getSubscribeImpl in interface FilterAdapter
Parameters:
userid - - current user
taskid - - current task
Throws:
gran.exception.GranException

subscribeImpl

public void subscribeImpl(java.lang.String filter,
                          gran.model.Subscriber sli)
                   throws gran.exception.GranException
Description copied from interface: FilterAdapter
Subscribe on the filter

Specified by:
subscribeImpl in interface FilterAdapter
Throws:
gran.exception.GranException

unSubscribeImpl

public void unSubscribeImpl(java.lang.String filter,
                            java.lang.String userid,
                            java.lang.String taskid)
                     throws gran.exception.GranException
Description copied from interface: FilterAdapter
Unsubscribe

Specified by:
unSubscribeImpl in interface FilterAdapter
Throws:
gran.exception.GranException

createSubscriberImpl

public gran.model.Subscriber createSubscriberImpl(java.lang.String id,
                                                  java.lang.String user,
                                                  java.lang.String filter,
                                                  java.lang.String task,
                                                  java.sql.Timestamp startDate,
                                                  java.sql.Timestamp stopDate,
                                                  java.sql.Timestamp nextRun,
                                                  java.lang.Integer interval,
                                                  gran.model.Subscriber result)
                                           throws gran.exception.GranException
Description copied from interface: FilterAdapter
Set subscriber information. Can be used as alternative for subscribeImpl

Specified by:
createSubscriberImpl in interface FilterAdapter
Throws:
gran.exception.GranException

getFilterImpl

public java.lang.String getFilterImpl(java.lang.String taskid,
                                      java.lang.String userid,
                                      java.lang.String result)
                               throws gran.exception.GranException
Description copied from interface: FilterAdapter
Get current filter for specified task and user

Specified by:
getFilterImpl in interface FilterAdapter
Throws:
gran.exception.GranException

setFilterImpl

public java.lang.String setFilterImpl(java.lang.String taskid,
                                      java.lang.String userid,
                                      java.lang.String filterid,
                                      java.lang.String result)
                               throws gran.exception.GranException
Description copied from interface: FilterAdapter
Set current filter for specified task and user

Specified by:
setFilterImpl in interface FilterAdapter
Throws:
gran.exception.GranException

getNotificationImpl

public java.lang.String getNotificationImpl(java.lang.String filter,
                                            java.lang.String userid,
                                            java.lang.String taskid,
                                            java.lang.String result)
                                     throws gran.exception.GranException
Specified by:
getNotificationImpl in interface FilterAdapter
Throws:
gran.exception.GranException

hasParentNotificationImpl

public boolean hasParentNotificationImpl(java.lang.String filter,
                                         java.lang.String userid,
                                         java.lang.String taskid,
                                         boolean result)
                                  throws gran.exception.GranException
Specified by:
hasParentNotificationImpl in interface FilterAdapter
Throws:
gran.exception.GranException

addNotificationImpl

public void addNotificationImpl(java.lang.String filter,
                                java.lang.String userid,
                                java.lang.String taskid)
                         throws gran.exception.GranException
Specified by:
addNotificationImpl in interface FilterAdapter
Throws:
gran.exception.GranException

deleteNotificationImpl

public void deleteNotificationImpl(java.lang.String filter,
                                   java.lang.String userid,
                                   java.lang.String taskid)
                            throws gran.exception.GranException
Specified by:
deleteNotificationImpl in interface FilterAdapter
Throws:
gran.exception.GranException

listNotificationsImpl

public java.util.Collection listNotificationsImpl(java.lang.String taskid,
                                                  java.util.Collection result)
                                           throws gran.exception.GranException
Specified by:
listNotificationsImpl in interface FilterAdapter
Throws:
gran.exception.GranException

findNotificationImpl

public java.util.LinkedList findNotificationImpl(java.lang.String taskid,
                                                 java.lang.String userid,
                                                 java.util.LinkedList result)
                                          throws gran.exception.GranException
Returns ArrayList of Notifications

Specified by:
findNotificationImpl in interface FilterAdapter
Parameters:
taskid -
userid -
result -
Returns:
Throws:
gran.exception.GranException


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