Java Doc for BaseCalendarService.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » calendar » impl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » sakai » org.sakaiproject.calendar.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.sakaiproject.calendar.impl.BaseCalendarService

All known Subclasses:   org.sakaiproject.calendar.impl.DbCalendarService,
BaseCalendarService
abstract public class BaseCalendarService implements CalendarService,StorageUser,CacheRefresher,ContextObserver,EntityTransferrer(Code)

BaseCalendarService is an base implementation of the CalendarService. Extension classes implement object creation, access and storage.


Inner Class :public class BaseCalendarEdit extends Observable implements CalendarEdit,SessionBindingListener
Inner Class :public class BaseCalendarEventEdit implements CalendarEventEdit,SessionBindingListener
Inner Class :protected interface Storage
Inner Class :protected class LayoutRow extends ArrayList
Inner Class :protected class SingleDayLayoutTable
Inner Class :protected class LayoutTableCell
Inner Class :protected class MyURIResolver implements URIResolver

Field Summary
final protected static  StringCALENDAR_PARAMETER_BASE_NAME
    
final protected static  StringCOLUMN_NODE_NAME
    
final protected static  StringDAILY_START_TIME_PARAMETER_NAME
    
final protected static  StringDAY_VIEW_XSLT_FILENAME
    
final protected static  StringDESCRIPTION_NODE
    
final protected static  StringEVENT_NODE_NAME
    
final protected static  StringFACULTY_EVENT_ATTRIBUTE_NAME
    
final protected static  StringFACULTY_NODE
    
final protected static  StringFROM_ATTRIBUTE_STRING
    
final protected static  StringGROUP_NODE
    
final protected static  StringHOUR_MINUTE_SEPARATOR
    
final protected static  StringLIST_DATE_ATTRIBUTE_NAME
    
final protected static  StringLIST_DAY_OF_WEEK_ATTRIBUTE_NAME
    
final protected static  StringLIST_NODE_NAME
    
final protected static  StringLIST_VIEW_XSLT_FILENAME
    
final protected static  StringMAX_CONCURRENT_EVENTS_NAME
    
final protected static  intMAX_OVERLAPPING_COLUMNS
    
protected static  longMILLISECONDS_IN_DAY
    
final protected static  longMILLISECONDS_IN_HOUR
    
final protected static  longMILLISECONDS_IN_MINUTE
    
final protected static  longMINIMUM_EVENT_LENGTH_IN_MSECONDS
    
final protected static  StringMONTH_NODE_NAME
    
final protected static  StringMONTH_VIEW_XSLT_FILENAME
    
final protected static  StringPDF_MIME_TYPE
    
final protected static  StringPLACE_NODE
    
final protected static  StringROW_NODE_NAME
    
final protected static  intSCHEDULE_INTERVAL_IN_MINUTES
    
final protected static  StringSCHEDULE_NODE
    
final protected static  StringSCHEDULE_TYPE_PARAMETER_NAME
    
final public static  StringSECURE_SCHEDULE_ROOT
     Security lock / event root for generic message events to make it a mail event.
final protected static  StringSTART_DAY_WEEK_ATTRIBUTE_NAME
    
final protected static  StringSTART_TIME_ATTRIBUTE_NAME
    
final protected static  StringSUB_EVENT_NODE_NAME
    
final protected static  intTIMESLOT_FOR_OVERLAP_DETECTION_IN_MINUTES
    
final protected static  StringTIME_RANGE_PARAMETER_NAME
    
final protected static  StringTITLE_NODE
    
final protected static  StringTO_ATTRIBUTE_STRING
    
final protected static  StringTYPE_NODE
    
final protected static  StringUID_NODE
    
final protected static  StringUSER_NAME_PARAMETER_NAME
    
final protected static  StringWEEK_VIEW_XSLT_FILENAME
    
protected  booleanm_caching
     Configuration: cache, or not.
protected  Cachem_calendarCache
     A Cache object for caching: calendars keyed by reference.
protected  EntityManagerm_entityManager
     Dependency: EntityManager.
protected  Hashtablem_eventCaches
     A bunch of caches for events: keyed by calendar id, the cache is keyed by event reference.
protected  IdManagerm_idManager
     Dependency: IdManager.
protected  MemoryServicem_memoryService
     Dependency: MemoryService.
protected  Stringm_relativeAccessPoint
     The initial portion of a relative access point URL.
protected  ServerConfigurationServicem_serverConfigurationService
     Dependency: ServerConfigurationService.
protected  Storagem_storage
     A Storage object for access to calendars and events.


Method Summary
public  CalendarEditaddCalendar(String ref)
     Add a new calendar.
public  booleanallowEditCalendar(String ref)
     check permissions for editCalendar()
Parameters:
  ref - The calendar reference.
public  booleanallowGetCalendar(String ref)
     check permissions for getCalendar().
Parameters:
  ref - The calendar reference.
public  booleanallowImportCalendar(String ref)
     check permissions for importing calendar events
