Examples of URIValue


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

      }
    }

    class ConfigurationListener implements Subscriber {
      public void notify(String uri, Map information) {
        URI processorUri = new URIValue(uri);
        Processor processor = (Processor)configuredProcessors.get(processorUri);
        logger.log(Level.FINE, "Reloading processor with configuration URI='"+uri+"'");
        try {
          StreamableValue config = (StreamableValue)Projector.getRepository().getResource(processorUri, Projector.getCredentials());
          ((ConfigurableProcessor)processor).configure(config);
View Full Code Here

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

        }
        return null;
    }
   
    public URI createUser(String username, String password, Credentials credentials) throws UserExistsException, IOException {
      Value userExists = getResource(new URIValue(users+username), credentials);
      if ( userExists == NullValue.NULL || userExists != null ) {
            throw new UserExistsException(new ErrorMessage("userExists", new String[] { username }));
        } else {
          URI userUri = new URIValue(users+username);
          MkcolMethod mkcolMethod = new MkcolMethod(domain+userUri.toString());
          mkcolMethod.setDoAuthentication(true);
            HttpState httpState = new HttpState();
            httpState.setCredentials(null, host, credentials);
            int state = mkcolMethod.execute(httpState, new HttpConnection(host, port, protocol));
            if ( state == HttpStatus.SC_CREATED ) {
View Full Code Here

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

            return null;
        }
    }
   
    public URI createRole(String rolename, Credentials credentials) throws RoleExistsException, IOException {
      Value userExists = getResource(new URIValue(domain+roles+rolename), credentials);
      if ( userExists == NullValue.NULL || userExists != null ) {
            throw new RoleExistsException(new ErrorMessage("roleExists", new String[] { rolename }));
        } else {
          URI roleUri = new URIValue(roles+rolename);
          MkcolMethod mkcolMethod = new MkcolMethod(domain+roleUri.toString());
          mkcolMethod.setDoAuthentication(true);
            HttpState httpState = new HttpState();
            httpState.setCredentials(null, host, credentials);
            int state = mkcolMethod.execute(httpState, new HttpConnection(host, port, protocol));
            if ( state == HttpStatus.SC_CREATED ) {
View Full Code Here

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

          String childUrl = (String)propertyEnumeration.nextElement();
          if ( !childUrl.equals(url) ) {
          if ( childUrl.indexOf(domain) != -) {
            childUrl = childUrl.substring(childUrl.indexOf(domain)+domain.length());
          }
            children.add(new URIValue(childUrl));
          }
        }
        return new ArrayValue((Value[])children.toArray(new Value[children.size()]));
    }
View Full Code Here

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

      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

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

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

          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

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

    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

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

    }

    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

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

            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
TOP
Copyright © 2018 www.massapi.com. 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.