CodeBeamer 5.4.0.1-RC API

com.intland.codebeamer.persistence.dto
Class TrackerLayoutDto

java.lang.Object
  extended by com.intland.codebeamer.persistence.dto.TrackerLayoutDto
All Implemented Interfaces:
BaseDto, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
ReadOnlyLayoutDto, TrackerConfigurationDto

public class TrackerLayoutDto
extends java.lang.Object
implements java.lang.Cloneable, BaseDto

Wraps the display layout of a tracker.

See Also:
Serialized Form

Constructor Summary
  TrackerLayoutDto()
           
  TrackerLayoutDto(TrackerDto tracker, java.util.List<TrackerLayoutLabelDto> fields)
           
protected TrackerLayoutDto(TrackerDto tracker, java.util.List<TrackerLayoutLabelDto> fields, java.util.Map<java.lang.Integer,TrackerLayoutLabelDto> fldmap, java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,TrackerLayoutLabelDto>> defaults)
           
  TrackerLayoutDto(TrackerLayoutDto layout)
           
 
Method Summary
static java.util.Map<java.lang.Integer,TrackerLayoutLabelDto> buildFieldMap(java.util.Collection<TrackerLayoutLabelDto> fields)
          Build the Layout map for a list of fields
 java.lang.Object clone()
          Create a clone of this TrackerLayoutDto.
 boolean equals(java.lang.Object obj)
           
 java.util.Map<java.lang.Integer,TrackerLayoutLabelDto> getDefaultsPerField(java.lang.Integer statusId)
          Get the Map of default values field for the specified status.
 java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,TrackerLayoutLabelDto>> getDefaultsPerStatusAndField()
          Get the Map of default values per status and field.
 TrackerLayoutLabelDto getField(int id)
           
 TrackerLayoutLabelDto getField(java.lang.Object id)
           
 TrackerLayoutLabelDto getFieldByName(java.lang.String label)
          Find a tracker field by label
 java.util.List<TrackerLayoutLabelDto> getFields()
           
 java.lang.Object getItemFieldValueByFieldName(TrackerItemDto item, java.lang.String label)
          Get a field value of the specified tracker item by field label
 java.util.Map<java.lang.Integer,TrackerLayoutLabelDto> getMapTable()
           
 TrackerLayoutLabelDto getMatchingField(TrackerLayoutLabelDto field)
          Find that field in this layout with the same label than the specified field.
 TrackerDto getTracker()
           
 int hashCode()
           
 void setDefaultsPerStatusAndField(java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,TrackerLayoutLabelDto>> defaultsPerStatusAndField)
          Set the Map of default values per status and field.
 void setFields(java.util.List<TrackerLayoutLabelDto> layoutFields)
           
 void setTracker(TrackerDto tracker)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrackerLayoutDto

public TrackerLayoutDto()

TrackerLayoutDto

public TrackerLayoutDto(TrackerDto tracker,
                        java.util.List<TrackerLayoutLabelDto> fields)

TrackerLayoutDto

protected TrackerLayoutDto(TrackerDto tracker,
                           java.util.List<TrackerLayoutLabelDto> fields,
                           java.util.Map<java.lang.Integer,TrackerLayoutLabelDto> fldmap,
                           java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,TrackerLayoutLabelDto>> defaults)

TrackerLayoutDto

public TrackerLayoutDto(TrackerLayoutDto layout)
Method Detail

getTracker

public TrackerDto getTracker()

setTracker

public void setTracker(TrackerDto tracker)

getFields

public java.util.List<TrackerLayoutLabelDto> getFields()

setFields

public void setFields(java.util.List<TrackerLayoutLabelDto> layoutFields)

getField

public TrackerLayoutLabelDto getField(int id)

getField

public TrackerLayoutLabelDto getField(java.lang.Object id)

getMatchingField

public TrackerLayoutLabelDto getMatchingField(TrackerLayoutLabelDto field)
Find that field in this layout with the same label than the specified field.

Parameters:
field - whose counterpart in this layout to find
Returns:
that field in this layout with the same label than the specified field, or null if no such field found

getFieldByName

public TrackerLayoutLabelDto getFieldByName(java.lang.String label)
Find a tracker field by label

Parameters:
label - of the requested field
Returns:
the layout field with the specified label, or null if no such field found

getItemFieldValueByFieldName

public java.lang.Object getItemFieldValueByFieldName(TrackerItemDto item,
                                                     java.lang.String label)
Get a field value of the specified tracker item by field label

Parameters:
item - whose field value to get
label - of the field whose value to get
Returns:
the value of the specified item field, or null if no such field exists or the field value is null

getMapTable

public java.util.Map<java.lang.Integer,TrackerLayoutLabelDto> getMapTable()

setDefaultsPerStatusAndField

public void setDefaultsPerStatusAndField(java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,TrackerLayoutLabelDto>> defaultsPerStatusAndField)
Set the Map of default values per status and field. Please note: The Map mustn't contain entries for non-required fields without default value.

Parameters:
defaultsPerStatusAndField - is a Map with Key = Status-ID, Value = Map(Key = Label-Id, Value = TrackerLayoutLabelDto)

getDefaultsPerStatusAndField

public java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,TrackerLayoutLabelDto>> getDefaultsPerStatusAndField()
Get the Map of default values per status and field. Please note: The Map doesn't contain entries for non-required fields without default value.

Returns:
a Map with Key = Status-ID, Value = Map(Key = Label-Id, Value = TrackerLayoutLabelDto)

getDefaultsPerField

public java.util.Map<java.lang.Integer,TrackerLayoutLabelDto> getDefaultsPerField(java.lang.Integer statusId)
Get the Map of default values field for the specified status. Please note: The Map doesn't contain entries for non-required fields without default value.

Parameters:
statusId - is the ID of the status
Returns:
a Map with Key = Label-Id and Value = TrackerLayoutLabelDto, or an empty Map if no defaults for the specified status exist

buildFieldMap

public static java.util.Map<java.lang.Integer,TrackerLayoutLabelDto> buildFieldMap(java.util.Collection<TrackerLayoutLabelDto> fields)
Build the Layout map for a list of fields

Parameters:
fields - The fields
Returns:
Map contains TrackerLayoutLabelDto of Integer ids -> TrackerLayoutLabelDto

clone

public java.lang.Object clone()
Create a clone of this TrackerLayoutDto. This also clones the tracker and fields

Overrides:
clone in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

CodeBeamer 5.4.0.1-RC API

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