Examples of CustomProperty


Examples of com.bradmcevoy.http.CustomProperty

* @author brad
*/
public class CustomPropertySource implements PropertySource {

    public Object getProperty( QName name, Resource r ) {
        CustomProperty prop = lookupProperty( name, r );
        if( prop != null ) {
            return prop.getTypedValue();
        } else {
            return null;
        }
    }
View Full Code Here

Examples of com.bradmcevoy.http.CustomProperty

            return null;
        }
    }

    public PropertyMetaData getPropertyMetaData( QName name, Resource r ) {
        CustomProperty prop = lookupProperty( name, r );
        if( prop != null ) {
            return new PropertyMetaData( PropertyAccessibility.WRITABLE, prop.getValueClass());
        } else {
            return PropertyMetaData.UNKNOWN;
        }

    }
View Full Code Here

Examples of com.bradmcevoy.http.CustomProperty

    }


    public void setProperty( QName name, Object value, Resource r ) {
        CustomProperty prop = lookupProperty( name, r );
        if( prop != null ) {
            prop.setFormattedValue( value.toString() );
        } else {
            throw new RuntimeException( "property not found: " + name.getLocalPart() );
        }
    }
View Full Code Here

Examples of com.bradmcevoy.http.CustomProperty

            throw new RuntimeException( "property not found: " + name.getLocalPart() );
        }
    }

    public boolean hasProperty( QName name, Resource r ) {
        CustomProperty prop = lookupProperty( name, r );
        return prop != null;
    }
View Full Code Here

Examples of com.bradmcevoy.http.CustomProperty

        CustomProperty prop = lookupProperty( name, r );
        return prop != null;
    }

    public void clearProperty( QName name, Resource r ) {
        CustomProperty prop = lookupProperty( name, r );
        prop.setFormattedValue( null );
    }
View Full Code Here

Examples of com.google.gdata.data.extensions.CustomProperty

    List<CustomProperty> cust = (entry instanceof MapEntry)
        ? ((MapEntry) entry).getCustomProperties()
        : ((FeatureEntry) entry).getCustomProperties();
    cust.clear();
    for (String key : props.keySet()) {
      cust.add(new CustomProperty(key, null, null, props.get(key)));
    }
  }
View Full Code Here

Examples of net.sourceforge.ganttproject.CustomProperty

  private void saveCustomProperties(IGanttProject project, HumanResource resource, TransformerHandler handler) throws SAXException {
    //CustomPropertyManager customPropsManager = project.getHumanResourceManager().getCustomPropertyManager();
    AttributesImpl attrs = new AttributesImpl();
    List properties = resource.getCustomProperties();
    for (int i=0; i<properties.size(); i++) {
      CustomProperty nextProperty = (CustomProperty) properties.get(i);
      CustomPropertyDefinition nextDefinition = nextProperty.getDefinition();
            if (nextProperty.getValue()!=null && !nextProperty.getValue().equals(nextDefinition.getDefaultValue())) {
          addAttribute("definition-id", nextDefinition.getID(), attrs);
          addAttribute("value", nextProperty.getValueAsString(), attrs);
          emptyElement("custom-property", attrs, handler);
            }
    }
  }
View Full Code Here

Examples of net.sourceforge.ganttproject.CustomProperty

                addAttribute("id", "3", attrs);
                textElement("phone", attrs, p.getPhone(), handler);

                List/*<CustomProperty>*/ customFields = p.getCustomProperties();
                for (int j=0; j<customFields.size(); j++) {
                  CustomProperty nextProperty = (CustomProperty) customFields.get(j);
                  addAttribute("id", nextProperty.getDefinition().getID(), attrs);
                  String value = nextProperty.getValueAsString();
                  textElement("custom-field", attrs, value, handler);
                }
                endPrefixedElement("resource", handler);
            }

View Full Code Here

Examples of net.sourceforge.ganttproject.CustomProperty

                String sRoleID = role==null ? "0":role.getPersistentID();
                writeTextCell(out, sRoleID);
            }
            List customProps = p.getCustomProperties();
            for (int j=0; j<customProps.size(); j++) {
              CustomProperty nextProperty = (CustomProperty) customProps.get(j);
              writeTextCell(out, nextProperty.getValueAsString());
            }
            out.write("\n");
        }
    } // end of write resources
View Full Code Here

Examples of net.sourceforge.ganttproject.CustomProperty

                if (s.length() > iMaxSize)
                    iMaxSize = s.length();
            }
            List customProps = p.getCustomProperties();
            for (int j=0; j<customProps.size(); j++) {
              CustomProperty nextProperty = (CustomProperty) customProps.get(j);
              if (nextProperty.getValueAsString().length() > iMaxSize) {
                iMaxSize = nextProperty.getValueAsString().length();
              }
            }
        }

    } // get maxIndentation end
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.