Grails

Using Spring Events in Grails

Hi all, I have published a new blog post Using Spring Events in Grails. Spring Events are basically used to perform events asynchronously. In my use case I need to save hundreds of records in the database. So I use Spring Events to save records asynchronously. There is a plugin available in Grails for using Spring Events which...

by madhav.khanna
Tag: Groovy
17-Jul-2014

Technology

Register Groovy class as Component/Service in CQ

Being a CQ5 developer, I have to register components and services almost everyday. Knowing how powerful Groovy is, I wanted to replace all Java code with Groovy. First step towards it was being able to compile Groovy. I got it to work with the help of this blog. Although I was facing following problem even after this: - I was not...

by Vivek Sachdeva
Tag: Groovy
30-Jun-2014

Grails

OAuth 2.0 using Grails Part – 2

Obtain accessToken from refreshToken In the previous article OAuth 2.0 using Grails Part – 1 I have given a detailed explanation regarding user authentication using OAuth 2.0. In this article i will explain how you can obtain access_token from the refresh_token. Please refer to step(3) of part - 1 of this article where we obtained a...

by pulkit
Tag: Groovy
22-Jun-2014

Grails

Managing parallel versions of multiple Grails SDK(Software Development Kits) on Unix based systems by GVM

Sometimes we face a problem with our grails system, means we have many applications to work with which are built using different grails versions. So switching between grails version is a terrible task, like switching symbolic links or changing GRAILS_HOME environment variable each time when we run our different application.   How...

by Satyam Chaudhary
Tag: Groovy
06-Jun-2014

Grails

OAuth 2.0 using Grails Part – 1

Following steps need to be followed for OAuth 2.0 authentication : (1) Obtain OAuth 2.0 credentials from the Google Developers Console: First you need to have a google account. create a project at Google Developers Console after logging into your Google account. Click on the project name go to "APIs and auth" click on credentianls and...

by pulkit
Tag: Groovy
13-May-2014

Grails

Spring Security Permission Based framework

In my recent project, I want to implement permission based framework with spring security grails plugin. What does permission based framework mean? We can create a ROLE at run time based on the permission given to the user. Most of the times, we use Spring security in a way where we pre-define the roles to be used in our apps. But...

by Mohit Garg
Tag: Groovy
28-Apr-2014

Technology

Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing

Hi, Before writing this blog, I would first like to make you familiar with one quote "Be liberal in what you accept, and conservative in what you send". Yes that's what HTTP robustness protocol states. Scenario : We have a use case where our server need to read XML files that are large containing 400 outer element with extremely...

by Tarun Pareek
Tag: Groovy
18-Apr-2014

Grails

Iterate through two distinct dates – Groovy 2.2

Hi everyone, Ever wished for a 'groovier' way to iterate through two distinct dates? Well, Groovy 2.2 gives you two methods via the 'DateGroovyMethods' class to do exactly that: upto() and downto(). Here is the code showing the usage: [java] Date startDate = new Date() - 7 Date endDate = new Date() startDate.upto(endDate) { it...

by Abhishek Tejpaul
Tag: Groovy
13-Apr-2014

Grails

Groovy Integration with CQ5

Groovy being one of the fresh open source platforms in the market of Programming language, it is attracting Developer to use it because of its friendliness, easy codeabiltiy and many other features. Tempted by many of such features, CQ developers are also inclining towards using Groovy in CQ environment. To the rescue of many such...

by ankit.gubrani
Tag: Groovy
27-Feb-2014

Grails

Groovy multiple classLoaders

I never had to worry about whether the classes loaded in our application are in the same class loader or different, until I was stuck with the weird class not found exception. We were using a third party tool (Snowbound's DocViewer) which provided around 10 jar files, which worked well for except one functionality which was provided by 3...

by Amit Jain
Tag: Groovy
21-Feb-2014

Grails

First Grails Conference in India

After attending the recent Groovy Grails conference in London recently, I realized how much one can learn from a conference. One gets exposed to some fresh ideas and trends that can really be enriching as a professional. Meeting like minded people and sharing the ideas during the course of the conference is just an added advantage. At the...

by Imran Mir
Tag: Groovy
30-Dec-2013

Grails

Day Two at Groovy & Grails eXchange 2013

The day two at GGX '13, London continued to be spell binding and fun filled. The sessions, again, were really nice and proved to be valueable and insightful. Here are some of the highlights: Road To Grails 3.0 - By Graeme Rocher The session started with overview of the new features of Grails 2.3 and then moved to Grails 3.0. The...

by Imran Mir
Tag: Groovy
14-Dec-2013