Package org.apache.slide.projector.value

Examples of org.apache.slide.projector.value.MapValue


      involvedParamters.add(tokenizer.nextToken());
    }
    Store store = context.getStore(Store.SESSION);
    // 1. Store all (request) parameters into requested domain
    Map map;
    MapValue mapResource = (MapValue)store.get(domain);
    if ( mapResource == null ) {
      map = new HashMap();
      mapResource = new MapValue(map);
      store.put(domain, mapResource);
    } else {
      map = mapResource.getMap();
    }
        map.put(ControlComposer.VALIDATE, new BooleanValue(validate));
      map.put(Process.STEP, new StringValue(targetStep));
      map.putAll(parameter);
      if ( validate ) {
View Full Code Here


                try {
                    String evaluatedKey = Process.evaluateKey(key, context);
                    if ( evaluatedKey != null ) {
                      if ( domain != null ) {
                        Map map;
                        MapValue mapResource = (MapValue)resultStore.get(domain);
                      if ( mapResource == null ) {
                        map = new HashMap();
                        mapResource = new MapValue(map);
                      } else {
                        map = mapResource.getMap();
                      }
                      map.put(evaluatedKey, value);
                      evaluatedKey = domain;
                      value = mapResource;
                      }
View Full Code Here

      Element childElement = (Element)i.next();
      String key = childElement.getAttributeValue("key");
      Element entryElement = (Element)childElement.getChildren().iterator().next();
      map.put(key, ValueFactoryManager.getInstance().loadValue(entryElement));     
    }
    return new MapValue(map);
  }
View Full Code Here

        headerParameterDescriptors.add(new ParameterDescriptor(PROCESSOR, new ParameterMessage("tableGenerator/parameter/columns/processor"), new URIValueDescriptor(), NullValue.NULL));
        headerParameterDescriptors.add(new ParameterDescriptor(PARAMETERS, new ParameterMessage("tableGenerator/parameter/columns/parameters"), MapValueDescriptor.ANY, NullValue.NULL));
        headerParameterDescriptors.add(new ParameterDescriptor(RESULT, new ParameterMessage("tableGenerator/parameter/columns/result"), new StringValueDescriptor(), NullValue.NULL));
        parameterDescriptorList.add(new ParameterDescriptor(COLUMNS_PARAMETER, new ParameterMessage("tableGenerator/parameter/columns"),
            new ArrayValueDescriptor(new MapValueDescriptor((ParameterDescriptor [])headerParameterDescriptors.toArray(new ParameterDescriptor[headerParameterDescriptors.size()])))));
        parameterDescriptorList.add(new ParameterDescriptor(PARAMETER, new ParameterMessage("tableGenerator/parameter/parameter"), MapValueDescriptor.ANY, new MapValue(new HashMap())));
        parameterDescriptors = (ParameterDescriptor[] )parameterDescriptorList.toArray(new ParameterDescriptor[parameterDescriptorList.size()]);
        collapsedColumnTemplate = getOptionalFragment(COLLAPSED_COLUMN_FRAGMENT);
        collapsedHeaderColumnTemplate = getOptionalFragment(COLLAPSED_HEADER_COLUMN_FRAGMENT);
        ascendingHeaderColumnTemplate = getOptionalFragment(ASCENDING_HEADER_COLUMN_FRAGMENT);
        descendingHeaderColumnTemplate = getOptionalFragment(DESCENDING_HEADER_COLUMN_FRAGMENT);
View Full Code Here

        String handlerUrl = ProcessorManager.getInstance().process(ProcessorManager.URL, TableHandler.URL, context).toString();
        String id = parameter.get(TableHandler.ID).toString();
        String storeName = parameter.get(TableHandler.STORE).toString();
        Store store = context.getStore(StoreHelper.getStoreByName(storeName));
        Map tableMap;
        MapValue idResource = (MapValue)store.get(id);
        String sortedBy = null, order = null;
        Map size = null;
        if ( idResource == null) {
            tableMap = new HashMap();
            MapValue tableState = new MapValue(tableMap);
            store.put(id, tableState);
        } else {
            tableMap = idResource.getMap();
            Value sortedByValue = (Value)idResource.getMap().get(TableHandler.SORTED_BY);
            if ( sortedByValue != null && sortedByValue != NullValue.NULL ) sortedBy = sortedByValue.toString();
View Full Code Here

        Result result= new Result(StateDescriptor.OK, ARRAY, properties);
        Map properyMap = new HashMap();
        for ( int i = 0; i < properties.getArray().length; i++ ) {
            properyMap.put(((MapValue)properties.getArray()[i]).getMap().get("name").toString(), ((MapValue)properties.getArray()[i]).getMap().get("value"));
        }
        result.addResultEntry(MAP, new MapValue(properyMap));
        return result;
    }
View Full Code Here

        String uri = roleElement.getTextTrim();
      if ( uri.indexOf(domain) != -) {
        uri = uri.substring(uri.indexOf(domain)+domain.length());
      }
        map.put("uri", uri);
        roleList.add(new MapValue(map));
      }
      return new ArrayValue((Value [])roleList.toArray(new Value[roleList.size()]));
    }
View Full Code Here

        for ( Enumeration propertyEnumeration = propfindMethod.getResponseProperties(url); propertyEnumeration.hasMoreElements(); ) {
            Map properties = new HashMap();
            Property property = (Property)propertyEnumeration.nextElement();
            properties.put("name", new StringValue(property.getLocalName()));
            properties.put("value", new StringValue(property.getPropertyAsString()));
            arrayList.add(new MapValue(properties));
        }
        Value[] resource = new Value[arrayList.size()];
        return new ArrayValue((Value[])arrayList.toArray(resource));
    }
View Full Code Here

          }
      if ( uri.indexOf(domain) != -) {
        uri = uri.substring(uri.indexOf(domain)+domain.length());
      }
      searchResults.put("uri", uri);
      values.add(new MapValue(searchResults));
        }
        return (Value [])values.toArray(new Value[values.size()]);
    }
View Full Code Here

        }
        if ( includeContent ) {
          resultMap.put(CONTENT_ENTRY, content);
        }
      }
      arrayEntries.add(new MapValue(resultMap));
    }
    return new Result(StateDescriptor.OK, SimpleProcessor.OUTPUT, new ArrayValue((Value [])arrayEntries.toArray(new Value[arrayEntries.size()])));
  }
View Full Code Here

TOP

Related Classes of org.apache.slide.projector.value.MapValue

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.