SwingDashboard Installation Guide - The UK Mirror Service

diligencebusinessInternet and Web Development

Dec 7, 2013 (3 years and 6 months ago)

156 views

www.sw
i

Switzerl
a
i
ssinfogroup.c

a
nd

om
SWISS
I
43, Rou
T +41
(0

Sw
i
i
ngDa
s
v1
.
I
nformation G
te des Acacias

0)
22 979 35 45 –
D
roup SA

– 1227 Les Aca
c
F +41
(
0
)
22 97
9
D
evel

c
ias / Geneva

9
35 20 – E info
@

s
hbo
a
.
3

a
rd




opm


ent
G











Switzerland
@
swissinfo
g
roup.



com

G
uid
e
e



Development Guide



2


1. Prerequisites installation Page 3


2. Source & Runtime installation Page 4


3. Database configuration Page 5


4. NetBeans Configuration Page 6


5. Liferay server configuration Page 9


6. Starting the Liferay server Page 12


7. Testing the application Page 14





Development Guide



3


1. Prerequisites installation



Before installing all prerequisites required for developping SwingDashboard application, you should
check if your workstation matches the following criteria:

• Microsoft Windows 7
• At least 4 GBytes of memory
• At least 100 MBytes of free disk space


Then, you should install the following components in order to create a developing environnement:

• Java v6.0.18: Java Development Kit
• NetBeans IDE v6.8 Development Environnement
• MySql Server v5.1.45: Database server engine
• MySql Administrator v5.1.45: MySql administration console
• MySql Query Browser v5.1.45: MySql query engine
• Liferay Portal v5.2.1: Liferay Portal Environnement


Each component should be properly installed and configured by following standard procedure
provided by each editor.










2. S
o




First y
o








By do
i
the C
:

The ru
confi
g

The s
o
man
a



o
urce & Ru
n
De
v
v
elop
m
m
en
t
t
Gui
d
d
e

o
u need to
The runti
m

http://so
u
bin.zip/d
o

Which sh
o

C:\Users
\


The appli
c

http://so
u
src.zip/d
o

Which sh
o

C:\Users
\
i
ng so, you
s
:
\Users\Pu
b
ntime fold
e
g
ured and
w
o
urces fold
e
a
ged within
n
time install
download,

m
e environ
m
u
rceforge.n
e
o
wnload

o
uld be ext
r
\
Public\Swi
c
ations sou
r
u
rceforge.n
e
o
wnload

o
uld be ext
r
\
Public\Swi
s
hould get
t
b
lic folder (r
i
e
r contains
L
w
ebapplic
a
e
r contains
a
NetBean a
n
ation

from the s
o
m
ent, requir
e
e
t/projects
/
r
acted in f
o
ngDashbo
a
r
ces imple
m
e
t/projects
/
r
acted in f
o
ngDashbo
a
t
he followi
n
i
ght snapsh
L
iferay Port
a
a
tions depl
o
a
ll applicat
i
n
d deploy
o

o
urceforge
s
e
d to run S
w
/
swingdash
b
o
llowing fol
d
a
rd\runtim
e
m
enting the

/
swingdash
b
o
llowing fol
d
a
rd\source
s
n
g structure

ot).
a
l properly
o
yed from I
D
i
on sources

o
n deman
d
s
ite, the foll
o
w
ingDashb
o
b
oard/files
/
d
er:
e


applicatio
n
b
oard/files
/
d
er:
s


under
D
E.

d
.
o
wing two
f
o
ard within
/
bin/Swing
D
n
itself
/
src/Swing
D
f
iles:
NetBean I
D
D
ashboard-
v
D
ashboard-
v
D
E
v
1.3.11-
v
1.3.11-
4





3. D
a




In ord
e
prop
e

Step
O

