Package org.apache.slide.projector

Examples of org.apache.slide.projector.URI


      boolean sessionCreated = request.getSession(false) == null;
      Context context = new HttpContext(request, response);
        logger.log(Level.FINE, "Request uri=" + request.getRequestURI());
        logger.log(Level.FINE, "Context path=" + request.getContextPath());
        logger.log(Level.FINE, "Servlet path=" + request.getServletPath());
        URI uri = new URIValue(request.getRequestURI().substring(request.getContextPath().length()+request.getServletPath().length()+1));
        try {
            Result result;
            Processor processor;
            try {
                logger.log(Level.FINE, "Processing started with URI=" + uri);
View Full Code Here


    }

    public Class findClass(String name) throws ClassNotFoundException {
        Context context = new SystemContext();
        try {
            URI rendererUri = new URIValue(uri.toString() + name.replace('.', '/') + ".class");
            StreamableValue resource = ((StreamableValue)Projector.getRepository().getResource(rendererUri, context.getCredentials()));
            if ( resource == null ) {
              throw new ClassNotFoundException("Class " + name + " at URI '"+rendererUri+"' not found in collection '" + uri + "'!");
            }
            InputStream inputStream = resource.getInputStream();
View Full Code Here

      new ParameterDescriptor(PARAMETERS, new ParameterMessage("link/parameter/parameters"), MapValueDescriptor.ANY, new MapValue(new HashMap()))
  };
  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 ) {
View Full Code Here

    private static Logger logger = Logger.getLogger(CachedContent.class.getName());

    public final static String URL = "url";

    public Result process(Map parameter, Context context) throws Exception {
        URI uri = (URI)parameter.get(SimpleProcessor.INPUT);
        String url = "";
        if ( context instanceof HttpContext ) {
            url = ((HttpContext)context).getContextPath()+"/"+ProcessorManager.getInstance().getURI(this)+"?input="+uri;
        }
        // check for cached result
        Map resultEntries = new HashMap();
        Value output = (Value)context.getStore(Store.CACHE).get(uri.toString());
        if ( output == null ) {
            output = Projector.getRepository().getResource(uri, context.getCredentials());
            if ( output instanceof InputStreamValue ) {
                output = new MultipleStreamableValue((StreamableValue)output);
            }
            // cache result...
            context.getStore(Store.CACHE).put(uri.toString(), output);
            // ...and add dispose condition
            Map jobParameter = new HashMap();
            jobParameter.put(Dispose.STORE, new StringValue(Store.stores[Store.CACHE]));
            jobParameter.put(Dispose.KEY, new StringValue(uri.toString()));
            EventExpression expression = new EventExpression("Update");
            expression.addProperty(EventExpression.DEPTH, "0");
            expression.addProperty(EventExpression.URI, uri.toString());
            Scheduler.getInstance().registerJob(new Job(context.getProcessId()+":"+context.getStep(), new URIValue("dispose"), expression, expression, jobParameter, false, false));
      Scheduler.getInstance().saveJobs();
        }
        resultEntries.put(SimpleProcessor.OUTPUT, output);
        // build url to activate this processor on top level
View Full Code Here

        new ParameterDescriptor(BOOKMARK, new ParameterMessage("bookmark/parameter/bookmark"), new URIValueDescriptor())
    };
    private final static ResultDescriptor resultDescriptor = new ResultDescriptor(new StateDescriptor[] { StateDescriptor.OK_DESCRIPTOR });

    public Result process(Map parameter, Context context) throws Exception {
        URI bookmarkUri = (URI)parameter.get(BOOKMARK);
        context.setBookmark(bookmarkUri);
        return Result.OK;
    }
View Full Code Here

import org.apache.slide.projector.value.URIValue;
import org.apache.slide.projector.value.Value;

public class Get extends SimpleProcessor {
    public Value process(Value input, Context context) throws Exception {
        URI uri = new URIValue(input.toString());
        return Projector.getRepository().getResource(uri, context.getCredentials());
    }
View Full Code Here

    StateDescriptor.OK_DESCRIPTOR
  });
 
  public Result process(Map parameters, Context context) throws Exception {
      Map jobParameters = ((MapValue)parameters.get(PARAMETERS)).getMap();
      URI jobUri = (URIValue)parameters.get(PROCESSOR);
      XMLValue initialCondition = (XMLValue)parameters.get(CONDITION);
      boolean repeatJob = ((BooleanValue)parameters.get(REPEAT)).booleanValue();
      Value remainingConditionValue = (Value)parameters.get(REMAINING_CONDITION);
      XMLValue remainingCondition = null;
      if ( remainingConditionValue == NullValue.NULL ) {
View Full Code Here

TOP

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

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.