Package org.apache.slide.projector.value

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


    this.context = context;
  }
 
  public void put(String key, Object value) throws IOException {
        if ( value instanceof StreamableValue) {
            Projector.getRepository().setResource(new URIValue(key), (StreamableValue)value, context.getCredentials());
        } else if ( value instanceof Value ) {
            XMLStringWriter writer = XMLStringWriter.create();
            writer.writeXMLDeclaration();
            ValueFactoryManager.getInstance().saveValue((Value)value, writer);
            Projector.getRepository().setResource(new URIValue(key), new StringValue(writer.toString()), context.getCredentials());
        } else {
          throw new IOException("Could not write value to repository! Given value is '"+value+"'");
        }
    }
View Full Code Here


          throw new IOException("Could not write value to repository! Given value is '"+value+"'");
        }
    }

    public Object get(String key) throws IOException {
        return Projector.getRepository().getResource(new URIValue(key), context.getCredentials());
    }
View Full Code Here

    public Object get(String key) throws IOException {
        return Projector.getRepository().getResource(new URIValue(key), context.getCredentials());
    }

    public void dispose(String key) throws IOException {
        Projector.getRepository().removeResource(new URIValue(key), context.getCredentials());
    }
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

            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
        resultEntries.put(URL, new StringValue(url));
View Full Code Here

            launchJob(job, context);
            if ( !restoreRunningJobs ) {
              Projector.getRepository().subscribe("Update", jobsUri, 0,
                new Subscriber() {
                public void notify(String uri, Map information) {
                  update(new URIValue(uri));
                }
              }, Projector.getCredentials());
            }
          }
        } else {
View Full Code Here

                }
            }
        }
        writer.writeEndTag(XMLWriter.createEndTag("jobs"));
        try {
            Projector.getRepository().setResource(new URIValue(Projector.getWorkDir() + JOBS), new StringValue(writer.toString()), Projector.getCredentials());
        } catch (IOException exception) {
            logger.log(Level.SEVERE, "Exception occured while writing jobs to repository", exception);
        }
    }
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

TOP

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

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.