Package org.apache.slide.projector.value

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


                        }
                    }
                } catch ( MessageNotFoundException exception ) {
                    logger.log(Level.SEVERE, "No message found while localizing tree", exception);
                }
                localizedResources.add(new MapValue(localizedMap));
            } else if ( resources[i] instanceof ArrayValue ) {
                localizedResources.add(localize(((ArrayValue)resources[i]).getArray(), locale, context));
            }
        }
        Value[] localizedResourceArray = new Value[localizedResources.size()];
View Full Code Here


  private final static ResultDescriptor resultDescriptor = new ResultDescriptor(new StateDescriptor[] { StateDescriptor.OK_DESCRIPTOR });
 
  public Result process(Map parameter, Context context) throws Exception {
    URI uri = (URI)parameter.get(PROCESSOR);
    boolean continueProcess = ((BooleanValue)parameter.get(CONTINUE)).booleanValue();
    MapValue parameterMap = (MapValue)parameter.get(PARAMETERS);
    Value step = (Value)parameter.get(Process.STEP);
    StringBuffer linkBuffer = new StringBuffer(128);
    if ( context instanceof HttpContext ) {
            linkBuffer.append(((HttpContext)context).getContextPath()).append(uri);
            boolean first = true;
            if ( continueProcess ) {
              parameterMap.getMap().put(Constants.PROCESS_ID_PARAMETER, context.getProcessId());
            }
            if ( step != null ) {
              parameterMap.getMap().put(Process.STEP, step);
            }
            for ( Iterator i = parameterMap.getMap().entrySet().iterator(); i.hasNext(); ) {
              Map.Entry entry = (Map.Entry)i.next();
              if ( first ) {
                linkBuffer.append('?');
                first = false;
              } else {
View Full Code Here

        int range = ((NumberValue)parameters.get(RANGE)).getNumber().intValue();
        String handlerUrl = ProcessorManager.getInstance().process(ProcessorManager.URL, TableHandler.URL, context).toString();
        String id = parameters.get(TableHandler.ID).toString();
        String storeName = parameters.get(TableHandler.STORE).toString();
        Store store = context.getStore(StoreHelper.getStoreByName(storeName));
        MapValue idResource = (MapValue)store.get(id);
        if ( idResource == null ) return new Result(FAILED);
        Map state = idResource.getMap();
        int itemsPerPage = ((NumberValue)state.get(TableMapRenderer.ITEMS_PER_PAGE)).getNumber().intValue();
        if (itemsPerPage <= 0) {
            return new Result(FAILED);
        }
        Result result = new Result(StateDescriptor.OK);
View Full Code Here

   
    public void configure(StreamableValue config) throws ConfigurationException {
        super.configure(config);
        // remove fragment parameter
        List parameterList = new ArrayList();
        parameterList.add(new ParameterDescriptor(PARAMETER, new ParameterMessage("tablePager/parameter"), MapValueDescriptor.ANY, new MapValue(new HashMap())));
        parameterList.add(new ParameterDescriptor(SHOW_RANGE, new ParameterMessage("tablePager/showRange"), new BooleanValueDescriptor(), BooleanValue.FALSE));
        parameterList.add(new ParameterDescriptor(RANGE, new ParameterMessage("tablePager/range"), new NumberValueDescriptor(), new NumberValue(new Integer(0))));
        parameterList.add(new ParameterDescriptor(TableHandler.ID, new ParameterMessage("tableRenderer/id"), new StringValueDescriptor(), new StringValue("table")));
        parameterList.add(new ParameterDescriptor(TableHandler.STORE, new ParameterMessage("tableRenderer/store"), new StringValueDescriptor(Store.stores), new StringValue(Store.stores[Store.SESSION])));
        parameterDescriptors = (ParameterDescriptor[])parameterList.toArray(new ParameterDescriptor[parameterList.size()]);
View Full Code Here

                  castedMap.put(key, entryDescriptor.valueOf(object, context));
                }
              }
            }
        }
        return new MapValue(castedMap);
    }
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.