|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.service.cmr.repository.Period
public class Period
Implementation for the period data type "d:period" A period is specified by the period type and an optional expression. The string value is periodType|expression Examples are: none day - one day day|3 - 3 days week - one week week|1 - one week week|2 - two weeks month year monthend quarterend The period type specifies a period implementation. This is registered with this class and is used to when adding the period to a date, handles any processing of the expression, reports if the expression is not required, optional or mandatory.
Constructor Summary | |
---|---|
Period(java.lang.String period)
Create a period without an accompanying expression. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getExpression()
|
java.util.Date |
getNextDate(java.util.Date date)
Calculate the next date for this period given the a start date. |
java.lang.String |
getPeriodType()
|
static PeriodProvider |
getProvider(java.lang.String periodType)
Find a provider |
static java.util.Set |
getProviderNames()
Get the set of registered providers |
int |
hashCode()
|
static void |
registerProvider(PeriodProvider periodProvider)
Register a provider |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Period(java.lang.String period)
period
- Method Detail |
---|
public static void registerProvider(PeriodProvider periodProvider)
periodProvider
- public static PeriodProvider getProvider(java.lang.String periodType)
periodType
-
java.lang.IllegalStateException
- of there is no implementationpublic static java.util.Set getProviderNames()
public java.lang.String getPeriodType()
public java.lang.String getExpression()
public java.util.Date getNextDate(java.util.Date date)
date
-
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |