1. Download the .ear file and put it in c:\Alfresco and execute below commands for extraction
mkdir alfresco
cd alfresco
jar xvf ../alfresco-enterprise-3.4.0.ear
move alfresco.war alfresco.war.tmp
move share.war share.war.tmp
mkdir alfresco.war
mkdir share.war
cd alfresco.war
jar xvf ../alfresco.war.tmp
cd ../share.war
jar xvf ../share.war.tmp
Thursday, March 31, 2011
WebLogic administration
System administration of WebLogic Server includes a wide range of tasks: creating WebLogic Server domains; deploying applications; migrating domains from development environments to production environments; monitoring and managing the performance of the run-time system; and diagnosing and troubleshooting problems. (A WebLogic Server domain is a collection of WebLogic Server services designed for a specific purpose. For example, you might create one domain to provide an employee portal and another domain to provide business services to your customers.)
WebLogic Server provides several ways to start and stop server instances. The method that you choose depends on whether you prefer using a graphical or command-line interface, and on whether you are using the Node Manager to manage a server's life cycle.
You can start a server instance on any computer on which WebLogic Server has been installed. The server's configuration information always resides in the domain's config.xml file, which is located on the computer that hosts the Administration Server. The first server instance you start in a domain assumes the role of Administration Server. Additional server instances assume the role of Managed Server.
No matter how you start a server, the end result passes a set of configuration options to initialize a Java Virtual Machine (JVM). The server instance runs within the JVM, and the JVM can host only one server instance.
WebLogic Server provides several ways to start and stop server instances. The method that you choose depends on whether you prefer using a graphical or command-line interface, and on whether you are using the Node Manager to manage a server's life cycle.
You can start a server instance on any computer on which WebLogic Server has been installed. The server's configuration information always resides in the domain's config.xml file, which is located on the computer that hosts the Administration Server. The first server instance you start in a domain assumes the role of Administration Server. Additional server instances assume the role of Managed Server.
No matter how you start a server, the end result passes a set of configuration options to initialize a Java Virtual Machine (JVM). The server instance runs within the JVM, and the JVM can host only one server instance.
Tuesday, March 29, 2011
Liferay Tags
Liferay portal tags are JavaServer Pages Standard Tag Library (JSTL) tags. Using Liferay tags has the following two benefits.
You get a complicated feature with only one tag.
Liferay UI tags have been tested. They do not introduce bugs. This saves testing time.
They can be classified as below
Alloy (AUI) tags
Liferay portlet tags
Liferay liferay-portlet tags
Liferay security tags
Liferay theme tags
Liferay UI tags
Liferay utility tags
Liferay portlet tags
com.liferay.taglib.portlet.DefineObjectsTag class is responsible for its interpretation. The result is that the following objects, among others, are set in
the pageContext:
renderRequest
renderResponse
portletPreferences
In this way we can directly use these objects in our portlet JSP file coding
portlet:actionURL
We can use the actionURL tag to dynamically generate a URL in our JSP file and
use it, say, as an action URL for a form.
This tag is interpreted by the com.liferay.taglib.portlet.ActionURLTag class. It generates an action URL string with page layout ID, portlet ID, portlet mode, window state, and layout information. It will also include a parameter name of struts_action with a value of /journal/edit_article. This URL is set as value for an editArticleActionURL variable. Eventually this variable is used as the
action URL for a form as follows:
You get a complicated feature with only one tag.
Liferay UI tags have been tested. They do not introduce bugs. This saves testing time.
They can be classified as below
Alloy (AUI) tags
Liferay portlet tags
Liferay liferay-portlet tags
Liferay security tags
Liferay theme tags
Liferay UI tags
Liferay utility tags
Liferay portlet tags
com.liferay.taglib.portlet.DefineObjectsTag class is responsible for its interpretation. The result is that the following objects, among others, are set in
the pageContext:
renderRequest
renderResponse
portletPreferences
In this way we can directly use these objects in our portlet JSP file coding
portlet:actionURL
We can use the actionURL tag to dynamically generate a URL in our JSP file and
use it, say, as an action URL for a form.
This tag is interpreted by the com.liferay.taglib.portlet.ActionURLTag class. It generates an action URL string with page layout ID, portlet ID, portlet mode, window state, and layout information. It will also include a parameter name of struts_action with a value of /journal/edit_article. This URL is set as value for an editArticleActionURL variable. Eventually this variable is used as the
action URL for a form as follows:
Monday, March 28, 2011
localization of Web Content in Liferay
Liferay has built-in support for localization of web contents in some of the out-of-box portlets such as Web Content portlet.
A user needs to create a new article with contents in the default language first and save it. The user can then edit the article, select a different language in the Language drop down, and then add the localized content by using the WYSIWYG online editor.
A user needs to create a new article with contents in the default language first and save it. The user can then edit the article, select a different language in the Language drop down, and then add the localized content by using the WYSIWYG online editor.
Status command of mysql
mysql> create database lportal character set utf8 collate utf8_bin;
mysql> use lportal;
mysql> status;
The status comman will display the below details.
mysql Ver 14.14 Distrib 5.1.44, for Win32 (ia32)
Connection id: 3
Current database: lportal
Current user: root@localhost
SSL: Not in use
Using delimiter: ;
Server version: 5.1.44-community MySQL Community Server (GPL)
Protocol version: 10
Connection: localhost via TCP/IP
Styling Pages
[ 100 ]
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
TCP port: 3306
Uptime: 45 min 51 sec
Threads: 1 Questions: 12 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 0 Queries per
second avg: 0.4
--------------
mysql>
mysql> use lportal;
mysql> status;
The status comman will display the below details.
mysql Ver 14.14 Distrib 5.1.44, for Win32 (ia32)
Connection id: 3
Current database: lportal
Current user: root@localhost
SSL: Not in use
Using delimiter: ;
Server version: 5.1.44-community MySQL Community Server (GPL)
Protocol version: 10
Connection: localhost via TCP/IP
Styling Pages
[ 100 ]
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
TCP port: 3306
Uptime: 45 min 51 sec
Threads: 1 Questions: 12 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 0 Queries per
second avg: 0.4
--------------
mysql>
Getting CMISObject from nodeRef of Alfresco
/**
*
*/
package com.packtpub.a3ws.samples.chemistry;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.chemistry.opencmis.client.api.Folder;
import org.apache.chemistry.opencmis.client.api.ObjectId;
import org.apache.chemistry.opencmis.client.api.Repository;
import org.apache.chemistry.opencmis.client.api.Session;
import org.apache.chemistry.opencmis.client.api.SessionFactory;
import org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl;
import org.apache.chemistry.opencmis.commons.SessionParameter;
import org.apache.chemistry.opencmis.commons.enums.BindingType;
/**
* @author basanagowda.patil
*
*
*/
public class GettingFolders {
private static Session getSession(String serverUrl, String username, String password) {
SessionFactory sessionFactory = SessionFactoryImpl.newInstance();
Map params = new HashMap();
params.put(SessionParameter.USER, username);
params.put(SessionParameter.PASSWORD, password);
params.put(SessionParameter.ATOMPUB_URL, serverUrl);
params.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
List repos = sessionFactory.getRepositories(params);
if (repos.isEmpty()) {
throw new RuntimeException("Server has no repositories!");
}
return repos.get(0).createSession();
}
/**
* @param args
*/
public static void main(String[] args) {
String serverUrl = "http://localhost:8080/alfresco/service/cmis";
String username = "admin";
String password = "admin";
Session session = getSession(serverUrl, username, password);
Folder root = session.getRootFolder();
System.out.println("The root folder is :::"+ root.getId());
//Create the folder(Wiki, inside Wiki images) under CompanyHome
Folder wikiImagesFolder = (Folder) session.getObjectByPath("/Wiki/images");
System.out.println("Illustrating how to construct the CMISObject from the noderef");
System.out.println("The folder ref of the image created is::"+ wikiImagesFolder.getId());
ObjectId parentId = session.createObjectId(wikiImagesFolder.getId());
Folder wikiImagesFolder1 = (Folder) session.getObject(parentId);
System.out.println("Reconstructed the CMisobject from the nodeRef:::"+ wikiImagesFolder1.getId());
}
}
*
*/
package com.packtpub.a3ws.samples.chemistry;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.chemistry.opencmis.client.api.Folder;
import org.apache.chemistry.opencmis.client.api.ObjectId;
import org.apache.chemistry.opencmis.client.api.Repository;
import org.apache.chemistry.opencmis.client.api.Session;
import org.apache.chemistry.opencmis.client.api.SessionFactory;
import org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl;
import org.apache.chemistry.opencmis.commons.SessionParameter;
import org.apache.chemistry.opencmis.commons.enums.BindingType;
/**
* @author basanagowda.patil
*
*
*/
public class GettingFolders {
private static Session getSession(String serverUrl, String username, String password) {
SessionFactory sessionFactory = SessionFactoryImpl.newInstance();
Map
params.put(SessionParameter.USER, username);
params.put(SessionParameter.PASSWORD, password);
params.put(SessionParameter.ATOMPUB_URL, serverUrl);
params.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
List
if (repos.isEmpty()) {
throw new RuntimeException("Server has no repositories!");
}
return repos.get(0).createSession();
}
/**
* @param args
*/
public static void main(String[] args) {
String serverUrl = "http://localhost:8080/alfresco/service/cmis";
String username = "admin";
String password = "admin";
Session session = getSession(serverUrl, username, password);
Folder root = session.getRootFolder();
System.out.println("The root folder is :::"+ root.getId());
//Create the folder(Wiki, inside Wiki images) under CompanyHome
Folder wikiImagesFolder = (Folder) session.getObjectByPath("/Wiki/images");
System.out.println("Illustrating how to construct the CMISObject from the noderef");
System.out.println("The folder ref of the image created is::"+ wikiImagesFolder.getId());
ObjectId parentId = session.createObjectId(wikiImagesFolder.getId());
Folder wikiImagesFolder1 = (Folder) session.getObject(parentId);
System.out.println("Reconstructed the CMisobject from the nodeRef:::"+ wikiImagesFolder1.getId());
}
}
Alfresco CMIS support for Custom types
As of noe CMIS 1.0 spec does not support the custom content types used in alfresco.
refer to the below link
http://forums.alfresco.com/en/viewtopic.php?f=45&t=37645
Re: Defining custom metadata types through CMIS.
Postby fmui » 08 Mar 2011, 11:16
Hi,
There are two answers:
1) Creating new custom types through CMIS is not possible at this time because it is not part of the CMIS 1.0 standard.
This going to change with CMIS 1.1. The next revision of the standard will define type creation, modification and deletion.
The CMIS 1.1 specification will hopefully be completed in late summer and Alfresco will have an implementation shortly aft that.
2) You can set up a dynamic model through CMIS: http://wiki.alfresco.com/wiki/Dynamic_Models
Create the model document with type "cm:dictionaryModel" and set the property "cm:modelActive" to true.
This, of course, is Alfresco specific and will not work with other repositories.
- Florian
refer to the below link
http://forums.alfresco.com/en/viewtopic.php?f=45&t=37645
Re: Defining custom metadata types through CMIS.
Postby fmui » 08 Mar 2011, 11:16
Hi,
There are two answers:
1) Creating new custom types through CMIS is not possible at this time because it is not part of the CMIS 1.0 standard.
This going to change with CMIS 1.1. The next revision of the standard will define type creation, modification and deletion.
The CMIS 1.1 specification will hopefully be completed in late summer and Alfresco will have an implementation shortly aft that.
2) You can set up a dynamic model through CMIS: http://wiki.alfresco.com/wiki/Dynamic_Models
Create the model document with type "cm:dictionaryModel" and set the property "cm:modelActive" to true.
This, of course, is Alfresco specific and will not work with other repositories.
- Florian
Subscribe to:
Posts (Atom)
