com.groiss.cal
Class CalInfoAdapter

java.lang.Object
  extended by com.groiss.cal.CalInfoAdapter
All Implemented Interfaces:
CalInfo

public abstract class CalInfoAdapter
extends java.lang.Object
implements CalInfo

default CalInfo implementation


Constructor Summary
CalInfoAdapter()
           
 
Method Summary
 java.util.List<Pair<java.lang.String,java.lang.String>> getCaptions()
          return all possible captions for this CalInfo
 java.util.List<Pair<java.lang.String,java.lang.String>> getPossibleViews(User u)
          get all possible views for this users
 CalView getView(java.lang.String id, User u)
          returns the view with the given id for the user
 MultiMap<Persistent,CalEvent> listEvents(java.util.List<Persistent> objects, java.util.Date startDate, java.util.Date endDate)
          this function returns a bunch of dates for each passed object
 java.util.List<CalEvent> listEvents(Persistent object, java.util.Date startDate, java.util.Date endDate)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.groiss.cal.CalInfo
getName
 

Constructor Detail

CalInfoAdapter

public CalInfoAdapter()
Method Detail

getCaptions

public java.util.List<Pair<java.lang.String,java.lang.String>> getCaptions()
return all possible captions for this CalInfo

Specified by:
getCaptions in interface CalInfo
Returns:
the captions

getPossibleViews

public java.util.List<Pair<java.lang.String,java.lang.String>> getPossibleViews(User u)
get all possible views for this users

Specified by:
getPossibleViews in interface CalInfo
Parameters:
u - the current user
Returns:
a list with all possible views
Pair.first the view's id - CalInfo.getView(String, User) should be able to handle this id
Pair.second the view's name

getView

public CalView getView(java.lang.String id,
                       User u)
returns the view with the given id for the user

Specified by:
getView in interface CalInfo
Parameters:
id - the view's id
u - the current user
Returns:
the view

listEvents

@Deprecated
public java.util.List<CalEvent> listEvents(Persistent object,
                                                      java.util.Date startDate,
                                                      java.util.Date endDate)
Deprecated. 

compatibility method for the old API; new implementations should use listEvents(List, Date, Date) instead

Parameters:
object - the object, the dates should be fetched for
startDate - enddate
endDate - startdate
Returns:
list of events for this object

listEvents

public MultiMap<Persistent,CalEvent> listEvents(java.util.List<Persistent> objects,
                                                java.util.Date startDate,
                                                java.util.Date endDate)
this function returns a bunch of dates for each passed object

Specified by:
listEvents in interface CalInfo
Parameters:
objects - the objects the dates should be for
startDate - range startdate
endDate - range endtime
Returns:
MultiMap of dates occuring in the range of time


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.