org.alfresco.repo.dictionary.types.period
Class AbstractCalendarPeriodProvider

java.lang.Object
  extended by org.alfresco.repo.dictionary.types.period.AbstractPeriodProvider
      extended by org.alfresco.repo.dictionary.types.period.AbstractCalendarPeriodProvider
All Implemented Interfaces:
PeriodProvider, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
AbstractEndOfCalendarPeriodProvider, Days, Months, Quarters, Weeks, Years

public abstract class AbstractCalendarPeriodProvider
extends AbstractPeriodProvider

Support for calendar based periods


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.alfresco.service.cmr.repository.PeriodProvider
PeriodProvider.ExpressionMutiplicity
 
Field Summary
 
Fields inherited from class org.alfresco.repo.dictionary.types.period.AbstractPeriodProvider
MSG_PREFIX
 
Constructor Summary
AbstractCalendarPeriodProvider()
           
 
Method Summary
abstract  void add(java.util.Calendar calendar, int value)
          Implementation add
 java.lang.String getDefaultExpression()
          Get the default expression - this could be null
 QName getExpressionDataType()
          Return the Alfresco data type QName to which the string value of the expression will be converted.
 PeriodProvider.ExpressionMutiplicity getExpressionMutiplicity()
          Is the expression required etc ...
 java.util.Date getNextDate(java.util.Date date, java.lang.String expression)
          Get the next date - the provided date + period
 
Methods inherited from class org.alfresco.repo.dictionary.types.period.AbstractPeriodProvider
afterPropertiesSet, getDisplayLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alfresco.service.cmr.repository.PeriodProvider
getPeriodType
 

Constructor Detail

AbstractCalendarPeriodProvider

public AbstractCalendarPeriodProvider()
Method Detail

getDefaultExpression

public java.lang.String getDefaultExpression()
Description copied from interface: PeriodProvider
Get the default expression - this could be null

Returns:
- the default expression.

getExpressionMutiplicity

public PeriodProvider.ExpressionMutiplicity getExpressionMutiplicity()
Description copied from interface: PeriodProvider
Is the expression required etc ...

Returns:
the multiplicity

getNextDate

public java.util.Date getNextDate(java.util.Date date,
                                  java.lang.String expression)
Description copied from interface: PeriodProvider
Get the next date - the provided date + period

Returns:
the next date in the period

add

public abstract void add(java.util.Calendar calendar,
                         int value)
Implementation add

Parameters:
calendar -
value -

getExpressionDataType

public QName getExpressionDataType()
Description copied from interface: PeriodProvider
Return the Alfresco data type QName to which the string value of the expression will be converted.

Returns:
the alfresco data type or null if an expression is not allowed.


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.