The fir
s
(cont
a
obtai
n

You s
h
sche
m

Curre
n
to ha
v

Step T
w

The s
e

For thi
folder


You j
u




a
tabase co
n
De
v
v
elop
m
m
en
t
t
Gui
d
d
e

e
r to initiali
z
e
r data.
O
ne: datab
a
s
t step is to
a
ining dash
n
following
s
h
ould also
c
m
as.
n
tly, defaul
t
v
e full acc
e
w
o: datab
a
e
cond step
s purpose,
a
:
C:\Users\
u
st to launc
h
n
figuration
z
e MySql d
a
a
se schem
a
create two
board dat
a
s
tate:
c
reate an a
t
SwingDas
h
e
ss on these

a
se script in
i
is to initializ
e
a
script na
m
Public\Swi
n
h
this script,

a
tabase, yo
u
a
creation
schemas,
n
a
). With the

dmin user
w
h
board’s c
o

two sche
m
i
tialization
e
both sch
e
m
ed Swing
D
n
gDashboa

within MyS
q
u
should fir
s
n
amed lpo
r

M
ySql Ad
m
w
ith proper
o
nfiguratio
n
m
as.
e
mas with d
D
ashboard
C
rd\runtime
\
q
l Query Br
o
s
t create tw
r
tal (contai
n
m
inistrator T
o
privileges g
n
required a
efault infor
m
C
ommunit
y
\
database
s
o
wse
r
, to ini
o schemas

n
ing Liferay

o
ol you ca
n

iving him f
u
user ‘admi
m
ation.
y
Edition.sql
s

tialize the
d

and initiali
z

data) and
n
manually
c
u
ll access o
n
n’ with pas
s
is provided

z
e them wit
h
h

swing
c
reate the
m
m
to
n
these two


s
word ‘ad
m
m
srv’

in the follo
w
w
ing
d
atabase.
5







4. N
e




After
d
and
c

Once

>Ope


These



You s
h

Now i
t

To do


Then,


e
tBeans co
n
De
v
v
elop
m
m
en
t
t
Gui
d
d
e

d
atabase i
n
c
onfigure th
e

NetBeans
h
n Project):
• Swing
A
• Swing
C
• Swing
• Swing
S
• Swing
-

projects ar
e
C:\Users
\
h
ould obtai
n
t
’s time to
c

so, you first

for each p
r
n
figuration
n
itialization,

e
m.
h
as been st
a
A
dmin
C
onnecto
r

Dashboard

S
ervices
-
theme-bi
e
all locate
\
Public\Swi
n
n
the follo
w
c
onfigure li
b

need to d
e
r
oject, you
c

you need
t
a
rted, you
c


d in the foll
o
n
gDashbo
a
w
ing NetBe
a
b
raries used

e
fine globa
l
c
an specif
y

t
o start the
N
c
an open t
h
o
wing fold
e
a
rd\source
s
a
ns configu
r

by each p
r
l
libraries us
e
y
which libr
a
N
etBeans e
h
e followin
g
e
r:
s

r
ation:
r
oject.
e
d by all pr
a
ry is requir
e
nvironnem
e
g
project w
i

