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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...