Parameters:
  ref - The calendar reference.
public  booleanallowMergeCalendar(String ref)
     check permissions for merge()
Parameters:
  ref - The calendar reference.
public  Stringarchive(String siteId, Document doc, Stack stack, String archivePath, List attachments)
    
public  StringcalendarPdfReference(String context, String id, int scheduleType, String timeRangeString, String userName, TimeRange dailyTimeRange)
    
public  StringcalendarReference(String context, String id)
     Access the internal reference which can be used to access the calendar from within the system.
Parameters:
  context - The context.
Parameters:
  id - The calendar id.
public  voidcancelCalendar(CalendarEdit edit)
     Cancel the changes made to a CalendarEdit object, and release the lock.
public  voidcommitCalendar(CalendarEdit edit)
     Commit the changes made to a CalendarEdit object, and release the lock.
public  voidcontextCreated(String context, boolean toolPlacement)
    
public  voidcontextDeleted(String context, boolean toolPlacement)
    
public  voidcontextUpdated(String context, boolean toolPlacement)
    
public  voiddestroy()
     Returns to uninitialized state.
protected  voiddisableSchedule(String context)
     Remove a calendar for the site.
protected  StringdumpTimeRange(TimeRange timeRange)
     Debugging routine to get a string for a TimeRange.
public  CalendarEditeditCalendar(String ref)
     Get a locked calendar object for editing.
protected  voidenableSchedule(String context)
     Setup a calendar for the site.
protected  StringeventId(String secure)
     Form a tracking event string based on a security function string.
Parameters:
  secure - The security function string.
public  StringeventReference(String context, String calendarId, String id)
     Access the internal reference which can be used to access the event from within the system.
Parameters:
  context - The context.
Parameters:
  calendarId - The calendar id.
Parameters:
  id - The event id.
protected  CalendarfindCalendar(String ref)
     Find the calendar, in cache or info store - cache it if newly found.
Parameters:
  ref - The calendar reference.
protected  voidgeneratePDF(Document doc, String xslFileName, OutputStream streamOut)
    
protected  voidgenerateXMLDocument(int scheduleType, Document doc, TimeRange timeRange, TimeRange dailyTimeRange, List calendarReferenceList, String userID)
    
Parameters:
  scheduleType - daily, weekly, monthly, or list (no yearly).
Parameters:
  doc - XML output document
Parameters:
  timeRange - this is the overall time range.
protected  voidgenerateXMLEvent(Document doc, Element parent, CalendarEvent event, String eventNodeName, TimeRange containingTimeRange, boolean forceMinimumTime, boolean hideGroupIfNoSpace, boolean performEndTimeKludge)
     Generates the XML for an event.
protected  StringgetAccessPoint(boolean relative)
     Access the partial URL that forms the root of calendar URLs.
