Package org.apache.slide.projector

Examples of org.apache.slide.projector.Store


        boolean showRange = ((BooleanValue)parameters.get(SHOW_RANGE)).booleanValue();
        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);
View Full Code Here


    public Result process(Map parameter, Context context) throws Exception {
      String storeName = parameter.get(STORE).toString();
      String key = parameter.get(KEY).toString();
      Value value = (Value)parameter.get(VALUE);
      Value timeoutValue = (Value)parameter.get(TIMEOUT);
      Store store = context.getStore(StoreHelper.getStoreByName(storeName));
      if ( timeoutValue == NullValue.NULL ) {
        store.put(key, value);
      } else {
        long timeout = ((NumberValue)timeoutValue).getNumber().longValue();
        store.put(key, value, timeout);
      }
        return Result.OK;
    }
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 {
      String storeName = parameter.get(STORE).toString();
      String key = parameter.get(KEY).toString();
      Store store = context.getStore(StoreHelper.getStoreByName(storeName));
      store.dispose(key);
      return Result.OK;
    }
View Full Code Here

    if ( key != null ) {
      if ( storeId == Store.NONE ) {
        storeId = Store.STEP;
      }
      String evaluatedKey = Process.evaluateKey(key, context);
      Store store = context.getStore(storeId);
      if ( store != null ) {
        if ( domain != null ) {
          MapValue mapResource = (MapValue)store.get(domain);
          if ( mapResource != null ) {
            value = mapResource.getMap().get(evaluatedKey);
          }
        } else {
          value = store.get(evaluatedKey);
        }
      }
    }
        if ( processorUri != null ) {
          if ( input != null ) {
View Full Code Here

    public Result process(Map parameter, Context context) throws Exception {
        Map parameters = ((MapValue)parameter.get(PARAMETER)).getMap();
        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();
            Value orderValue = (Value)idResource.getMap().get(TableHandler.ORDER);
View Full Code Here

TOP

Related Classes of org.apache.slide.projector.Store

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.