grails plugin to get gmail attachment - grails

I am working on a grails project and i need a plugin to extract an email attachment from a Gmail account.
My colleague said something about Java Mail API but i am not actually sure about how to integrate the api with grails.
Is there any other plugin or workaround to extract an email attachment from a gmail account?
Thanks.

While not specific to extracting attachments from GMail, the Grails Routing plugin would definitely be worth evaluating. It integrates Apache Camel into your Grails services and controllers and provides a very easy way to create routes. You can then add the following dependency to your grails-app/BuildConfig.groovy file:
// replace x.x.x with version used by the Grails Routing plugin
runtime("org.apache.camel:camel-mail:x.x.x")
In the documentation for the Mail component you will an example of grabbing attachments from GMail and there is also this blog entry by Mr Haki that shows an example using the older Grails Camel plugin (Routing plugin supercedes it).
While I haven't used Camel for this purpose, I have used it on a few projects and would recommend it as a possible solution. It is a very powerful integration tool and can really make it very easy to do some pretty complicated things.

Related

Internal mailing system plugin for Grails

Is there any internal mailing plugin for Grails? I want the registered users on my system and send mail to each other internally - not using a third party systems such as Gmail or Hotmail .
Is there something like that? Even if it is developed by java.
I haven't tried it myself, but this might do the job (assuming you are fine with an internal messaging system instead of real emails):
https://grails.org/plugin/grails-direct-messages
https://github.com/kaleidos/grails-direct-messages
You can use the grails mail plugin but configure it to use your own mail server.
You can use the company exchange server or run your own server using the Apache James Project or a multitude of other mail server application.

Configure an Activiti BPM?

I want to know that how to configure/run Activiti BPM in Grails?? I'm using fedora as my OS, Grails 2.1 . If their is any tutorial websites are is plz mention it also..
There is a plugin for Grails applications that provides much of Activiti within a Grails app. http://grails.org/plugin/activiti However, development has sadly stopped on it by the main developer. The last update was for Activiti 5.9 and Grails 2.1, though much of the plugin content seems to be built for older versions of Grails; for example, actions in the plugin's TaskController are all closures, not methods. Also, someone did issue a pull request to update it to 5.10.
I've been trying to puzzle through the source for that plugin myself. I keep vacillating between simply setting up a standalone Activiti server and utilizing the RESTful API from within a Grails Service class, importing a few of the Activiti classes into my Grails app, or trying to re-engineer the plugin to suit my needs (my site is stuck on Grails 2.0.1 for the time being).

What is a Grails Plugin? What does it mean to Install a Plugin?

I used Grails recently, and added Grails plugin for JQuery, but I don't think it did anything more than just copy some jQuery files over.
So far, I have seen info only on 'how to install and use' plugins...but I can't find anything that describes the concept of a plugin.
Can somebody please tell me, what is a Grails Plugin? And what does it mean to 'Install' a plugin?
A Grails plugin is (or should be) a self-contained bundle of functionality that can be installed into a Grails application. When a Grails plugin is installed, it can do any of the following:
define additional Spring beans
modify the generated web.xml
add new methods to the application's artefacts (controllers, domain classes, services, etc.)
provide new tag libraries
make additional resources and classes available to the application
provide new Grails commands
For example, when you install the JQuery plugin
the JQuery JavaScript files are added to the application
a new Grails tag <jq:jquery> is added to the application
a new Grails command grails install-plugin jquery is added to the application
When you install a Grails plugin, that plugin's functionality is made available to the installing application. However, the plugin itself is not actually copied into the application, only the plugin name and version is added to the application's application.properties file. The plugin itself is downloaded to $HOME/.grails and the application loads it from there.
The structure of a Grails plugin project is identical to that of a Grails application, with the exception of a configuration file (known as a plugin descriptor) that is included in a plugin's root directory.
Well, a Grails plugin is some piece of software that extends the frameworks funcionalities in some manner. Generally, installing a plugin in Grails means copying it to your Grails folder, so projects can refer to it and Grails will know where to find it.
Grails plugins have this folder structure:
grails-app
controllers
domain
taglib
service
etc
lib
src
java
groovy
web-app
js
css
So anything it has there will also be available to the application that uses it. For example, the Searchable plugin has a service class which you can use to perform advanced searchs in your own domain classes .
The jQuery plugin you mentioned has the jQuery .js file, and a tag to include that file.
For information on creating plugins, see http://grails.org/doc/latest/guide/12.%20Plug-ins.html
A plugin is just a set of functionality around a desired purpose. So the Spring Security plugin provides a way to lock down your app, assign roles to users, restrict access, whatever. The Searchable plugin allows you to integrate advanced searching into your app. There are lots of plugins
The point is to provide useful functionality so that you don't have to implement hard things yourself. Someone did something useful, and they wanted to contribute back to the community, so they organized their functionality and made it available.
A plugin is code and configuration, like any functionality you would implement yourself.
There is some documentation here: http://grails.org/doc/latest/ref/Plug-ins/Usage.html

Document Storage That Works Well with Grails

We need to manage various documents and files in our Grails application. Is there anything out there that integrates well with Grails that is specifically document management and not a full CMS?
Have you looked at JCR (Java Content Repository) implementations? On a past Java (not grails/groovy) project, I had a lot of success with Apache Jackrabbit.
However, it surprises me that the grails plugin support for JCR and/or Jackrabbit seems somewhat immature and uncompleted at this time. If you're interested, perhaps we could partner and write something together for this.

Suggested Grails plugins to make Grails a good CMS option

We are trying to look for plugins for Grails to make a CMS site. Any suggestions?
Check out Weceem at
http://www.weceem.org/weceem/
I've never used it but apparently it can be used as a stand-alone site or integrated into an existing grails app as a plugin.
There is also Alfresco plugin, though it's likely more focused on the document management side of Alfresco (it allows both Document Management and Web Content Management).

Resources