Package org.osgi.service.metatype

Examples of org.osgi.service.metatype.AttributeDefinition


        //create configuration properties for this pref based on the default values in its OCD.
        prefDict = new Hashtable();
       
        PreferenceAD[] prefADs = prefOCD.getPreferenceAttributeDefinitions(ObjectClassDefinition.ALL);
        for (int ii = 0; ii < prefADs.length; ii++) {
          AttributeDefinition prefAD = prefADs[ii];
         
         
          String id = prefAD.getID();
          String val = prefAD.getDefaultValue()[0];
         
          try {
          prefDict.put(id, val);
          } catch (Throwable e) {;
            e.printStackTrace();
View Full Code Here


 
  private PreferenceAD[] wrapAttributeDefinitions(AttributeDefinition[] realAttributeDefinitions) {
    PreferenceAD[] wrappedADs = new PreferenceAD[realAttributeDefinitions.length];
   
    for (int i = 0; i < realAttributeDefinitions.length; i++) {
      AttributeDefinition realAD = realAttributeDefinitions[i];
      PreferenceAD wrappedAD = new PreferenceADImpl(this.log, realAD);
     
      wrappedADs[i] = wrappedAD;
    }
   
View Full Code Here

 
  private ParamAD[] wrapAttributeDefinitions(AttributeDefinition[] realAttributeDefinitions) {
    ParamAD[] wrappedADs = new ParamAD[realAttributeDefinitions.length];
   
    for (int i = 0; i < realAttributeDefinitions.length; i++) {
      AttributeDefinition realAD = realAttributeDefinitions[i];
     
      String[] defaultOverrideValue = getDefaultOverrideValue(realAD.getID(), defaultOverrider);
     
      ParamAD wrappedAD = new ParamAD(this.log, realAD, defaultOverrideValue);
     
      wrappedADs[i] = wrappedAD;
    }
View Full Code Here

        Attribute attribute = (Attribute) i.next();

        String adRef = attribute.getAdRef();
        boolean found = false;
        for(int j = 0; j < attributeDefs.length; j++) {
          AttributeDefinition ad = attributeDefs[j];
          if (adRef.equals(ad.getID())) {
            // found attribute definition
            Object value = getValue(attribute, ad);
            if (value == null) {
              if (designate.isOptional()) {
                properties = null;
View Full Code Here

TOP

Related Classes of org.osgi.service.metatype.AttributeDefinition

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.