InterviewSolution
| 1. |
How Can You Integrate Liferay With An External Content Management System (e.g. Alfresco)? |
|
Answer» Liferay passes USER credentials through CMIS to the alfresco in order to connect. To ENABLE this in liferay, we need to enter following below property in portal-ext.properties which will allow liferay to store password in session. session.store.password=true Also one more thing we need to take into consideration is that Liferay passes logged in user's credentials to CMIS Repository (WHIHC is alfresco here) as described above. What this means is that userid/password in liferay must match userid/password in Alfresco. Alfresco by default uses a loginid (which is similar to screen-name in liferay) to authenticate user. So we need to make liferay also authenticate using screen name by MAKING following entry into portal-ext.properties. company.security.auth.type=screenName So we need to start Liferay. Login as administrator and go to control panel. we need to go to Document and Media which will bring up a screen where we need to click on Add -> New Repository. this will bring one screen where we basically provide connection details to connect to Alfresco like below. Name: Give any name you want to give to your repository view in liferay. For example, I will give Alfresco repository name. Description: A brief description about it. Repository Type: We can connect either using AtomPub or using web services. AtomPub URL: This will be the CMIS repository URL where our alfresco is running. In our case, it's would be http://localhost:8080/alfresco/service/api/cmis (Note: In case of Alfresco 4.0, it will be http://host:port/alfresco/cmisatom). Repository ID: It is basically used to connect to a specific repository incase we have MULTIPLE repositories available. If we do not enter a repositoryId, then it will just look for the first repository using the given parameters and set it to that. Liferay passes user credentials through CMIS to the alfresco in order to connect. To enable this in liferay, we need to enter following below property in portal-ext.properties which will allow liferay to store password in session. session.store.password=true Also one more thing we need to take into consideration is that Liferay passes logged in user's credentials to CMIS Repository (whihc is alfresco here) as described above. What this means is that userid/password in liferay must match userid/password in Alfresco. Alfresco by default uses a loginid (which is similar to screen-name in liferay) to authenticate user. So we need to make liferay also authenticate using screen name by making following entry into portal-ext.properties. company.security.auth.type=screenName So we need to start Liferay. Login as administrator and go to control panel. we need to go to Document and Media which will bring up a screen where we need to click on Add -> New Repository. this will bring one screen where we basically provide connection details to connect to Alfresco like below. Name: Give any name you want to give to your repository view in liferay. For example, I will give Alfresco repository name. Description: A brief description about it. Repository Type: We can connect either using AtomPub or using web services. AtomPub URL: This will be the CMIS repository URL where our alfresco is running. In our case, it's would be http://localhost:8080/alfresco/service/api/cmis (Note: In case of Alfresco 4.0, it will be http://host:port/alfresco/cmisatom). Repository ID: It is basically used to connect to a specific repository incase we have multiple repositories available. If we do not enter a repositoryId, then it will just look for the first repository using the given parameters and set it to that. |
|