biweekly
Class ValidationWarnings.WarningsGroup

java.lang.Object
  extended by biweekly.ValidationWarnings.WarningsGroup
Enclosing class:
ValidationWarnings

public static class ValidationWarnings.WarningsGroup
extends Object

Holds the validation warnings of a property or component.

Author:
Michael Angstadt

Constructor Summary
ValidationWarnings.WarningsGroup(ICalComponent component, List<ICalComponent> componentHierarchy, List<String> messages)
          Creates a new set of validation warnings for a component.
ValidationWarnings.WarningsGroup(ICalProperty property, List<ICalComponent> componentHierarchy, List<String> messages)
          Creates a new set of validation warnings for a property.
 
Method Summary
 ICalComponent getComponent()
          Gets the component object that caused the validation warnings.
 List<ICalComponent> getComponentHierarchy()
          Gets the hierarchy of components that the property or component belongs to.
 List<String> getMessages()
          Gets the warning messages.
 ICalProperty getProperty()
          Gets the property object that caused the validation warnings.
 String toString()
           Outputs each message in this warnings group as a newline-delimited string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidationWarnings.WarningsGroup

public ValidationWarnings.WarningsGroup(ICalProperty property,
                                        List<ICalComponent> componentHierarchy,
                                        List<String> messages)
Creates a new set of validation warnings for a property.

Parameters:
property - the property that caused the warnings
componentHierarchy - the hierarchy of components that the property belongs to
messages - the warning messages

ValidationWarnings.WarningsGroup

public ValidationWarnings.WarningsGroup(ICalComponent component,
                                        List<ICalComponent> componentHierarchy,
                                        List<String> messages)
Creates a new set of validation warnings for a component.

Parameters:
component - the component that caused the warnings
componentHierarchy - the hierarchy of components that the component belongs to
messages - the warning messages
Method Detail

getProperty

public ICalProperty getProperty()
Gets the property object that caused the validation warnings.

Returns:
the property object or null if a component caused the warnings.

getComponent

public ICalComponent getComponent()
Gets the component object that caused the validation warnings.

Returns:
the component object or null if a property caused the warnings.

getComponentHierarchy

public List<ICalComponent> getComponentHierarchy()
Gets the hierarchy of components that the property or component belongs to.

Returns:
the component hierarchy

getMessages

public List<String> getMessages()
Gets the warning messages.

Returns:
the warning messages

toString

public String toString()

Outputs each message in this warnings group as a newline-delimited string. Each line includes the component hierarchy and the name of the property/component. For example:

 [ICalendar > VEvent > VAlarm]: Email alarms must have at least one attendee.
 [ICalendar > VEvent > VAlarm]: The trigger must specify which date field its duration is relative to.
 

Overrides:
toString in class Object


Copyright © 2013 Michael Angstadt. All Rights Reserved.