org.jecars.apps
Interface CARS_Interface

All Known Implementing Classes:
CARS_AccountsApp, CARS_AdminApp, CARS_DefaultInterface, CARS_DirectoryApp, CARS_LoggerApp, CARS_TestApp, CARS_ToolsApp

public interface CARS_Interface

CARS_Interface

Version:
$Id: CARS_Interface.java,v 1.6 2008/02/06 12:33:42 weertj Exp $

Method Summary
 javax.jcr.Node addNode(CARS_Main pMain, javax.jcr.Node pInterfaceNode, javax.jcr.Node pParentNode, java.lang.String pName, java.lang.String pPrimType, nl.msd.jdots.JD_Taglist pParams)
          Add a node to the repository
 java.lang.String getName()
          Retrieves the name of the application source
 void getNodes(CARS_Main pMain, javax.jcr.Node pInterfaceNode, javax.jcr.Node pParentNode, java.lang.String pLeaf)
          getNodes
 void init(CARS_Main pMain, javax.jcr.Node pInterfaceNode)
          Will be be called only once, when JeCARS is started
 void nodeAdded(CARS_Main pMain, javax.jcr.Node pInterfaceNode, javax.jcr.Node pNewNode, java.io.InputStream pBody)
          A node has been added (addNode) and now a Inputstream will be supplied as input
 void removeNode(CARS_Main pMain, javax.jcr.Node pInterfaceNode, javax.jcr.Node pNode, nl.msd.jdots.JD_Taglist pParams)
          Remove a node from the JeCARS repository
 boolean setBodyStream(CARS_Main pMain, javax.jcr.Node pInterfaceNode, javax.jcr.Node pNode, java.io.InputStream pBody, java.lang.String pMimeType)
          Store a binary stream, on default the jecars:datafile node type is supported.
 javax.jcr.Property setParamProperty(CARS_Main pMain, javax.jcr.Node pInterfaceNode, javax.jcr.Node pNode, java.lang.String pPropName, java.lang.String pValue)
          Set param property implementation A check is performed for "jecars:StateRequest" property in a "jecars:Tool" node type.
 

Method Detail

getName

java.lang.String getName()
Retrieves the name of the application source

Returns:

init

void init(CARS_Main pMain,
          javax.jcr.Node pInterfaceNode)
          throws java.lang.Exception
Will be be called only once, when JeCARS is started

Parameters:
pMain - the CARS_Main object
pInterfaceNode - the Node which defines the application source
Throws:
java.lang.Exception

addNode

javax.jcr.Node addNode(CARS_Main pMain,
                       javax.jcr.Node pInterfaceNode,
                       javax.jcr.Node pParentNode,
                       java.lang.String pName,
                       java.lang.String pPrimType,
                       nl.msd.jdots.JD_Taglist pParams)
                       throws java.lang.Exception
Add a node to the repository

Parameters:
pMain - the CARS_Main object
pInterfaceNode - the Node which defines the application source or NULL
pParentNode - the node under which the object must be added
pName - the node name
pPrimType - the node type
pParams - list of parameters
Throws:
java.lang.Exception

nodeAdded

void nodeAdded(CARS_Main pMain,
               javax.jcr.Node pInterfaceNode,
               javax.jcr.Node pNewNode,
               java.io.InputStream pBody)
               throws java.lang.Exception
A node has been added (addNode) and now a Inputstream will be supplied as input

Throws:
java.lang.Exception

setBodyStream

boolean setBodyStream(CARS_Main pMain,
                      javax.jcr.Node pInterfaceNode,
                      javax.jcr.Node pNode,
                      java.io.InputStream pBody,
                      java.lang.String pMimeType)
                      throws java.lang.Exception
Store a binary stream, on default the jecars:datafile node type is supported. If the pNode is an other type the method will stored the data in a Binary property

Parameters:
pMain - the CARS_Main object
pInterfaceNode - the Node which defines the application source or NULL
pNode - the node in which the data will be stored
pMimeType - the mime type of the data if known, otherwise NULL
Returns:
true when a update on the node is performed
Throws:
java.lang.Exception - when an error occurs.

getNodes

void getNodes(CARS_Main pMain,
              javax.jcr.Node pInterfaceNode,
              javax.jcr.Node pParentNode,
              java.lang.String pLeaf)
              throws java.lang.Exception
getNodes

Throws:
java.lang.Exception

removeNode

void removeNode(CARS_Main pMain,
                javax.jcr.Node pInterfaceNode,
                javax.jcr.Node pNode,
                nl.msd.jdots.JD_Taglist pParams)
                throws java.lang.Exception
Remove a node from the JeCARS repository

Parameters:
pMain - the CARS_Main object
pInterfaceNode - the Node which defines the application source or NULL
pNode - the node which has to be removed
pParams - list of parameters
Throws:
java.lang.Exception

setParamProperty

javax.jcr.Property setParamProperty(CARS_Main pMain,
                                    javax.jcr.Node pInterfaceNode,
                                    javax.jcr.Node pNode,
                                    java.lang.String pPropName,
                                    java.lang.String pValue)
                                    throws java.lang.Exception
Set param property implementation A check is performed for "jecars:StateRequest" property in a "jecars:Tool" node type. this will result in a lock of the node and setStateRequest() in the CARS_ToolInterface.

Throws:
java.lang.Exception