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 […]

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 […]

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 […]

pulkit
pulkit
Read

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 can we solve […]

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 […]

pulkit
pulkit
Read

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 […]

Mohit Garg
Mohit Garg
Read

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 […]

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 […]

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 […]

ankit.gubrani
ankit.gubrani
Read