My Linux Stuff - Complete Blog For Linux Articles

My Linux Stuff - Complete Blog For Linux Articles

A Website For Complete Linux OS,Step by Step linux Installtion, Linux Tips and Tricks and Linux Stuff and so on... Connect and sharing here....

TOP 50 ENGINEERING COLLEGES IN INDIA 2014

TOP 50 ENGINEERING COLLEGES IN INDIA 2014

This below survey was taken many form many colleges in India. These Top 50 Engineering Colleges in India have Good Infrastructure, Good Environment, Educations , Staff, Placement , Research Activities and other Facilities are good.

Top 10 Government Engineering Colleges in India

Top 10 Government Engineering Colleges in India

These Government Engineering Colleges in India are really good for all kind of stuff like Education , research , Placement and New Innovation Ideas etc... But Getting seat in these colleges are heavy competition in students .....

Top 10 Colleges In India 2014

Top 10 Colleges In India 2014

Indian Institute Of Technology Delhi,Indian Institute Of Technology Bombay,Indian Institute Of Technology Kanpur,Indian Institute Of Technology Madras,Indian Institute Of Technology Kharagpur,Indian Institute Of Technology Roorkee,University Of Delhi,Indian Institute Of Technology Guwahati,University Of Calcutta,University Of Mumbai, National Institute Of Technology,Trichy.

2014 LATEST SURVEY TOP RANKING ENGINEERING COLLEGES IN INDIA

2014 LATEST SURVEY TOP RANKING ENGINEERING COLLEGES IN INDIA

This below survey was taken many form many colleges in India. These Top 100 Engineering Colleges in India have Good Infrastructure, Good Environment, Educations , Staff, Placement , Research Activities and other Facilities are good. If you want to do Engineering as your dream and try out these colleges

Subscribe Now!

Enter your email address:

Showing posts with label LifeRay. Show all posts
Showing posts with label LifeRay. Show all posts

Tuesday, September 22, 2015

FREE DOWNLOAD LIFERAY COOKBOOK

“The Liferay cookbook” is authored by Ahmed Hasan, Founder and CTO of TransIT mPower Labs Pvt. Ltd. This book is envisioned to serve as a detailed guide for Software Engineers to refer and acquire knowledge on advanced Liferay Portal Development Practices.

Liferay is a robust open source web portal technology based on Java, distributed under the GNU Lesser General Public License and proprietary licenses. According to Gartner’s report, Liferay is the world’s leading open source enterprise portal solution using the latest in Java and Web 2.0 technologies.



This highly scalable and cost effective framework has broad web portal solutions and product capabilities. Hence, many large enterprises are adopting to Liferay in addition to Small and Medium Business (SMB’s). Acknowledged, as a recent and fast growing technology, this adoption has created a significant demand for resource expertise at all levels across the globe.

The fact remains that there are only a handful of Liferay Architects and Specialists in the world today. An obvious reflection of this fact is that in the last 7 years of its existence, only limited books have been published on this technology. Majority of which, gives only limited information. Thus, there exists a need for an end to end book that shares insights into the challenges in developing programs with Liferay. Hence, the “The Liferay Cookbook” addresses this need comprehensively.

Ahmed Hasan, is a senior architect and trainer of international repute, he understands the needs and the limitations of the readers. Hence this book is drafted to be easily understood by a novice programmer but it also addresses the challenges faced by a seasoned programmer as well.
·         Written by a hard-core Liferay Architect: The Author has extensive experience in architecting high end solutions of large enterprises. This book covers his vast understanding and exposure of this technology.
·         Techno babble inscription: This book is narrated in a lucid style and simple language to make it more comprehendible for developers and professionals across the globe.
·         Coherence and flow: All the topics in the book are built around a hypothetical “Library Management System”. This gives the reader an opportunity to map the topics with its appropriate applications.
·         No abstract examples: All the code examples are very relevant to the central theme of the book and have been thoroughly tested by experts.
·         At the best syntax: The book covers best practice, programming patterns in depth.
·         Concepts Explained: The basic concepts are detailed after every chapter and in an easy to understand language.
·         Challenges to Readers: Within each chapter there are practical challenges for the reader to resolve. This makes the learning more lively and intriguing.
·         Real-time Simulation: Overall the book simulates the experience of classroom training and self-paced learning in combination.
·         Compatibility: This book is draught to be compatible with the latest version 6.1.1 GA2 and the upcoming version 6.2.X of Liferay.
FREE DOWNLOAD LIFERAY COOKBOOK


