15
SIDE-Labs for Alfresco A BlueXML Open Source Project Getting Started - Tutorial (Version 0.1)

SIDE Getting Started Tutorial

  • Upload
    jck1307

  • View
    249

  • Download
    1

Embed Size (px)

Citation preview

Page 1: SIDE Getting Started Tutorial

SIDE-Labs for AlfrescoA BlueXML Open Source Project

Getting Started - Tutorial

(Version 0.1)

Page 2: SIDE Getting Started Tutorial

Copyright, Trademark, and Version NoticesCopyright Notice Copyright © 2005-2011 BlueXML

All rights reserved. Information relating to the architecture and software described in this guide is proprietary to BlueXML and, as applicable, its licensors. Rights to use the software and the accompanying documentation are governed by a separate license agreement from BlueXML presented prior to software installation. Information in this document is subject to change without notice. No part of this guide may be reproduced or published in any form or by any means, electronic or mechanical, including photocopying, for any purpose other than the purchaser's personal use.

Trademark Notice

BlueXML, SIDE, KerBlue are trademarks or service marks of BlueXML. Other company and product names may be the trademarks or service marks of third parties. Third party software is installed as distinct, unmodified software programs during the SIDE platform installation process. Licensing information pertaining to those third party programs is available on the SIDE Installation package.

Document and Software Versions

• Document Version 1.3

• Software Version 1.0 & 2.0

Page 3: SIDE Getting Started Tutorial

3

BlueXML - SIDE SIDE Getting Started Guide

TABLE OF CONTENTSTEP 1 : PROJECT INITIALIZATION.............................................................................................................. 4

PROJECT CREATION.................................................................................................................................................... 4DATA MODEL CREATION.............................................................................................................................................5INITIALIZATION, GENERATION AND DEPLOYMENT............................................................................................................ 6TEST AND ENJOY........................................................................................................................................................8

Create a new site...............................................................................................................................................8Add a document.................................................................................................................................................8Search for documents......................................................................................................................................10Data List..........................................................................................................................................................12

BlueXML - Copyright 2011

Page 4: SIDE Getting Started Tutorial

STEP 1 : PROJECT INITIALIZATION

Project CreationWe want to create an application to manage invoices. At the end of this tutorial, we'll have two applications:

• Alfresco Share application

• Domain Specific Application, based on ExtJS

Follow these steps to create a new project inside SIDE:

• Launch SIDE

• Go to File/New.../Project.../SIDE

• Choose SIDE

• Click Finish. SIDE will create a project with a complete directory structure

The build directory will contain generated files and log report about the generation and deployment process.

Page 5: SIDE Getting Started Tutorial

5

BlueXML - SIDE SIDE Getting Started GuideThe src/configs will will contain configuration files that need to be directly deployed in Alfresco, such as alfresco-shared.properties

The src/models directory will contain models:

• application model, to configure generation and deployment options

• data model, to design data structure and storage

• form model, to design form

• portal model, to design the application

• view model, to design queries and views

• workflow model, to design processes with actors, tasks, transitions, …

The src/modules directory will contain maven projects, which may be managed through SIDE (packaged as amp files, deployed automatically, patched to alfresco.war and share.war), ...

Data Model CreationLet's create a Data Model for our invoice management application:

• Open your “InvoiceManagement” project

• Open your 'src/models' folder

• Right click on 'data' folder and select File / New / Other...

• Open 'SIDE' folder

• Select 'Side Data Diagram'

We want to make a complete example, not too complicated. We'll just add 2 classes or content types:

BlueXML - Copyright 2011 Step 1 : Project Initialization

Illustration 1: SIDE Model Creation

Page 6: SIDE Getting Started Tutorial

6

BlueXML - SIDE SIDE Getting Started Guide• Invoice, which is a true content type, with a content. This class inherits Alfresco cmcontent.

• Company, which is a content less type, what could be called a data list. Company is only made of meta-data, no content at all. This class inherits Alfresco dataListItem.

Initialization, Generation and DeploymentWe're going to initialize the form, view and application model directly from data model:

• Select your .dt data model

• Right-click and choose Initialize Models

Be careful to select your TOMCAT_HOME and not Alfresco home. Otherwise, you will have a deployment error.

By clicking on Finish, various models will be created. You will finish on this screen:

BlueXML - Copyright 2011 Step 1 : Project Initialization

Page 7: SIDE Getting Started Tutorial

7

BlueXML - SIDE SIDE Getting Started Guide

You have now the following directory layout:

BlueXML - Copyright 2011 Step 1 : Project Initialization

Page 8: SIDE Getting Started Tutorial

8

BlueXML - SIDE SIDE Getting Started GuideOnce clicked, the generation process will be launched automatically if you chose the “Launch Generation” option. Otherwise, you still can launch the generation process by hand:

• Select your application model

• Right-click on it and choose SIDE/Launch Generation/InvoiceManagement

Test and enjoy

Create a new siteGo and connect on your Alfresco Share server:

• Open your browser

• Go to http://localhost:8080/share

• Create a new site, based on the InvoiceManagement template we just created:

Add a documentYou are now in your Invoice Management site.

• Go to the Document library

• Create a new folder called Suppliers

• Go into it

• Click on Add a document

• Choose your document

• Select your document content type. Choose Invoice.

BlueXML - Copyright 2011 Step 1 : Project Initialization

Page 9: SIDE Getting Started Tutorial

9

BlueXML - SIDE SIDE Getting Started Guide

• Click on Add a file

You can see all the Invoice meta data on the screen. We'll see in step 2 how to customize view models and select only the ones you want.

• Click on Edit metadata

All the aspects are available as tabs. The complete layout may be changed to use panels, bordered panels, … You can express all the share-form configuration. Associations are available as browse buttons. The associations may be changed to use drop plain down lists, checkbox list If cardinality is > 1, radio list otherwise. We'll see in Step 2 how to customize forms.

BlueXML - Copyright 2011 Step 1 : Project Initialization

Page 10: SIDE Getting Started Tutorial

10

BlueXML - SIDE SIDE Getting Started Guide

• Click on the document you just updated

The create form is also used in view mode.

Search for documentsBesides create forms, search forms have also been generated.

• Click on Advanced Search near the search engine icon

BlueXML - Copyright 2011 Step 1 : Project Initialization

Page 11: SIDE Getting Started Tutorial

11

BlueXML - SIDE SIDE Getting Started Guide

• Choose the search form you are interested in

BlueXML - Copyright 2011 Step 1 : Project Initialization

Page 12: SIDE Getting Started Tutorial

12

BlueXML - SIDE SIDE Getting Started Guide

Data ListGo to Invoice Management site home page

• Click on Data List

• Click on New List, choose the one you want and name it “Suppliers”

BlueXML - Copyright 2011 Step 1 : Project Initialization

Page 13: SIDE Getting Started Tutorial

13

BlueXML - SIDE SIDE Getting Started Guide

• An empty datagrid appears

• Click on New Item and fill in the details

• An element now appears in the datagrid

BlueXML - Copyright 2011 Step 1 : Project Initialization

Page 14: SIDE Getting Started Tutorial

14

BlueXML - SIDE SIDE Getting Started Guide

All the available elements are displayed by default. You will see in step 2 how to customize the fields you want to display.

If you come back in your document library and update your invoice, you can now select the company you just created in a drop down list.

It's time now to update your form and views to exactly suit your needs.

BlueXML - Copyright 2011 Step 1 : Project Initialization

Page 15: SIDE Getting Started Tutorial

15

BlueXML - SIDE SIDE Getting Started Guide

BlueXML - Copyright 2011 Step 1 : Project Initialization