ojects (Me
n
e
d to comp
e
nt to regis
t
i
thin NetBe
a
n
u Tools->Li
b
ile sources.

t
er all proje
c
c
ts
a
ns (Menu
F
F
ile-
b
raries).

6


De
v
v
elop
m
m
en
t
t
Gui
d
d
e

• St
e
e
p one: defining glob
a
a
l libraries

Al
l
l
libraries re
q
q
uired for S
w
w
ingDashboard are lo
c
c
ated in fo
l
l
der :

C:\Users
\
\
Public\Swi
n
n
gDashbo
a
a
rd\runtim
e
\libraries

N
o


F
o

Y
o
Th

R
e
pl
u

H
e




o
w, for eac
h
o
r instance
h
1. Go to

2. Click
o
3. Speci
f
4. Selec
t
5. Click
o
6. Now
a

o
u should o
b
e Commo
n
e
peat previ
o
u
gins and
p
e
re are the
• Com
m
• Expor
t
• Jason
• Lifera
y
• Log4j
• Mail
• Quart
z
• Servle
h
subfolder
,
h
ere are th
e

Menu Tool
s
o
n ‘New Li
b
f
y the librar
y
t
the library
o
n the OK
b
a
dd in the
c
b
tain the f
o
n
s library ha
s
o
us steps f
o
p
reprocess
o
library list t
o
m
ons
t
e
r


y

z

t
,
you shoul
d
d
create an associate
d
d
library wit
h
h
in NetBea
n
n
s.
e
steps to f
o
s
->Libraries

b
rary’
y
name ‘C
o
type as ‘Cl
a
b
utton
c
lasspath al
o
llowing sna
s
been fully

o
r all folders

o
r, which ar
e
o
create wit
o
llowing in
o
o
mmons’
a
ss libraries

l jar files loc
pshot:

created.

located u
n
e
used late
r
hin NetBea
n
o
rder to cre
a


ated in run
t
n
der \runti
m
r
on this do
c
n
s:
a
te the ‘C
o
o
mmons’ library:
t
ime\librari
e
e
s\commons

m
e\libraries,

c
ument.
except for


subfolder
7

Development Guide



8
• Step two: configuring libraries for swing projects

Once global libraries have been created, you should specify which library is used by each
project.

To do so, you just need to add library references in each Swing project in the following manner:

SwingAdmin project

• Portlet 2.0 (JRS 286) Library
• Commons


SwingConnector project

• Portlet 2.0 (JRS 286) Library
• Java EE Web 6 API Library
• Commons
• Log4j
• Liferay

SwingDashboard project

• Portlet 2.0 (JRS 286) Library
• Commons
• Exporter

SwingServices project

• Quartz
• Mail
• Commons
• Log4j










5. Li
f



After l

In ord
e
runti
m




f
eray serve
r
De
v
v
elop
m
m
en
t
t
Gui
d
d
e

ibraries co
n
e
r to defin
e
m
e/libraries
f
Step one:


Go to th
e
Click on t
h
Select all
And click

Finally, cli
c
r
configurat
n
figuration,
y
e
a new ser
v
f
older).

install lifer
a
e
menu Tool
h
e ‘Add Pl
u
files in C:\
U

on the ‘O
p
c
k on the ‘I
ion
y
ou need t
o
v
er instanc
e
a
y plugin
s->Plugins
a
u
gins…’ but
t
U
sers\Public
p
en’ button

nstall’ butt
o

o
define wi
t
e
, you first n
e
a
nd select
D
t
on
\SwingDas
h

o
n to install
a
t
hin NetBe
a
e
ed to inst
a
D
ownloade
d
h
board\lib
r

a
ll plugin’s
c
a
ns a Lifera
y
a
ll the Lifer
a
d
tab:

