Difference between revisions of "Home Library 1.0 API"

From Gcube Wiki
Jump to: navigation, search
(Working with Home Library)
(Replaced content with "This page refers to Home Library 1.0 API that is not supported anymore. Please, use the following redirect for Home Library 2.0 API: #REDIRECT Home Library 2.0 API Fra...")
 
(70 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{UnderUpdate}}
+
This page refers to Home Library 1.0 API that is not supported anymore.
The Home Library manage and persist the users homes.
+
  
==Architecture==
+
Please, use the following redirect for Home Library 2.0 API:
The ''user's homes'' are organized in scopes.
+
  
The users and the homes for a specific scope are managed by the '''HomeManager'''.
+
#REDIRECT [[Home Library 2.0 API Framework Specification]]
 
+
Each user home ('''Home''') have a workspace area ('''WorkspaceArea''') and a data area ('''DataArea''').
+
 
+
[[Image:homelibrary-architecture.png|frame|center|Figure 1. Home Library Reference Architecture]]
+
 
+
===Workspace Area model===
+
The figure 2 illustrate the Workspace Area model.
+
 
+
[[Image:homelibrary-workspacearea-model.png|frame|center|Figure 2. Workspace Area model]]
+
 
+
Each element contained in a workspace area is a '''WorkspaceAreaItem'''.
+
 
+
There are two kind of item container: the '''Workspace''' and the '''Basket''', both can be referred as '''WorkspaceFolder'''.
+
 
+
A workspace can contain one or more workspacefolder.
+
 
+
A basket can contain only '''BasketItems'''.
+
 
+
The basket items are the effective user objects.
+
 
+
The figure 3 illustrate the BasketItem model.
+
 
+
[[Image:homelibrary-basketitem-model.png|frame|center|Figure 3. Basket Item model]]
+
 
+
==Working with Home Library==
+
===Installation===
+
To use the HomeLibrary you first need the HomeLibrary downloadable from:
+
* [https://grids16.eng.it/BuildReport/list/Recent_Builds] last night build
+
* [http://software.d4science.research-infrastructures.eu/] gcube distribution site
+
 
+
Add the org.gcube.portlets.user.homelibrary.jar file to your gcore installation (''$GLOBUS_PATH/lib'' folder).
+
 
+
====Dependecies====
+
The home library require some library to be used:
+
*xstream-1.3.1.jar XML serialization (XStream)
+
*xpp3_min-1.1.4c.jar XML serialization (XStream)
+
*bcprov-ext-jdk15-141.jar manipulate pdf
+
*iText-2.1.4.jar manipulate pdf
+
*ij140g.jar manipulate images
+
 
+
Add those libraries to your gcore installation (''$GLOBUS_PATH/lib'' folder).
+
 
+
===Configuration===
+
To be used the Home Library need a folder where create a persistence dir.''For test use is not necessary to configure it.''
+
 
+
There are different way to specify the base dir where create the persistence dir:
+
# set the HOME_LIBRARY_PERSISTENCE_DIR environment variable
+
# set the system property catalina.base (generically set by tomcat), then the "catalina.base/webapps/usersArea" is used a base dir
+
# If none of preceding properties is specified the system tmp directory is used a base dir. ''Make attention, sometime the tmp folder is delete at system reboot, use it only for test''.
+
 
+
Inside the base dir a home_library_persitence dir is created and used.
+
 
+
 
+
===How to retrieve an User WorkspaceArea from a servlet===
+
To retrieve a WorkspaceArea for a User you can use the getWorkspaceArea static method from HomeLibrary class. This method required only the current D4ScienceSession.
+
 
+
<source lang="java5">
+
WorkspaceArea wa = HomeLibrary.getUserWorkspaceArea(session);
+
</source>
+
 
+
==References==
+
The most recent presentation about the Home Library can be found there:
+
http://bscw.research-infrastructures.eu/bscw/bscw.cgi/d107608/06.%20HomeLibrary.ppt
+

Latest revision as of 17:54, 7 July 2016

This page refers to Home Library 1.0 API that is not supported anymore.

Please, use the following redirect for Home Library 2.0 API:

  1. REDIRECT Home Library 2.0 API Framework Specification