Just want to mention that I have read quite a bit in the archive. The
archive has detail description in how to implement a Pull Tool, but no
example to show one how to use it (I might have missed it somehow, if this
is the case, would appreicate if someone could point me to one) ....

thanks
michael



> Peter Courcoux helped me with the creation of a Pull tool in my Turbine
> applicaiton. Below is the code he suggested to me. To complete the whole
> loop of things, would anybody be kind enough as to tell me how to access
> the data obtained by this UtilsTool from a .vm file.  I tried:
>
> #set ( $documents = $utils.getDocuments())
> $utils.getDocuments()
>
> this obviously does not work. An example would be appreciated.
>
> cheers
> michael
>
>
> public class UtilsTool implements ApplicationTool
> {
> /**
> * Initialize the UtilsTool object.
> *
> * @param data This is null, RunData or User depending upon
> * specified tool scope.
> */
>       public void init(Object data)
>       {
>           if (data == null)
>               {
>                Log.debug("UtilsTool scope is global");
>           } else if (data instanceof RunData) {
>                Log.debug("UtilsTool scope is request");
>           } else if (data instanceof User) {
>                Log.debug("UtilsTool scope is session");
>           }
>       }
>
>       public void refresh()
>       {
>           // this does not need to do anything
>           Log.debug("Refreshing UtilsTool");
>       }
>       /** gets a list of all docs in the Registry table in my db
>       */
>
>       public List getDocuments()
>       {
>           List docs = null;
>           try {
>                Criteria c = new Criteria();
>                docs = ContactPeer.doSelect(c);
>           } catch ( Exception e) {
>                Log.info("system", "UtilsTool-getDocuments:" + "Exception
> caught", e );
>                return null;
>           }
>           return docs;
>       }
> }
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]> For additional
> commands, e-mail: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to