r
airies\plug
i
c
omponen
y
server inst
a
a
y plugin (p
r
i
ns\ portal
p
ts
a
nce.
r
ovided in
p
ack_3_0_3
_
_
all\
9


Step two:


Go the m
Add a ne
w
Select th
e
On the S
e
On Catal
i
C:\Users
\

Click on ‘
Click on ‘

Finally ch
a
C:\Users
\

And click




define a n
e
enu Windo
w
w
server wi
t
e
Liferay Po
r
e
rver Type s
e
i
na Home,
e
\
Public\Swi
n
Next’ butto
Finish’ butt
o
a
nge Auto
\
Public\Swi
n

on ‘Apply’

De
v
v
elop
m
m
en
t
t
Gui




e
w liferay s
e
w
->Service
s
t
h mouse ri
g
r
tal Server 5
e
lect ‘Tom
c
e
nter follo
w
n
gDashbo
a
n
o
n
Deploy Dir
t
n
gDashbo
a

button

e
rve
r

s
and expa
n
g
ht-click ‘A
d
.1.x/5.2.x a
n
c
at 6.x’:
w
ing path:
a
rd\runtime
t
o followin
g
a
rd\runtime
n
d server ‘S
d
d server…
n
d click on
\
liferay-po
r
g
path:
\
liferay-po
r
ervers’
.’:

‘Next’

r
tal-5.2.1\to
r
tal-5.2.1\d
e
mcat-6.0.1
8
e
ploy
d
8

d
e
10



• St
e

If
y
m
a

H
e








e
p three: lif
e
y
ou have u
s
a
nually ad
a
e
re are all r
e
dashboa
r
use to de
f
for the c
h
server.x
m
Use to ch
o

Example:

Don’t for
g





setenv.b
a
The syste
m

De
v
v
elop
m
m
en
t
t
Gui
d
d
e

e
ray configuration
s
ed a differ
e
a
pt SwingD
a
e
nt installa
t
a
shboard
d
t
ion path th
d
efault con
f
an the one

f
iguration.

specified i
n
n
this manu
a
a
l, you sho
u
u
ld
e
levant co
n
n
figuration
p
p
arameters


that need
t
t
o be ada
p
p
ted:
r
d.propertie
f
ined the u
r
h
arts
s located i
n
r
l server an
d
n
%CATALI
N
d
several p
a
N
A_HOME%
\
a
th use in th
\
conf
e applicati
o
o
n like the
t
t
emplate f
o
o
lder
m
l located i
n
o
ose the p
o

define por
t
g
et to chan
portal-ex
t
Use to de
f
a
t located i
n
m
root path

t
.properties

f
ined lifera
y
n
%CATALIN
o
rts that th
e
t
applicatio
ge the url s
e
n
%CATALI
N

definition,
c

located in
y
language
,

A_HOME%
\
e
applicatio
n line 68
e
rver in the

N
A_HOME%
\
c
hange it if

%CATALIN
A
,
liferay dat
a
\
conf
n use

previous fil
e
\
bin

you move
e

the applic
a
a
tion
A
_HOME%
\
a
base lpor
t
\
webapps\
t
al and oth
e
ROOT\WEB
e
rs liferay’s
a
-INF\class
e
a
ttributes
e
s
11






6. St
a




Befor
e
itself.

• St
e

Go to

NetB
e

You s
h
chap
t
To sta
r

Durin
g
Finall
y


the s
e

a
rting the L
e
testing th
e
e
p one: sta
r

menu Win
d
e
ans.
h
ould see t
h
t
er:
r
t the serve
r
g
a few sec
o
y
, when the

De
v
v
elop
m
m
en
t
t
Gui
d
d
e

[PluginPa
c
e
rver is con
s
iferay serv
e
e
SwingDas
h
r
t the appli
c
d
ow->Servi
c
h
e ‘Liferay
P
r
, you just n
e
o
nds, you
w

following
m
c
kageUtil:1
1
s
idered as r
e
er

h
board ap
p
c
ation serv
e
c
es, and cli
c
P
ortal Serve
r

e
ed to righ
t
w
ill see lots
o
m
essage is
d
1
41] Reloa
d
e
ady and
w
p
lication, y
o
er

c
k on the S
e
r
5.1.x/5.2.x

t
-click the
m
o
f message

d
isplayed:
d
ing reposit
o
w
aiting for
u
o
u need, of

e
rvers nod
e

instance t
h
m
ouse on t
h

within the
c
o
ries
u
ser loggin
g

course, to
s
e
to expan
d
h
at you ha
v
h
e server an
c
onsole log
s

g
.
s
tart the Lif
e
d
all server
d
v
e configur
e
d select th
e
e
Ray Serve
r
r

d
efined wit
h
h
in
e
d in previ
o
o
us
e
‘Start’ menu.
s
:
12

Development Guide



13

• Step two: deploying web applications

Once the server is started for the first time, no application has yet been deployed on it.

So, to test the application, you first need to deploy each webapp which compound the
SwingDashboard into the server. To do so, just deploy each following project:

• SwingAdmin
• SwingDashboard
• SwingServices
• Swing-theme-bi

That’s it ! We are now ready to test the application










7. T
e




To tes
t



Then
t

And y


Enjoy


And
d

supp
o




e
sting the a
p
De
v
v
elop
m
m
en
t
t
Gui
d
d
e

t
the appli
c
http://loc
t
he login p
a
ou can no
w

user = de
m
password

your tests !!

d
on’t forget

o
rt@swissinf
o
p
plication
c
ation, you
j
alhost:8080
/
a
ge will be
d
w
log-in to t
m
o

= demo.


to send-us
o
group.co
m
j
ust need t
o
/

d
isplayed:

he applica
t
your feedb
m

o
launch yo
u
t
ion with th
e
ack at this
a
u
r favourite

e
following
c
a
ddress:

browser wi
c
redentials
th the follo
w
:
w
ing URL:

14