Package org.cishell.utilities.mutateParameter.dropdown

Examples of org.cishell.utilities.mutateParameter.dropdown.DefaultDropdownTransformer


  public static AttributeDefinition cloneToDropdownAttributeDefinition(
      AttributeDefinition oldAD,
      final Collection<String> optionLabels,
      final Collection<String> optionValues) {
    AttributeDefinitionTransformer transformer = new DefaultDropdownTransformer() {
      public boolean shouldTransform(AttributeDefinition ad) {
        return true;
      }

      public String[] transformOptionLabels(String[] oldOptionLabels) {
        return optionLabels.toArray(new String[0]);
      }

      public String[] transformOptionValues(String[] oldOptionValues) {
        return optionValues.toArray(new String[0]);
      }
    };
     
    return transformer.transform(oldAD);
  }
View Full Code Here


  public static BasicObjectClassDefinition mutateToDropdown(
      ObjectClassDefinition oldOCD,
      final String parameterID,
      final String[] optionLabels,
      final String[] optionValues) {
    AttributeDefinitionTransformer dropdownTransformer = new DefaultDropdownTransformer() {
      public boolean shouldTransform(AttributeDefinition ad) {
        return ad.getID().equals(parameterID);
      }
     
      public String[] transformOptionLabels(
View Full Code Here

TOP

Related Classes of org.cishell.utilities.mutateParameter.dropdown.DefaultDropdownTransformer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.