Parameters:
  relative - if true, form within the access path only (i.e.
public  CalendargetCalendar(String ref)
     Return a specific calendar.
Parameters:
  ref - The calendar reference.
public  ListgetCalendars()
     Return a List of all the defined calendars.
protected  TimeRangegetDailyStartTimeFromParameters(Properties parameters)
    
public  TimegetDate(Entity r)
     Access the resource date.
Parameters:
  r - The resource.
protected  StringgetDateFromTime(Time time)
    
public  EntitygetEntity(Reference ref)
    
public  CollectiongetEntityAuthzGroups(Reference ref, String userId)
    
public  StringgetEntityDescription(Reference ref)
    
public  ResourcePropertiesgetEntityResourceProperties(Reference ref)
    
public  StringgetEntityUrl(Reference ref)
    
public  CalendarEventVectorgetEvents(List references, TimeRange range)
     Takes several calendar References and merges their events from within a given time range.
Parameters:
  references - The List of calendar References.
Parameters:
  range - The time period to use to select events.
protected  TimeRangegetFullDayTimeRangeFromYMD(int year, int month, int day)
    
public  HttpAccessgetHttpAccess()
    
public  StringgetLabel()
    
protected  longgetNumberDaysGivenTwoDates(int startYear, int startMonth, int startDay, int endYear, int endMonth, int endDay)
     Calculate the number of days in a range of time given two dates.
public  StringgetOwnerId(Entity r)
     Access the resource owner user id.
Parameters:
  r - The resource.
protected  intgetScheduleTypeFromParameterList(Properties parameters)
     Gets the schedule type from a Properties object (filled from a URL parameter list).
protected  StringgetSiteName(CalendarEvent event)
    
protected  StringgetString(String name, String dflt)
     Access some named configuration value as a string.
Parameters:
  name - The configuration value name.
Parameters:
  dflt - The value to return if not found.
protected  TimeRangegetTimeRangeFromParameters(Properties parameters)
    
protected  ArrayListgetTimeRangeListForWeek(TimeRange timeRange, List calendarReferenceList, TimeRange dailyTimeRange, boolean skipSaturdayAndSundayIfNoEvents)
     Generates a list of time ranges for a week.
protected  TimeRangegetTimeRangeParameterByName(Properties parameters, String name)
     Utility routine to get a time range parameter from the URL parameters store in a Properties object.
protected  StringgetTimeString(Time time)
     Gets a standard time string give the time parameter.
protected  StringgetUniqueId()
     Access the id generating service and return a unique id.
protected  StringgetXSLFileNameForScheduleType(int scheduleType)
    
public  voidinit()
     Final initialization, once all dependencies are set.
public  booleanisDraft(Entity r)
     Check if this resource is in draft mode.
Parameters:
  r - The resource.
protected  ListmakeListViewTimeRangeList(TimeRange timeRange, List calendarReferenceList)
     Make a list of days for use in generating an XML document for the list view.
public  Stringmerge(String siteId, Element root, String archivePath, String fromSiteId, Map attachmentNames, Map userIdTrans, Set userListAllowImport)
    
public  String[]myToolIds()
    
public  EntitynewContainer(String ref)
     Construct a new continer given just an id.
Parameters:
  ref - The reference for the new object.
public  EntitynewContainer(Element element)
     Construct a new container resource, from an XML element.
Parameters:
  element - The XML.
public  EntitynewContainer(Entity other)
     Construct a new container resource, as a copy of another
Parameters:
  other - The other contianer to copy.
public  EditnewContainerEdit(String ref)
     Construct a new continer given just an id.
Parameters:
  ref - The reference for the new object.
public  EditnewContainerEdit(Element element)
     Construct a new container resource, from an XML element.
Parameters:
  element - The XML.
public  EditnewContainerEdit(Entity other)
     Construct a new container resource, as a copy of another
Parameters:
  other - The other contianer to copy.
public  RecurrenceRulenewRecurrence(String frequency)
    
public  RecurrenceRulenewRecurrence(String frequency, int interval)
    
public  RecurrenceRulenewRecurrence(String frequency, int interval, int count)
    
public  RecurrenceRulenewRecurrence(String frequency, int interval, Time until)
    
public  EntitynewResource(Entity container, String id, Object[] others)
     Construct a new rsource given just an id.
Parameters:
  container - The Resource that is the container for the new resource (may be null).
Parameters:
  id - The id for the new object.
Parameters:
  others - (options) array of objects to load into the Resource's fields.
public  EntitynewResource(Entity container, Element element)
     Construct a new resource, from an XML element.
Parameters:
  container - The Resource that is the container for the new resource (may be null).
Parameters:
  element - The XML.
public  EntitynewResource(Entity container, Entity other)
     Construct a new resource from another resource of the same type.
Parameters:
  container - The Resource that is the container for the new resource (may be null).
Parameters:
  other - The other resource.
public  EditnewResourceEdit(Entity container, String id, Object[] others)
     Construct a new rsource given just an id.
Parameters:
  container - The Resource that is the container for the new resource (may be null).
Parameters:
  id - The id for the new object.
Parameters:
  others - (options) array of objects to load into the Resource's fields.
public  EditnewResourceEdit(Entity container, Element element)
     Construct a new resource, from an XML element.
Parameters:
  container - The Resource that is the container for the new resource (may be null).
Parameters:
  element - The XML.
public  EditnewResourceEdit(Entity container, Entity other)
     Construct a new resource from another resource of the same type.
Parameters:
  container - The Resource that is the container for the new resource (may be null).
Parameters:
  other - The other resource.
abstract protected  StoragenewStorage()
     Construct a Storage object.
public  booleanparseEntityReference(String reference, Reference ref)
    
protected  TimeperformEndMinuteKludge(TimeBreakdown breakDown)
     This routine is used to round the end time.
protected  voidprintSchedule(Properties parameters, StringBuffer contentType, OutputStream os)
     Called by the servlet to service a get/post requesting a calendar in PDF format.
public  Objectrefresh(Object key, Object oldValue, Event event)
     Get a new value for this key whose value has already expired in the cache.
Parameters:
  key - The key whose value has expired and needs to be refreshed.
Parameters:
  oldValue - The old exipred value of the key.
Parameters:
  event - The event which triggered this refresh.
public  voidremoveCalendar(CalendarEdit calendar)
     Remove a calendar that is locked for edit.
protected  TimeRangeroundRangeToMinimumTimeInterval(TimeRange timeRange)
     Rounds a time range up to a minimum interval.
protected  BaseCalendarServiceservice()
     Access this service from the inner classes.
public  voidsetCaching(String value)
    
public  voidsetEntityManager(EntityManager service)
     Dependency: EntityManager.
public  voidsetIdManager(IdManager manager)
     Dependency: IdManager.
public  voidsetMemoryService(MemoryService service)
     Dependency: MemoryService.
public  voidsetServerConfigurationService(ServerConfigurationService service)
     Dependency: ServerConfigurationService.
protected  TimeRangeshrinkTimeRangeToCurrentMonth(TimeRange expandedTimeRange)
     The time ranges that we get from the CalendarAction class have days in the week of the first and last weeks padded out to make a full week.
protected  ArrayListsplitTimeRangeIntoListOfSingleDayTimeRanges(TimeRange timeRange, TimeRange dailyTimeRange)
     Returns a list of daily time ranges for every day in a range.
Parameters:
  timeRange - overall time range
Parameters:
  dailyTimeRange - representative daily time range (start hour/minute, end hour/minute).
public  Object[]storageFields(Entity r)
     Collect the fields that need to be stored outside the XML (for the resource).
public  voidtransferCopyEntities(String fromContext, String toContext, List resourceIds)
    
protected  TimeRangetrimTimeRange(TimeRange containingRange, TimeRange rangeToTrim)
     Trim the range that is passed in to the containing time range.
protected  voidunlock(String lock, String reference)
     Check security permission.
protected  booleanunlockCheck(String lock, String reference)
     Check security permission.
Parameters:
  lock - The lock id string.
Parameters:
  reference - The resource's reference string, or null if no resource is involved.
public  booleanwillArchiveMerge()
    
protected  ElementwriteStringNodeToDom(Document doc, Element parent, String nodeName, String nodeValue)
     Utility routine to write a string node to the DOM.

Field Detail
CALENDAR_PARAMETER_BASE_NAME
final protected static String CALENDAR_PARAMETER_BASE_NAME(Code)



COLUMN_NODE_NAME
final protected static String COLUMN_NODE_NAME(Code)



DAILY_START_TIME_PARAMETER_NAME
final protected static String DAILY_START_TIME_PARAMETER_NAME(Code)



DAY_VIEW_XSLT_FILENAME
final protected static String DAY_VIEW_XSLT_FILENAME(Code)
PDF file generation



DESCRIPTION_NODE
final protected static String DESCRIPTION_NODE(Code)



EVENT_NODE_NAME
final protected static String EVENT_NODE_NAME(Code)



FACULTY_EVENT_ATTRIBUTE_NAME
final protected static String FACULTY_EVENT_ATTRIBUTE_NAME(Code)



FACULTY_NODE
final protected static String FACULTY_NODE(Code)



FROM_ATTRIBUTE_STRING
final protected static String FROM_ATTRIBUTE_STRING(Code)



GROUP_NODE
final protected static String GROUP_NODE(Code)



HOUR_MINUTE_SEPARATOR
final protected static String HOUR_MINUTE_SEPARATOR(Code)



LIST_DATE_ATTRIBUTE_NAME
final protected static String LIST_DATE_ATTRIBUTE_NAME(Code)



LIST_DAY_OF_WEEK_ATTRIBUTE_NAME
final protected static String LIST_DAY_OF_WEEK_ATTRIBUTE_NAME(Code)



LIST_NODE_NAME
final protected static String LIST_NODE_NAME(Code)



LIST_VIEW_XSLT_FILENAME
final protected static String LIST_VIEW_XSLT_FILENAME(Code)



MAX_CONCURRENT_EVENTS_NAME
final protected static String MAX_CONCURRENT_EVENTS_NAME(Code)



MAX_OVERLAPPING_COLUMNS
final protected static int MAX_OVERLAPPING_COLUMNS(Code)



MILLISECONDS_IN_DAY
protected static long MILLISECONDS_IN_DAY(Code)



MILLISECONDS_IN_HOUR
final protected static long MILLISECONDS_IN_HOUR(Code)



MILLISECONDS_IN_MINUTE
final protected static long MILLISECONDS_IN_MINUTE(Code)



MINIMUM_EVENT_LENGTH_IN_MSECONDS
final protected static long MINIMUM_EVENT_LENGTH_IN_MSECONDS(Code)



MONTH_NODE_NAME
final protected static String MONTH_NODE_NAME(Code)



MONTH_VIEW_XSLT_FILENAME
final protected static String MONTH_VIEW_XSLT_FILENAME(Code)



PDF_MIME_TYPE
final protected static String PDF_MIME_TYPE(Code)



PLACE_NODE
final protected static String PLACE_NODE(Code)



ROW_NODE_NAME
final protected static String ROW_NODE_NAME(Code)



SCHEDULE_INTERVAL_IN_MINUTES
final protected static int SCHEDULE_INTERVAL_IN_MINUTES(Code)



SCHEDULE_NODE
final protected static String SCHEDULE_NODE(Code)



SCHEDULE_TYPE_PARAMETER_NAME
final protected static String SCHEDULE_TYPE_PARAMETER_NAME(Code)



SECURE_SCHEDULE_ROOT
final public static String SECURE_SCHEDULE_ROOT(Code)
Security lock / event root for generic message events to make it a mail event.



START_DAY_WEEK_ATTRIBUTE_NAME
final protected static String START_DAY_WEEK_ATTRIBUTE_NAME(Code)



START_TIME_ATTRIBUTE_NAME
final protected static String START_TIME_ATTRIBUTE_NAME(Code)



SUB_EVENT_NODE_NAME
final protected static String SUB_EVENT_NODE_NAME(Code)



TIMESLOT_FOR_OVERLAP_DETECTION_IN_MINUTES
final protected static int TIMESLOT_FOR_OVERLAP_DETECTION_IN_MINUTES(Code)



TIME_RANGE_PARAMETER_NAME
final protected static String TIME_RANGE_PARAMETER_NAME(Code)



TITLE_NODE
final protected static String TITLE_NODE(Code)



TO_ATTRIBUTE_STRING
final protected static String TO_ATTRIBUTE_STRING(Code)



TYPE_NODE
final protected static String TYPE_NODE(Code)



UID_NODE
final protected static String UID_NODE(Code)



USER_NAME_PARAMETER_NAME
final protected static String USER_NAME_PARAMETER_NAME(Code)



WEEK_VIEW_XSLT_FILENAME
final protected static String WEEK_VIEW_XSLT_FILENAME(Code)



m_caching
protected boolean m_caching(Code)
Configuration: cache, or not.



m_calendarCache
protected Cache m_calendarCache(Code)
A Cache object for caching: calendars keyed by reference.



m_entityManager
protected EntityManager m_entityManager(Code)
Dependency: EntityManager.



m_eventCaches
protected Hashtable m_eventCaches(Code)
A bunch of caches for events: keyed by calendar id, the cache is keyed by event reference.



m_idManager
protected IdManager m_idManager(Code)
Dependency: IdManager.



m_memoryService
protected MemoryService m_memoryService(Code)
Dependency: MemoryService.



m_relativeAccessPoint
protected String m_relativeAccessPoint(Code)
The initial portion of a relative access point URL.



m_serverConfigurationService
protected ServerConfigurationService m_serverConfigurationService(Code)
Dependency: ServerConfigurationService.



m_storage
protected Storage m_storage(Code)
A Storage object for access to calendars and events.





Method Detail
addCalendar
public CalendarEdit addCalendar(String ref) throws IdUsedException, IdInvalidException(Code)
Add a new calendar. Must commitCalendar() to make official, or cancelCalendar() when done!
Parameters:
  ref - A reference for the calendar. The newly created calendar.
exception:
  IdUsedException - if the id is not unique.
exception:
  IdInvalidException - if the id is not made up of valid characters.



allowEditCalendar
public boolean allowEditCalendar(String ref)(Code)
check permissions for editCalendar()
Parameters:
  ref - The calendar reference. true if the user is allowed to update the calendar, false if not.



allowGetCalendar
public boolean allowGetCalendar(String ref)(Code)
check permissions for getCalendar().
Parameters:
  ref - The calendar reference. true if the user is allowed to getCalendar(calendarId), false if not.



allowImportCalendar
public boolean allowImportCalendar(String ref)(Code)
check permissions for importing calendar events
Parameters:
  ref - The calendar reference. true if the user is allowed to import events, false if not.



allowMergeCalendar
public boolean allowMergeCalendar(String ref)(Code)
check permissions for merge()
Parameters:
  ref - The calendar reference. true if the user is allowed to update the calendar, false if not.



archive
public String archive(String siteId, Document doc, Stack stack, String archivePath, List attachments)(Code)



calendarPdfReference
public String calendarPdfReference(String context, String id, int scheduleType, String timeRangeString, String userName, TimeRange dailyTimeRange)(Code)



calendarReference
public String calendarReference(String context, String id)(Code)
Access the internal reference which can be used to access the calendar from within the system.
Parameters:
  context - The context.
Parameters:
  id - The calendar id. The the internal reference which can be used to access the calendar from within the system.



cancelCalendar
public void cancelCalendar(CalendarEdit edit)(Code)
Cancel the changes made to a CalendarEdit object, and release the lock. The CalendarEdit is disabled, and not to be used after this call.
Parameters:
  edit - The CalendarEdit object to commit.



commitCalendar
public void commitCalendar(CalendarEdit edit)(Code)
Commit the changes made to a CalendarEdit object, and release the lock. The CalendarEdit is disabled, and not to be used after this call.
Parameters:
  edit - The CalendarEdit object to commit.



contextCreated
public void contextCreated(String context, boolean toolPlacement)(Code)



contextDeleted
public void contextDeleted(String context, boolean toolPlacement)(Code)



contextUpdated
public void contextUpdated(String context, boolean toolPlacement)(Code)



destroy
public void destroy()(Code)
Returns to uninitialized state.



disableSchedule
protected void disableSchedule(String context)(Code)
Remove a calendar for the site.
Parameters:
  site - The site.



dumpTimeRange
protected String dumpTimeRange(TimeRange timeRange)(Code)
Debugging routine to get a string for a TimeRange. This should probably be in the TimeRange class.



editCalendar
public CalendarEdit editCalendar(String ref) throws IdUnusedException, PermissionException, InUseException(Code)
Get a locked calendar object for editing. Must commitCalendar() to make official, or cancelCalendar() or removeCalendar() when done!
Parameters:
  ref - The calendar reference. A CalendarEdit object for editing.
exception:
  IdUnusedException - if not found, or if not an CalendarEdit object
exception:
  PermissionException - if the current user does not have permission to mess with this user.
exception:
  InUseException - if the Calendar object is locked by someone else.



enableSchedule
protected void enableSchedule(String context)(Code)
Setup a calendar for the site.
Parameters:
  site - The site.



eventId
protected String eventId(String secure)(Code)
Form a tracking event string based on a security function string.
Parameters:
  secure - The security function string. The event tracking string.



eventReference
public String eventReference(String context, String calendarId, String id)(Code)
Access the internal reference which can be used to access the event from within the system.
Parameters:
  context - The context.
Parameters:
  calendarId - The calendar id.
Parameters:
  id - The event id. The the internal reference which can be used to access the event from within the system.



findCalendar
protected Calendar findCalendar(String ref)(Code)
Find the calendar, in cache or info store - cache it if newly found.
Parameters:
  ref - The calendar reference. The calendar, if found.



generatePDF
protected void generatePDF(Document doc, String xslFileName, OutputStream streamOut)(Code)
Takes a DOM structure and renders a PDF
Parameters:
  doc - DOM structure
Parameters:
  xslFileName - XSL file to use to translate the DOM document to FOP



generateXMLDocument
protected void generateXMLDocument(int scheduleType, Document doc, TimeRange timeRange, TimeRange dailyTimeRange, List calendarReferenceList, String userID)(Code)

Parameters:
  scheduleType - daily, weekly, monthly, or list (no yearly).
Parameters:
  doc - XML output document
Parameters:
  timeRange - this is the overall time range. For example, for a weekly schedule, it would be the start/end times for the currently selected week period.
Parameters:
  dailyTimeRange - On a weekly time schedule, even if the overall time range is for a week, you're only looking at a portion of the day (e.g., 8 AM to 6 PM, etc.)
Parameters:
  userID - This is the name of the user whose schedule is being printed.



generateXMLEvent
protected void generateXMLEvent(Document doc, Element parent, CalendarEvent event, String eventNodeName, TimeRange containingTimeRange, boolean forceMinimumTime, boolean hideGroupIfNoSpace, boolean performEndTimeKludge)(Code)
Generates the XML for an event.



getAccessPoint
protected String getAccessPoint(boolean relative)(Code)
Access the partial URL that forms the root of calendar URLs.
Parameters:
  relative - if true, form within the access path only (i.e. starting with /content) the partial URL that forms the root of calendar URLs.



getCalendar
public Calendar getCalendar(String ref) throws IdUnusedException, PermissionException(Code)
Return a specific calendar.
Parameters:
  ref - The calendar reference. the Calendar that has the specified name.
exception:
  IdUnusedException - If this name is not defined for any calendar.
exception:
  PermissionException - If the user does not have any permissions to the calendar.



getCalendars
public List getCalendars()(Code)
Return a List of all the defined calendars. a List of Calendar objects (may be empty)



getDailyStartTimeFromParameters
protected TimeRange getDailyStartTimeFromParameters(Properties parameters)(Code)



getDate
public Time getDate(Entity r)(Code)
Access the resource date.
Parameters:
  r - The resource. The resource date.



getDateFromTime
protected String getDateFromTime(Time time)(Code)
Gets the standard date string from the time parameter



getEntity
public Entity getEntity(Reference ref)(Code)



getEntityAuthzGroups
public Collection getEntityAuthzGroups(Reference ref, String userId)(Code)



getEntityDescription
public String getEntityDescription(Reference ref)(Code)



getEntityResourceProperties
public ResourceProperties getEntityResourceProperties(Reference ref)(Code)



getEntityUrl
public String getEntityUrl(Reference ref)(Code)



getEvents
public CalendarEventVector getEvents(List references, TimeRange range)(Code)
Takes several calendar References and merges their events from within a given time range.
Parameters:
  references - The List of calendar References.
Parameters:
  range - The time period to use to select events. CalendarEventVector object with the union of all events from the list of calendars in the given time range.



getFullDayTimeRangeFromYMD
protected TimeRange getFullDayTimeRangeFromYMD(int year, int month, int day)(Code)
Make a full-day time range given a year, month, and day



getHttpAccess
public HttpAccess getHttpAccess()(Code)



getLabel
public String getLabel()(Code)



getNumberDaysGivenTwoDates
protected long getNumberDaysGivenTwoDates(int startYear, int startMonth, int startDay, int endYear, int endMonth, int endDay)(Code)
Calculate the number of days in a range of time given two dates.
Parameters:
  startMonth - (zero based, 0-11)
Parameters:
  startDay - (one based, 1-31)
Parameters:
  endYear - (one based, 1-31)
Parameters:
  endMonth - (zero based, 0-11



getOwnerId
public String getOwnerId(Entity r)(Code)
Access the resource owner user id.
Parameters:
  r - The resource. The resource owner user id.



getScheduleTypeFromParameterList
protected int getScheduleTypeFromParameterList(Properties parameters)(Code)
Gets the schedule type from a Properties object (filled from a URL parameter list).



getSiteName
protected String getSiteName(CalendarEvent event)(Code)
Gets a site name given a CalendarEvent



getString
protected String getString(String name, String dflt)(Code)
Access some named configuration value as a string.
Parameters:
  name - The configuration value name.
Parameters:
  dflt - The value to return if not found. The configuration value with this name, or the default value if not found.



getTimeRangeFromParameters
protected TimeRange getTimeRangeFromParameters(Properties parameters)(Code)



getTimeRangeListForWeek
protected ArrayList getTimeRangeListForWeek(TimeRange timeRange, List calendarReferenceList, TimeRange dailyTimeRange, boolean skipSaturdayAndSundayIfNoEvents)(Code)
Generates a list of time ranges for a week. Each range in the list is a day.
Parameters:
  dailyTimeRange - representative daily time range (start hour/minute, end hour/minute)
Parameters:
  skipSaturdayAndSundayIfNoEvents - if true, then Saturday and Sundary are skipped if there are no events.



getTimeRangeParameterByName
protected TimeRange getTimeRangeParameterByName(Properties parameters, String name)(Code)
Utility routine to get a time range parameter from the URL parameters store in a Properties object.



getTimeString
protected String getTimeString(Time time)(Code)
Gets a standard time string give the time parameter.



getUniqueId
protected String getUniqueId()(Code)
Access the id generating service and return a unique id. a unique id.



getXSLFileNameForScheduleType
protected String getXSLFileNameForScheduleType(int scheduleType)(Code)
Given a schedule type, the appropriate XSLT file is returned



init
public void init()(Code)
Final initialization, once all dependencies are set.



isDraft
public boolean isDraft(Entity r)(Code)
Check if this resource is in draft mode.
Parameters:
  r - The resource. true if the resource is in draft mode, false if not.



makeListViewTimeRangeList
protected List makeListViewTimeRangeList(TimeRange timeRange, List calendarReferenceList)(Code)
Make a list of days for use in generating an XML document for the list view.



merge
public String merge(String siteId, Element root, String archivePath, String fromSiteId, Map attachmentNames, Map userIdTrans, Set userListAllowImport)(Code)



myToolIds
public String[] myToolIds()(Code)



newContainer
public Entity newContainer(String ref)(Code)
Construct a new continer given just an id.
Parameters:
  ref - The reference for the new object. The new containe Resource.



newContainer
public Entity newContainer(Element element)(Code)
Construct a new container resource, from an XML element.
Parameters:
  element - The XML. The new container resource.



newContainer
public Entity newContainer(Entity other)(Code)
Construct a new container resource, as a copy of another
Parameters:
  other - The other contianer to copy. The new container resource.



newContainerEdit
public Edit newContainerEdit(String ref)(Code)
Construct a new continer given just an id.
Parameters:
  ref - The reference for the new object. The new containe Resource.



newContainerEdit
public Edit newContainerEdit(Element element)(Code)
Construct a new container resource, from an XML element.
Parameters:
  element - The XML. The new container resource.



newContainerEdit
public Edit newContainerEdit(Entity other)(Code)
Construct a new container resource, as a copy of another
Parameters:
  other - The other contianer to copy. The new container resource.



newRecurrence
public RecurrenceRule newRecurrence(String frequency)(Code)



newRecurrence
public RecurrenceRule newRecurrence(String frequency, int interval)(Code)



newRecurrence
public RecurrenceRule newRecurrence(String frequency, int interval, int count)(Code)



newRecurrence
public RecurrenceRule newRecurrence(String frequency, int interval, Time until)(Code)



newResource
public Entity newResource(Entity container, String id, Object[] others)(Code)
Construct a new rsource given just an id.
Parameters:
  container - The Resource that is the container for the new resource (may be null).
Parameters:
  id - The id for the new object.
Parameters:
  others - (options) array of objects to load into the Resource's fields. The new resource.



newResource
public Entity newResource(Entity container, Element element)(Code)
Construct a new resource, from an XML element.
Parameters:
  container - The Resource that is the container for the new resource (may be null).
Parameters:
  element - The XML. The new resource from the XML.



newResource
public Entity newResource(Entity container, Entity other)(Code)
Construct a new resource from another resource of the same type.
Parameters:
  container - The Resource that is the container for the new resource (may be null).
Parameters:
  other - The other resource. The new resource as a copy of the other.



newResourceEdit
public Edit newResourceEdit(Entity container, String id, Object[] others)(Code)
Construct a new rsource given just an id.
Parameters:
  container - The Resource that is the container for the new resource (may be null).
Parameters:
  id - The id for the new object.
Parameters:
  others - (options) array of objects to load into the Resource's fields. The new resource.



newResourceEdit
public Edit newResourceEdit(Entity container, Element element)(Code)
Construct a new resource, from an XML element.
Parameters:
  container - The Resource that is the container for the new resource (may be null).
Parameters:
  element - The XML. The new resource from the XML.



newResourceEdit
public Edit newResourceEdit(Entity container, Entity other)(Code)
Construct a new resource from another resource of the same type.
Parameters:
  container - The Resource that is the container for the new resource (may be null).
Parameters:
  other - The other resource. The new resource as a copy of the other.



newStorage
abstract protected Storage newStorage()(Code)
Construct a Storage object. The new storage object.



parseEntityReference
public boolean parseEntityReference(String reference, Reference ref)(Code)



performEndMinuteKludge
protected Time performEndMinuteKludge(TimeBreakdown breakDown)(Code)
This routine is used to round the end time. The time is stored at one minute less than the actual end time, but the user will expect to see the end time on the hour. For example, an event that ends at 10:00 is actually stored at 9:59. This code should really be in a central place so that the velocity template can see it as well.



printSchedule
protected void printSchedule(Properties parameters, StringBuffer contentType, OutputStream os) throws PermissionException(Code)
Called by the servlet to service a get/post requesting a calendar in PDF format.



refresh
public Object refresh(Object key, Object oldValue, Event event)(Code)
Get a new value for this key whose value has already expired in the cache.
Parameters:
  key - The key whose value has expired and needs to be refreshed.
Parameters:
  oldValue - The old exipred value of the key.
Parameters:
  event - The event which triggered this refresh. a new value for use in the cache for this key; if null, the entry will be removed.



removeCalendar
public void removeCalendar(CalendarEdit calendar) throws PermissionException(Code)
Remove a calendar that is locked for edit.
Parameters:
  calendar - The calendar to remove.
exception:
  PermissionException - if the user does not have permission to remove a calendar.



roundRangeToMinimumTimeInterval
protected TimeRange roundRangeToMinimumTimeInterval(TimeRange timeRange)(Code)
Rounds a time range up to a minimum interval.



service
protected BaseCalendarService service()(Code)
Access this service from the inner classes.



setCaching
public void setCaching(String value)(Code)
Configuration: set the locks-in-db
Parameters:
  path - The storage path.



setEntityManager
public void setEntityManager(EntityManager service)(Code)
Dependency: EntityManager.
Parameters:
  service - The EntityManager.



setIdManager
public void setIdManager(IdManager manager)(Code)
Dependency: IdManager.
Parameters:
  manager - The IdManager.



setMemoryService
public void setMemoryService(MemoryService service)(Code)
Dependency: MemoryService.
Parameters:
  service - The MemoryService.



setServerConfigurationService
public void setServerConfigurationService(ServerConfigurationService service)(Code)
Dependency: ServerConfigurationService.
Parameters:
  service - The ServerConfigurationService.



shrinkTimeRangeToCurrentMonth
protected TimeRange shrinkTimeRangeToCurrentMonth(TimeRange expandedTimeRange)(Code)
The time ranges that we get from the CalendarAction class have days in the week of the first and last weeks padded out to make a full week. This function will shrink this range to only one month.



splitTimeRangeIntoListOfSingleDayTimeRanges
protected ArrayList splitTimeRangeIntoListOfSingleDayTimeRanges(TimeRange timeRange, TimeRange dailyTimeRange)(Code)
Returns a list of daily time ranges for every day in a range.
Parameters:
  timeRange - overall time range
Parameters:
  dailyTimeRange - representative daily time range (start hour/minute, end hour/minute). If null, this parameter is ignored.



storageFields
public Object[] storageFields(Entity r)(Code)
Collect the fields that need to be stored outside the XML (for the resource). An array of field values to store in the record outside the XML (for the resource).



transferCopyEntities
public void transferCopyEntities(String fromContext, String toContext, List resourceIds)(Code)



trimTimeRange
protected TimeRange trimTimeRange(TimeRange containingRange, TimeRange rangeToTrim)(Code)
Trim the range that is passed in to the containing time range.



unlock
protected void unlock(String lock, String reference) throws PermissionException(Code)
Check security permission.
Parameters:
  lock - The lock id string.
Parameters:
  reference - The resource's reference string, or null if no resource is involved.
exception:
  PermissionException - thrown if the user does not have access



unlockCheck
protected boolean unlockCheck(String lock, String reference)(Code)
Check security permission.
Parameters:
  lock - The lock id string.
Parameters:
  reference - The resource's reference string, or null if no resource is involved. true if permitted, false if not.



willArchiveMerge
public boolean willArchiveMerge()(Code)



writeStringNodeToDom
protected Element writeStringNodeToDom(Document doc, Element parent, String nodeName, String nodeValue)(Code)
Utility routine to write a string node to the DOM.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.