Topics Covered in LIFERAY COOKBOOK

General
  • Before Getting Inside.
  • Preface.
  • Evolution of this book.
  • Who should read this book?.
  • What is NOT covered in this book?.
  • Conventions followed in this book.
  • How to Approach this book?.
  • About the author (myself)
  • System requirements.
1. Introduction to Portal & Portlets
  • 1.1 Definition of a Portal
  • 1.2 What are Portlets?.
  • 1.3 Portlet Standards and Specification (JSR-286) .
  • 1.4 Liferay Portal.
2. Setup and Configuration.
  • 2.1 Install Java 7.
  • 2.2 Install Ant 1.9.
  • 2.3 MySQL Database.
  • 2.4 Install Eclipse Juno.
  • 2.5 Supporting Tools.
  • 2.6 Liferay Downloads.
3. Setting the stage with Liferay IDE.
  • 3.1 New Liferay Server
  • 3.2 Basic Configuration.
  • 3.3 Pointing Liferay to MySQL Database.
  • 3.4 New Liferay SDK..
  • 3.5 New Liferay Project


4. Library Management System.
  • 4.1 New Liferay Project.
  • 4.2 Establishing Basic Page flow.
  • 4.3 Anatomy of a Portlet URL.
  • 4.4 Creating a Simple Form.
  • 4.5 HTML form to AUI form.
  • 4.6 Injecting 3rd Party Libraries.
5. Service Layer and Service Builder.
  • 5.1 Service Builder Explained.
  • 5.2 Generating our first Service Layer.
  • 5.3 Invoking the Service Layer API .
  • 5.4 Pulling Data – Use another API .
  • 5.5 Avoiding Multiple Submits.
  • 5.6 Separating the Business Logic.
  • 5.7 Service Layer of Portal Source.
  • 5.8 Sharing a custom service layer.
  • 5.9 Caching to improve performance.
  • 5.10 “service.xml” DTD Explained.
6. Improving the Book List.
  • 6.1 HTML table to Search Container
  • 6.2 Referring to Portal’s TLDs and JARs.
  • 6.3 Adding link to delete book.
  • 6.4 Adding “Actions” on a Book.
  • 6.5 Editing a book.
  • 6.6 Viewing book details.
  • 6.7 Showing details as a popup.
  • 6.8 Sortable Columns.
  • 6.9 Performing an action on a set of items.
7. Data Retrieval Methods.
  • 7.1 Order By Clause.
  • 7.2 Finder Tags.
  • 7.3 Dynamic Query.
  • 7.4 Custom SQL Statements.
  • 7.5 Some Real world use-cases.
  • 7.6 Which mechanism is Best?.
8. Remote Services and Beyond.
  • 8.1 SOAP / RPC based Web Services.
  • 8.2 JSON Web Service.
  • 8.3 RESTful Web Services.
  • 8.4 The “Beyond” Part
  • 8.5 Calling Portal’s JSON Web Service.
  • 8.6 Service Context and its significance.
9. More Features and API’s.
  • 9.1 Portlet Filters.
  • 9.2 Implementing Frienly URL’s.
  • 9.3 Encrypting & Decrypting Portlet Data.
  • 9.4 Enabling Logger at Portlet Level.
  • 9.5 Portlet Internationalization (I18N).
  • 9.6 Portlet and WCM Marriage.
  • 9.7 Making Our Portlet appear in Control Panel.
  • 9.8 Running Backend Jobs through Quartz.
  • 9.9 Firing Emails from Portlet.
  • 9.10 Getting Direct Access to Database.
