net.officefloor.eclipse.conform
Class ConformInput

java.lang.Object
  extended by net.officefloor.eclipse.conform.ConformInput
All Implemented Interfaces:
Input<org.eclipse.swt.widgets.Canvas>

public class ConformInput
extends Object
implements Input<org.eclipse.swt.widgets.Canvas>

Input using the GraphicalViewerImpl to populate the ConformModel links between the old and the new.

Author:
Daniel Sagenschneider

Constructor Summary
ConformInput()
           
 
Method Summary
 void addMappingsByName()
          Adds in the mappings between ExistingItemModel and TargetItemModel instances by name.
 org.eclipse.swt.widgets.Canvas buildControl(InputContext context)
          Builds the Control.
 String[] getInheritedTargetItemNames()
          Obtains the listing of TargetItemModel names that are flagged to inherit.
 Map<String,String> getTargetItemToExistingItemMapping()
          Obtains the ConformModel as a mapping of TargetItemModel name to ExistingItemModel name.
 Object getValue(org.eclipse.swt.widgets.Canvas control, InputContext context)
           Obtains the value from the input Control.
 void setConform(ConformModel conform)
          Specifies the (or change of) ConformModel.
 void setConform(String[] existingItemNames, String[] targetItemNames, String... inheritableTargetItemNames)
          Convenience method to load the ConformModel based on the names and provide default mappings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConformInput

public ConformInput()
Method Detail

setConform

public void setConform(String[] existingItemNames,
                       String[] targetItemNames,
                       String... inheritableTargetItemNames)
Convenience method to load the ConformModel based on the names and provide default mappings.

Parameters:
existingItemNames - Names for the ExistingItemModel instances.
targetItemNames - Names for the TargetItemModel instances.
inheritableTargetItemNames - TargetItemModel names that may inherit their configuration.

getTargetItemToExistingItemMapping

public Map<String,String> getTargetItemToExistingItemMapping()
Obtains the ConformModel as a mapping of TargetItemModel name to ExistingItemModel name.

Returns:
Mapping of TargetItemModel name to ExistingItemModel name.

getInheritedTargetItemNames

public String[] getInheritedTargetItemNames()
Obtains the listing of TargetItemModel names that are flagged to inherit.

Returns:
Listing of TargetItemModel names that are flagged to inherit.

setConform

public void setConform(ConformModel conform)
Specifies the (or change of) ConformModel.

Parameters:
conform - ConformModel.

addMappingsByName

public void addMappingsByName()
Adds in the mappings between ExistingItemModel and TargetItemModel instances by name.


buildControl

public org.eclipse.swt.widgets.Canvas buildControl(InputContext context)
Description copied from interface: Input
Builds the Control.

Specified by:
buildControl in interface Input<org.eclipse.swt.widgets.Canvas>
Parameters:
context - InputContext.
Returns:
Control to input the value.

getValue

public Object getValue(org.eclipse.swt.widgets.Canvas control,
                       InputContext context)
Description copied from interface: Input

Obtains the value from the input Control.

The input Control will be the one created by Input.buildControl(InputContext).

Specified by:
getValue in interface Input<org.eclipse.swt.widgets.Canvas>
Parameters:
control - Control.
context - InputContext.
Returns:
Value.


Copyright © 2005-2013. All Rights Reserved.