org.drools.repository.remoteapi
Class RestAPI

java.lang.Object
  extended by org.drools.repository.remoteapi.RestAPI

public class RestAPI
extends Object

This provides a simple REST style remote friendly API.


Constructor Summary
RestAPI(RulesRepository repo)
           
 
Method Summary
 void delete(String path)
          Should be pretty obvious what this is for.
 Response get(String path)
          This works off: packages/packageName --> returns list of : asset name=ISO date time last modified,versionNumber packages/packageName/.package --> the contents of the package header packages/packageName/assetName --> the contents of the package
static SimpleDateFormat getISODateFormat()
          This is the format used to sent dates as text, always.
 void post(String path, InputStream in, String comment)
          post is for new content.
 void put(String path, Calendar lastModified, InputStream in, String comment)
          Put is for updating content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestAPI

public RestAPI(RulesRepository repo)
Method Detail

get

public Response get(String path)
             throws UnsupportedEncodingException
This works off: packages/packageName --> returns list of : asset name=ISO date time last modified,versionNumber packages/packageName/.package --> the contents of the package header packages/packageName/assetName --> the contents of the package

Throws:
UnsupportedEncodingException

getISODateFormat

public static SimpleDateFormat getISODateFormat()
This is the format used to sent dates as text, always.


post

public void post(String path,
                 InputStream in,
                 String comment)
          throws RulesRepositoryException,
                 IOException
post is for new content.

Throws:
IOException
RulesRepositoryException

put

public void put(String path,
                Calendar lastModified,
                InputStream in,
                String comment)
         throws IOException
Put is for updating content. It will cause a new revision to be created. need to also cope with the .package thing

Throws:
IOException

delete

public void delete(String path)
            throws UnsupportedEncodingException
Should be pretty obvious what this is for.

Throws:
UnsupportedEncodingException


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.