10. Configuration & Communication.
  • 10.1 Static Portlet Preferences.
  • 10.2 Dynamic Portlet Preferences.
  • 10.3 Reading from “properties” files.
  • 10.4 Firing Emails from Portlet – Continued.
  • 10.5 Portlet Data Handlers – Export / Import.
  • 10.6 Inter-Portlet Communication.
  • 10.7 Non-Standard ways of IPC.
  • 10.8 Portlet URL Invocation.
  • 10.9 Customizing Portlet Based on Query String.
11. Liferay Frameworks – Part 1.
  • 11.1 Security and Permissions.
  • 11.2 Portlet Permissions.
  • 11.3 More Security Layers and Custom Utility.
  • 11.4 Model Permissions.
  • 11.5 Liferay Asset Framework.
  • 11.6 Attaching Tags and Categories.
  • 11.7 Publishing Assets (Books) through Asset Publisher .
  • 11.8 Asset Publisher for Books – Finishing Touches.
12. Liferay Frameworks – Part 2.
  • 12.1 Liferay Storage Framework.
  • 12.2 MVCPortlet and Large Applications.
  • 12.3 Showing Book Cover in the List Page.
  • 12.4 File Processing and Liferay.
  • 12.5 Server Side Validation.
  • 12.6 Custom Fields Framework.
  • 12.7 Enabling Custom Fields for Library Portlet.
13. A Tour of Advanced API’s.
  • 13.1 Portlet Messaging – MessageBus.
  • 13.2 Indexing and Search.
  • 13.3 Advanced Search Features. 320
  • 13.4 Device Detection API
  • 13.5 Creating a Custom Taglib.
  • 13.6 More on Portlet + Web Content Integration.
  • 13.7 Form Navigator Tag. 337


Sunday, October 16, 2011

How to Implement a Simple Workflow


In this example I create two user a content creator who will create content and a content publisher who will publish the content.

send request

back to creator for modification
Process Definitions
Each workflow definitions is defined by a single XML file.The XML file has several parts which define the workflow. The key parts of the workflow definition are the asset, states, transitions, and tasks. The asset is whatever piece of content is being reviewed and approved in the workflow. States represent stages of the workflow; for example: created, rejected, or approved. Transitions occur between states, and indicate what the next state should be. Tasks are steps in the workflow that require user action.
Enhancing the portlet
This portlet is of course very basic and it could easily be enhanced in several
ways. Some suggestions:
_ Submit to a condor pool or Sun Grid Engine.
_ Let the user choose which computational resource to submit to.
_ Add persistence by saving state to _le or database.

Liferay Workflow System

Liferay Portal is one of the leading open source portal frameworks.Liferay have the following features
                        Runs on all major application servers and Servlet containers, databases, and operating systems, and over 700 deployment combinations.
                        Uses the latest in Java, J2EE, and Web 2.0 technologies.
                        Uses an open SOA framework.
                        JSR-168/JSR-286 compliant.
                        Out of the box usability over 60 portlets.
                        AJAX-enabled user interface.
                        Full LDAP synchronization and secure Single Sign On (SSO) support.

Liferay portal includes a default workflow engined called Kaleo. Kaleo workflow allows to define any number of simple to complex business processes/workflows by defining everything inside a single XML file.Liferay 6 also provide integration mechanism with the JBPM workflow engine. The workflow is applied out-of-the-box to the following Liferay entities:
1.      Wiki Page
2.      Web Content
3.      Document Library Document
4.      Blogs Entry
5.      Comments
6.      Message Boards Message

There are four portlets related to the workflow that allows the users to manage this system.
                        My Submissions
                        My Workflow Tasks
                        Workflow Configuration
Workflow Portlet.

What is a WorkFlow

