Examples of PropertyList


Examples of org.cybergarage.upnp.event.PropertyList

        if (httpReq.isNotifyRequest() == true) {
            Activator.logger.DEBUG("[Importer] Notify Request");
      NotifyRequest notifyReq = new NotifyRequest(httpReq);
      String uuid = notifyReq.getSID();
      long seq = notifyReq.getSEQ();
      PropertyList props = notifyReq.getPropertyList();
//      int propCnt = props.size();
//      Hashtable hash = new Hashtable();
//      for (int n = 0; n < propCnt; n++) {
//        Property prop = props.getProperty(n);
//        String varName = prop.getName();
View Full Code Here

Examples of org.foray.fotree.PropertyList

    /**
     * {@inheritDoc}
     */
    protected PropertyList createNewPropertyList(final Attributes attlist) {
        return new PropertyList(attlist.getLength());
    }
View Full Code Here

Examples of org.oasis.wsrp.v1.PropertyList

      {
         throw new PortletInvokerException("Cannot set properties on portlet '" + portletContext.getId()
            + "' because there is no such portlet.");
      }

      PropertyList propertyList = WSRPTypeFactory.createPropertyList();
      int changesNumber = changes.length;
      List<Property> updates = new ArrayList<Property>(changesNumber);
      List<ResetProperty> resets = new ArrayList<ResetProperty>(changesNumber);
      for (int i = 0; i < changesNumber; i++)
      {
         PropertyChange change = changes[i];
         switch (change.getType())
         {
            case PropertyChange.PREF_RESET:
               resets.add(WSRPTypeFactory.createResetProperty(change.getKey()));
               break;

            case PropertyChange.PREF_UPDATE:
               // todo: deal with language more appropriately
               updates.add(WSRPTypeFactory.createProperty(change.getKey(),
                  WSRPUtils.toString(Locale.getDefault()), change.getValue().get(0)));
               break;

            default:
               throw new IllegalArgumentException("Unexpected property change type: " + change.getType());
         }
      }
      propertyList.getProperties().addAll(updates);
      propertyList.getResetProperties().addAll(resets);

      try
      {
         Holder<String> handle = new Holder<String>();
         Holder<byte[]> portletState = new Holder<byte[]>();
View Full Code Here

Examples of org.oasis.wsrp.v2.PropertyList

      WSRP2ExceptionFactory.throwOperationFailedIfValueIsMissing(setPortletProperties, "SetPortletProperties");

      PortletContext portletContext = setPortletProperties.getPortletContext();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(portletContext, "PortletContext", "SetPortletProperties");

      PropertyList propertyList = setPortletProperties.getPropertyList();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(propertyList, "PropertyList", "SetPortletProperties");

      Registration registration = producer.getRegistrationOrFailIfInvalid(setPortletProperties.getRegistrationContext());

      checkUserAuthorization(setPortletProperties.getUserContext());

      List<Property> properties = propertyList.getProperties();
      properties = WSRPUtils.replaceByEmptyListIfNeeded(properties);
      List<ResetProperty> resetProperties = propertyList.getResetProperties();
      resetProperties = WSRPUtils.replaceByEmptyListIfNeeded(resetProperties);
      int changesCount = 0;
      if (ParameterValidation.existsAndIsNotEmpty(properties))
      {
         changesCount += properties.size();
View Full Code Here

Examples of org.rhq.core.domain.configuration.PropertyList

*/
public abstract class AbstractPropertyListAdapter implements PropertyAdapter<PropertyList, PropertyDefinitionList>
{
    public PropertyList convertToProperty(MetaValue metaValue, PropertyDefinitionList propDefList)
    {
        PropertyList propList = new PropertyList(propDefList.getName());
        populatePropertyFromMetaValue(propList, metaValue, propDefList);
        return propList;
    }
View Full Code Here

Examples of org.rhq.core.domain.configuration.PropertyList

   
    String translatorName = ProfileServiceUtil.getSimpleValuetranslator, "name", String.class);
    String description = ProfileServiceUtil.getSimpleValuetranslator, "description", String.class);

    Configuration c = resourceConfiguration;
    PropertyList list = new PropertyList("translatorList");
    PropertyMap propMap = null;
    c.put(list);

    // First get translator specific properties
    ManagedProperty translatorProps = translator.getProperty("property");
View Full Code Here

Examples of org.rhq.core.domain.configuration.PropertyList

  public Object getResult() {
    return result;
  }
 
  private void setComplexResult() {
    PropertyList list = new PropertyList(LISTNAME); //$NON-NLS-1$
    PropertyMap pm;
    Iterator resultIter = ((List)content).iterator();
    while (resultIter.hasNext()) {
      Map reportRowMap = (Map) resultIter.next();
      Iterator reportRowKeySetIter = reportRowMap.keySet().iterator();
      pm = new PropertyMap(MAPNAME); //$NON-NLS-1$     

      while (reportRowKeySetIter.hasNext()) {
        String key = (String) reportRowKeySetIter.next();
        pm.put(new PropertySimple(key, reportRowMap.get(key)==null?"":reportRowMap.get(key))); //$NON-NLS-1$
      }
      list.add(pm);
    }
    result = list;
    operationResult.getComplexResults().put(list);
  }
View Full Code Here

Examples of org.rhq.core.domain.configuration.PropertyList

      detail.setPluginConfiguration(configuration);
     
       // Add to return values
      // First get translator specific properties
      ManagedProperty translatorProps = translator.getProperty("property");//$NON-NLS-1$
      PropertyList list = new PropertyList("translatorList");//$NON-NLS-1$
      PropertyMap propMap = null;
      getTranslatorValues(translatorProps.getValue(), propMap, list);

      // Now get common properties
      configuration.put(new PropertySimple("name", translatorName));//$NON-NLS-1$
View Full Code Here

Examples of org.rhq.core.domain.configuration.PropertyList

    ManagedProperty property = mcVdb.getProperty("models");
    CollectionValueSupport valueSupport = (CollectionValueSupport) property
        .getValue();
    MetaValue[] metaValues = valueSupport.getElements();

    PropertyList sourceModelsList = new PropertyList("singleSourceModels");
    configuration.put(sourceModelsList);

    PropertyList multiSourceModelsList = new PropertyList(
        "multiSourceModels");
    configuration.put(multiSourceModelsList);

    PropertyList logicalModelsList = new PropertyList("logicalModels");
    configuration.put(logicalModelsList);

    PropertyList errorList = new PropertyList("errorList");
    configuration.put(errorList);

    for (MetaValue value : metaValues) {
      GenericValueSupport genValueSupport = (GenericValueSupport) value;
      ManagedObjectImpl managedObject = (ManagedObjectImpl) genValueSupport
          .getValue();

      Boolean isSource = Boolean.TRUE;
      try {
        isSource = ProfileServiceUtil.booleanValue(managedObject
            .getProperty("source").getValue());
      } catch (Exception e) {
        LOG.error(e.getMessage());
      }

      Boolean supportMultiSource = Boolean.TRUE;
      try {
        supportMultiSource = ProfileServiceUtil
            .booleanValue(managedObject.getProperty(
                "supportsMultiSourceBindings").getValue());
      } catch (Exception e) {
        LOG.error(e.getMessage());
      }

      String modelName = managedObject.getName();
      ManagedProperty connectorBinding = managedObject
          .getProperty("sourceMappings");
      Collection<Map<String, String>> sourceList = new ArrayList<Map<String, String>>();

      getSourceMappingValue(connectorBinding.getValue(), sourceList);

      String visibility = ((SimpleValueSupport) managedObject
          .getProperty("visible").getValue()).getValue().toString();
      String type = ((EnumValueSupport) managedObject.getProperty(
          "modelType").getValue()).getValue().toString();

      // Get any model errors/warnings
      MetaValue errors = managedObject.getProperty("errors").getValue();
      if (errors != null) {
        CollectionValueSupport errorValueSupport = (CollectionValueSupport) errors;
        MetaValue[] errorArray = errorValueSupport.getElements();

        for (MetaValue error : errorArray) {
          GenericValueSupport errorGenValueSupport = (GenericValueSupport) error;

          ManagedObject errorMo = (ManagedObject) errorGenValueSupport
              .getValue();
          String severity = ((SimpleValue) errorMo.getProperty(
              "severity").getValue()).getValue().toString();
          String message = ((SimpleValue) errorMo
              .getProperty("value").getValue()).getValue()
              .toString();

          PropertyMap errorMap = new PropertyMap("errorMap",
              new PropertySimple("severity", severity),
              new PropertySimple("message", message));
          errorList.add(errorMap);
        }
      }

      for (Map<String, String> sourceMap : sourceList) {
View Full Code Here

Examples of org.rhq.core.domain.configuration.PropertyList

    }
    CollectionValueSupport valueSupport = (CollectionValueSupport) property
        .getValue();
    MetaValue[] metaValues = valueSupport.getElements();

    PropertyList translatorsList = new PropertyList("translators");
    configuration.put(translatorsList);

    for (MetaValue value : metaValues) {
      GenericValueSupport genValueSupport = (GenericValueSupport) value;
      ManagedObjectImpl managedObject = (ManagedObjectImpl) genValueSupport
          .getValue();

      String translatorName = ProfileServiceUtil.getSimpleValue(
          managedObject, "name", String.class);
      String translatorType = ProfileServiceUtil.getSimpleValue(
          managedObject, "type", String.class);
      ManagedProperty properties = managedObject.getProperty("property");

      if (properties != null) {
        CollectionValueSupport props = (CollectionValueSupport) properties
            .getValue();
        for (MetaValue propertyMetaData : props) {
          String propertyName = ProfileServiceUtil
              .stringValue(((CompositeValueSupport) propertyMetaData)
                  .get("name"));
          String propertyValue = ProfileServiceUtil
              .stringValue(((CompositeValueSupport) propertyMetaData)
                  .get("value"));
          PropertyMap translatorMap = null;

          translatorMap = new PropertyMap("translatorMap",
              new PropertySimple("name", translatorName),
              new PropertySimple("type", translatorType),
              new PropertySimple("propertyName", propertyName),
              new PropertySimple("propertyValue", propertyValue));
          // Only want translator name and value to show up for the
          // first row,
          // so we will blank them out here.
          translatorName = "";
          translatorType = "";
          translatorsList.add(translatorMap);
        }
      }
    }
  }
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.