CodeBeamer 5.4.0.1-RC API

com.intland.codebeamer.persistence.dto
Class CalendarEntryDto

java.lang.Object
  extended by com.intland.codebeamer.persistence.dto.base.IdentifiableDto
      extended by com.intland.codebeamer.persistence.dto.base.NamedDto
          extended by com.intland.codebeamer.persistence.dto.base.DescribeableDto
              extended by com.intland.codebeamer.persistence.dto.ArtifactDto
                  extended by com.intland.codebeamer.persistence.dto.CalendarEntryDto
All Implemented Interfaces:
BaseDto, IndexableDto, ProjectAwareDto, ReferableDto, VersionedReferableDto, WriteControlledDto, com.intland.codebeamer.persistence.util.WorkTimeCalendar.Day, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class CalendarEntryDto
extends ArtifactDto
implements com.intland.codebeamer.persistence.util.WorkTimeCalendar.Day

A special ArtifactDto that represents an entry in a WorkTimeCalendar, which is a special type of Directory Artifact

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.intland.codebeamer.persistence.dto.ArtifactDto
ArtifactDto.PathComparator
 
Nested classes/interfaces inherited from class com.intland.codebeamer.persistence.dto.base.DescribeableDto
DescribeableDto.DescriptionComparator
 
Nested classes/interfaces inherited from class com.intland.codebeamer.persistence.dto.base.NamedDto
NamedDto.NameComparator
 
Nested classes/interfaces inherited from class com.intland.codebeamer.persistence.dto.base.IdentifiableDto
IdentifiableDto.IdComparator
 
Nested classes/interfaces inherited from interface com.intland.codebeamer.persistence.dto.base.ReferableDto
ReferableDto.DescriptionComparator
 
Field Summary
static java.lang.String HOURS_SEP
          The separator for the hours in the definition " - Hours: "
static java.lang.String RANGE_SEP
          The separator for year ranges "[fromYear ...
static java.lang.Integer TYPE
          The ArtifactType for calendar entries
 
Fields inherited from class com.intland.codebeamer.persistence.dto.ArtifactDto
INTERWIKI_LINK_TYPE_DIR, INTERWIKI_LINK_TYPE_DOC, INTERWIKI_LINK_TYPE_NOTE, INTERWIKI_LINK_TYPE_NOTES, INTERWIKI_LINK_TYPE_REPORT
 
Fields inherited from interface com.intland.codebeamer.persistence.util.WorkTimeCalendar.Day
DEFAULT, LEISURE, STATE_NAMES, WORKDAY
 
Fields inherited from interface com.intland.codebeamer.persistence.dto.base.ReferableDto
HEAD_VERSION, SECTION_DELIMITER, VERSION_DELIMITER
 
Constructor Summary
CalendarEntryDto()
          Default constructor
CalendarEntryDto(int date, int state, java.util.List<com.intland.codebeamer.persistence.util.WorkTimeCalendar.Hours> hours, java.lang.String description)
           
 
Method Summary
protected  java.lang.String buildName()
          The name of a CalendarEntryDto consists of the anchor date plus the optional valid from to valid until range in the form "[...]"
 int getDate()
           
 java.lang.String getDefinition()
          Get the entry definition string, that contains the description plus business hours in the form " - Hours: ...;......"
 java.util.List<com.intland.codebeamer.persistence.util.WorkTimeCalendar.Hours> getHours()
          Get the business/working hours at this day
 int getState()
           
 java.lang.Integer getValidFrom()
           
 java.lang.Integer getValidUntil()
           
protected  void rebuildName()
          Rebuild and set the name of this calendar entry after name components have been modified
 void setDate(int theDate)
          Set the anchor [[year]month]day of this element as an Integer of the form "[[yyyy]mm]dd".
 void setDefinition(java.lang.String definition)
          This method can be used to set entry description plus hours via a single definition string of the form " - Hours: ...;......"
 void setHours(java.util.List<com.intland.codebeamer.persistence.util.WorkTimeCalendar.Hours> hours)
          Set the business/working hours at this day
 void setName(java.lang.String name)
          The name of a CalendarEntryDto consists of the anchor date plus the optional valid from to valid until range in the form "[...]"
 void setState(int state)
          Set the state (DEFAULT, WORKDAY or LEISURE) of this calendar day
 void setValidFrom(java.lang.Integer theDate)
          Set the date this element is valid from (inclusive) encoded as an Integer of the form "yyyymmdd".
 void setValidUntil(java.lang.Integer theDate)
          Set the date this element is valid until (inclusive) encoded as an Integer of the form "yyyymmdd".
 java.lang.String toString()
          Get a String description of this Calendar entry in the default TimeZone and Locale
 java.lang.String toString(java.util.TimeZone tz, java.util.Locale loc)
          Get a localized String description of this Calendar entry for the specified TimeZone and Locale
 
Methods inherited from class com.intland.codebeamer.persistence.dto.ArtifactDto
clone, compareArtifacts, compareScope, compareTo, compareType, equals, getAdditionalInfo, getAge, getCanDelete, getCompareType, getCreatedAt, getGenericReferenceId, getIconUrl, getInterwikiLink, getInterwikiLinkVersioned, getLastModifiedAt, getLastModifiedBy, getNotification, getOwner, getParent, getPath, getProject, getScopeName, getShortDescription, getTypeId, getUrlLink, getUrlLinkVersioned, getVersion, hashCode, isA, isApprovalSupported, isDeleted, isDirectory, isExists, isFile, isIndexed, isReadable, isSubscribed, isWikiNotes, isWikiPage, isWritable, setAdditionalInfo, setCreatedAt, setDeleted, setGenericReferenceId, setIndexed, setLastModifiedAt, setLastModifiedBy, setNotification, setOwner, setParent, setProject, setReadable, setScopeName, setTypeId, setWritable
 