A workflow can be defined as a business process in which information can be passed from one participant to another for action according to a set of procedural rules. The workflow consist of a series of steps and each steps contains tasks where the participant can perform different activites like review, approve, reject, or update an assignement.

Automated workflow is important inside an organization because it ensures maximum throughput and accuracy when distributing work or tasks. It improves the control of a process with less manual intervention, eliminating misplaced work, reducing delays, and ensuring tasks are performed according to your company’s policies and procedures. Workflows automate the flow of employee tasks and activities, reducing the time the process took to complete as well as potential errors caused by human interaction.

What is MVC

MVC separates the presentation code from the business logic code.

Recommended Tools For Liferay


The following instructions will help you get your development environment ready for working with the

source code. These instructions are specific to setting up for deployment to Orion server and Tomcat 5.5

developing with Java JDK 1.5. Liferay Portal is compatible with Java 1.4 also and a wide array of

application servers and containers. You will need to adjust your development environment according to

your platform.

Before we can get started, the following components must be installed on your machine.

3.1. JDK 1.5.0 or JDK 1.4.2

1. Download and install JDK 1.5.0 [http://java.sun.com/j2se/1.5.0/download.jsp]. JDK 1.4 is also

supported.

2. Set an environment variable called JAVA_HOME to point to your JDK directory.

3.2. Jikes 1.22 or Jikes 1.21

Jikes is a Java compiler by IBM that is much faster than the original one provided by the JDK.

1. Download and unzip Jikes 1.22 [http://www-124.ibm.com/developerworks/oss/jikes]. If using JDK

1.4 you have to use Jikes 1.21 instead.

2. Set an environment variable called JIKES_HOME to point to your Jikes directory.

3. Add JIKES_HOME\bin to your PATH environment variable.

3.3. Ant 1.6.5

1. Download and unzip the latest version of Ant [http://ant.apache.org/].

2. Set an environment variable called ANT_HOME to point to your Ant directory.

3. Add ANT_HOME\bin to your PATH environment variable.

3.4. Subversion or a Similar Version Control System

We recommend that you put all your code and configuration files into a version control system.

Subversion is free and open source and can be used through a set of commands, by installing a

subversion client such as SmartSVN [http://www.smartsvn.com/], TortoiseSVN [http://tortoisesvn.net/]

or through the integration mechanisms provided by most IDEs.

Difference Between Portlet Development vs Servlet Development


Developing a Java Portlet is similar to the process of developing a Servlet based web applications. The

main differences are:

• The portlet only produces a fragment of the final HTML and not the full markup. The portal will join

the fragments of several portlets and will create the full page returned to the user.

• The class receiving the requests has to inherit from javax.portlet.Portlet instead of

javax.servlet.http.HttpServlet.

• A portlet request may involve a two phase process:

1. On each request at most one portlet will be able to perform an state-changing operation. This is

referred to as the Action phase and is implemented through a method called processAction.

Not always an action phase is needed. Requests that involved an action phase are invoked to an

URL known as an ActionURL, while those that only have a render phase are invoked through a

RenderURL.

2. Next is the render phase where all other portlets related to the page that is going to be returned may

be called in any order to produce the HTML fragment to draw themselves. Portlet implement this

functionality through a method called render.

• Existing web application development frameworks such as Struts, JSF, Webworks, etc can be used

through the use of Bridges. Other existing frameworks have been adapted to be usable directly

without the need of a bridge. An example is the Spring Portlet MVC framework.

A portlet container is a server side software component that is capable of running portlets. A portal is a

web application that includes a portlet container and may offer additional services to the user. Liferay

Portal includes its own portlet container and offers lots of functionalities such as user and organization

administration, creation of virtual communities, having pages based on portlet layouts, graphical

selection of portlets and drag&drop to place them, grouping pages into websites, several bundled

ready-to-use portlets, and much more.

How to Defining a new theme


Before digging into these folders, the next step is to register the theme in Liferay. Edit the file

liferay-look-and-feel.xml present in the WEB-INF directory and add the following XML

fragment:

<theme id="my-theme" name="My theme">

<root-path>/html/themes/my-theme</root-path>

<templates-path>/html/themes/my-theme/templates</templates-path>

<images-path>/html/themes/my-theme/images</images-path>

<template-extension >jsp</template-extension>

<settings>

<setting key="my-setting" value="example-value"/>

</settings>

<color-scheme id="gen-color" name="DarkBlue">

<![CDATA[

-- Content omitted for clarity --

]]>

</color-scheme>

</theme>

The root-path element must point to the root theme folder. The elements templates-path

contains the path to the JSP templates, and images-path points to the subfolder that contains the

images for this theme. Note that you can choose any subdirectory name you want or point to

subdirectories in other directories. However, it is recommended that you keep the default

convention unless you have a good reason to change it.

The template-extension element specifies the language in which the templates of the theme are

written. JSPs and velocity (specifying vm as the template extension) are supported. Liferay

comes with examples of both. In this article we will assume JSP templates, but they are very

_

Page 5 of 11 Created by Jorge Ferrer

What is portlet Content and Portlet Template

Portlet Content: the internal area that shows the meat of the portal.
 Portlet Template: the external area and can be customized for each theme.

Liferay Interview Question and Answers

what can you do with a theme?
A theme can control the whole look and feel of the pages generated by Liferay. The portal-side

of the page can be completely customized. Even the appearance of the portlets that come with

Liferay can be customized using CSS, images, JavaScripts, and special templates.


Liferay Interview Question and Answers
Liferay Interview Question and Answers

Saturday, October 15, 2011

How to install Liferay

First download the community version with tomcat server from the liferay website
or Click Here

Unzip the contents to a suitable location.

Open the bin directory



And click on the startup.bat file to start and shutdown.bat file to shutdown.




To change the server standard time.

Open the setenv.bat in an editor and change the –Duser.timezone

-Duser.timezone=Asia/Calcutta

Restart the Server .




For Database Settings

log into the MySql command line editor. 

mysql> create database `lportal` CHARACTER SET utf8 COLLATE utf8_general_ci;

 create a portal-ext.properties file in \liferay-portal-6.0.6 

Add the following Lines to connect to MySql Database. 

#
# MySQL
#
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEn
coding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root

save and restart.

Check installation success in MySql 

mysql>use lportal ;
mysql>show tables ; 

Liferay UI Tabs

Creating Tabs is a really Cool feature and Liferay has an inbuilt functionality to do so.
Here is how it can be done.
1) In your Project , first create the following files under the following path
/docroot/jsps by creating a new folder called jsps
view.jsp
sunday.jsp
monday.jsp
tuesday.jsp
admin.jsp

code for view.jsp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %>
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@page import="com.liferay.portal.kernel.util.ParamUtil" %>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<liferay-theme:defineObjects />
 
//A renderURL is created because we need to render a jsp page you need to use //renderURL we can also  pass parameters if required
 
<liferay-portlet:renderURL var="portletURL"/>
 
<%
//We must Specify a default value for tabs. In this example it is sunday. Else it //will throw an error.
String tabValue = ParamUtil.getString(request, "tab", "sunday");
String tabsURL = "/jsps/" + tabValue.trim() + ".jsp";
String tabNames="Sunday,Monday,Tuesday" ;
String tabVal="sunday,monday,tuesday" ;
if(permissionChecker.isCompanyAdmin(themeDisplay.getCompanyId())){
tabNames+=",Admin" ;
tabVal+=",admin" ;
}
%>
 
<liferay-ui:tabs
names="<%=tabNames%>"
tabsValues="<%=tabVal%>"
param="tab"
url="<%= portletURL %>"
/>
 
//this wud render the tab page
<c:import url="<%= tabsURL %>"></c:import>

Here is how it would Look Like


The Admin Page Will be Visible only if an Admin Logs in.



To Download the Project click here

Related Posts Plugin for WordPress, Blogger...