managers
Class ResourcesManager

java.lang.Object
  extended by managers.ResourcesManager

public class ResourcesManager
extends Object

Responsible for persistance.


Method Summary
 Object getObject(Node node)
          Gets an object from the node specified as the argument.
 ByteArray getValue(Node node)
          Gets a series of bytes from the node specified as the argument.
 void remove(Node node)
          Removes the content of the node specified as the argument.
 void removePackage(Node node)
          Removes the whole package from the MIDlet environment.
 void setObject(Node node, Object object)
          Binds a given object to the node specified as the argument.
 void setValue(Node node, ByteArray data)
          Binds a given series of bytes to the node specified as the argument.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getObject

public Object getObject(Node node)
Gets an object from the node specified as the argument.

This method can be used only for nodes from 'session' location.

Parameters:
node - node to read the object from
Returns:
object retrieved
Usage examples:
This method can be invoked explicitly, like any other Bluelemon method:
     <blue:call manager="ResourcesManager" method="getObject"
                toVariable="variableName">
       <blue:argument type="node" location="session"
                      name="com/emarson/bluelemon/anObject"/>
     </blue:call>
 
However, in most cases it is more convenient to use the equivalent <get node='...' location='...'> syntax:
     <blue:get node="com/emarson/bluelemon/anObject"
               location="session" toVariable="variableName"/>
 

getValue

public ByteArray getValue(Node node)
Gets a series of bytes from the node specified as the argument.

Parameters:
node - node to read the bytes from
Returns:
bytes read
Usage examples:
This method can be invoked explicitly, like any other Bluelemon method:
     <blue:call manager="ResourcesManager" method="getValue"
                toVariable="variableName">
       <blue:argument type="node" location="permanent"
                      name="com/emarson/bluelemon/example"/>
     </blue:call>
 
However, in most cases it is more convenient to use the equivalent <get node='...' location='...'> syntax:
     <blue:get node="com/emarson/bluelemon/example"
               location="permanent" toVariable="variableName"/>
 

remove

public void remove(Node node)
Removes the content of the node specified as the argument.

This method can be used only for nodes from 'permanent' and 'session' locations.

Parameters:
node - node to remove the content from
Usage examples:
     <blue:call manager="ResourcesManager" method="remove">
       <blue:argument type="node" location="session"
                      name="com/emarson/bluelemon/example"/>
     </blue:call>
 

removePackage

public void removePackage(Node node)
Removes the whole package from the MIDlet environment.

Parameters:
node - node identifying the package to remove
Usage examples:
     <blue:call manager="ResourcesManager" method="removePackage">
       <blue:argument type="byteArr" contextKey="packageDigest"/>
     </blue:call>
 

setObject

public void setObject(Node node,
                      Object object)
Binds a given object to the node specified as the argument.

This method can be used only for nodes from 'session' location.

Parameters:
node - node to store the object
data - object to store
Usage examples:
This method can be invoked explicitly, like any other Bluelemon method:
     <blue:call manager="ResourcesManager" method="setValue">
       <blue:argument type="node" location="session"
                      name="com/emarson/bluelemon/anObject"/>
       <blue:argument type="variable" name="form"/>
     </blue:call>
 
However, in most cases it is more convenient to use the equivalent <set node='...' location='...'> syntax:
     <blue:set node="com/emarson/bluelemon/anObject"
               location="session">
       <blue:argument type="variable" name="form"/>
     </blue:set>
 

setValue

public void setValue(Node node,
                     ByteArray data)
Binds a given series of bytes to the node specified as the argument.

Parameters:
node - node to write the bytes into
data - bytes to write
Usage examples:
This method can be invoked explicitly, like any other Bluelemon method:
     <blue:call manager="ResourcesManager" method="setValue">
       <blue:argument type="node" location="session"
                      name="com/emarson/bluelemon/example"/>
       <blue:argument type="String" value="some text"/>
     </blue:call>
 
However, in most cases it is more convenient to use the equivalent <set node='...' location='...'> syntax:
     <blue:set node="com/emarson/bluelemon/example"
               location="session">
       <blue:argument type="String" value="some text"/>
     </blue:set>
 


Copyright © 2007 E-MARSON. All Rights Reserved.