Methods inherited from class com.intland.codebeamer.persistence.dto.base.DescribeableDto
compareByDescription, getDescription, getDescriptionFormat, setDescription, setDescriptionFormat
 
Methods inherited from class com.intland.codebeamer.persistence.dto.base.NamedDto
compareNames, compareString, compareStringIgnoreCase, createLookupMap, getName
 
Methods inherited from class com.intland.codebeamer.persistence.dto.base.IdentifiableDto
compare, compareInteger, equals, getId, hashCode, setId
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.intland.codebeamer.persistence.util.WorkTimeCalendar.Day
getDescription
 

Field Detail

TYPE

public static final java.lang.Integer TYPE
The ArtifactType for calendar entries


RANGE_SEP

public static final java.lang.String RANGE_SEP
The separator for year ranges "[fromYear ... toYear]"

See Also:
Constant Field Values

HOURS_SEP

public static final java.lang.String HOURS_SEP
The separator for the hours in the definition " - Hours: "

See Also:
Constant Field Values
Constructor Detail

CalendarEntryDto

public CalendarEntryDto()
Default constructor


CalendarEntryDto

public CalendarEntryDto(int date,
                        int state,
                        java.util.List<com.intland.codebeamer.persistence.util.WorkTimeCalendar.Hours> hours,
                        java.lang.String description)
Method Detail

buildName

protected java.lang.String buildName()
The name of a CalendarEntryDto consists of the anchor date plus the optional valid from to valid until range in the form "[...]"


rebuildName

protected final void rebuildName()
Rebuild and set the name of this calendar entry after name components have been modified


setName

public void setName(java.lang.String name)
The name of a CalendarEntryDto consists of the anchor date plus the optional valid from to valid until range in the form "[...]"

Overrides:
setName in class ArtifactDto

setDate

public void setDate(int theDate)
Set the anchor [[year]month]day of this element as an Integer of the form "[[yyyy]mm]dd". A day only anchor "dd" refers to a day of the week (sunday = 1, .. , saturday = 7) A month and day anchor "mmdd" refers to this day of the month in the [validFrom...validUntil] years A year, month and day anchor "yyyymmdd" refers exactly to this date For example: 1225 represents 'Dec. 25' in every year, 19631128 is 'Nov. 28, 1963'

Parameters:
theDate - anchor of this calendar element

getDate

public int getDate()
Specified by:
getDate in interface com.intland.codebeamer.persistence.util.WorkTimeCalendar.Day

setState

public void setState(int state)
Set the state (DEFAULT, WORKDAY or LEISURE) of this calendar day

Parameters:
state - is the working state of this calendar day

getState

public int getState()
Specified by:
getState in interface com.intland.codebeamer.persistence.util.WorkTimeCalendar.Day

setHours

public void setHours(java.util.List<com.intland.codebeamer.persistence.util.WorkTimeCalendar.Hours> hours)
Set the business/working hours at this day

Parameters:
hours - is a List of the business/working hours at this day, or null

getHours

public java.util.List<com.intland.codebeamer.persistence.util.WorkTimeCalendar.Hours> getHours()
Get the business/working hours at this day

Specified by:
getHours in interface com.intland.codebeamer.persistence.util.WorkTimeCalendar.Day
Returns:
an unmodifiable List of the business/working hours at this day, ordered ascending by begin, or null if no hours are defined

setDefinition

public void setDefinition(java.lang.String definition)
This method can be used to set entry description plus hours via a single definition string of the form " - Hours: ...;......"

Parameters:
definition - to set

getDefinition

public java.lang.String getDefinition()
Get the entry definition string, that contains the description plus business hours in the form " - Hours: ...;......"


setValidFrom

public void setValidFrom(java.lang.Integer theDate)
Set the date this element is valid from (inclusive) encoded as an Integer of the form "yyyymmdd". See WorkTimeCalendar.encode(Calendar) For example: Valid from March 1, 2002 is: 20020301

Parameters:
theDate - this element is valid from (infinite if null)

getValidFrom

public java.lang.Integer getValidFrom()
Specified by:
getValidFrom in interface com.intland.codebeamer.persistence.util.WorkTimeCalendar.Day

setValidUntil

public void setValidUntil(java.lang.Integer theDate)
Set the date this element is valid until (inclusive) encoded as an Integer of the form "yyyymmdd". See WorkTimeCalendar.encode(Calendar) For example: Valid from March 1, 2002 is: 20020301

Parameters:
theDate - this element is valid from (infinite if null)

getValidUntil

public java.lang.Integer getValidUntil()
Specified by:
getValidUntil in interface com.intland.codebeamer.persistence.util.WorkTimeCalendar.Day

toString

public java.lang.String toString(java.util.TimeZone tz,
                                 java.util.Locale loc)
Get a localized String description of this Calendar entry for the specified TimeZone and Locale

Parameters:
tz - is the TimeZone for hours localization
loc - is the Locale for names localization
Returns:
a localized String description of this CalendarDay definition for the specified TimeZone and Locale

toString

public java.lang.String toString()
Get a String description of this Calendar entry in the default TimeZone and Locale

Overrides:
toString in class ArtifactDto
Returns:
a String in the default TimeZone and Locale

CodeBeamer 5.4.0.1-RC API

Copyright © 2006-2009 Intland Software. All rights reserved.