4A Server -
2.0
Main Page
Packages
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Enumerator
DrupAuthServerMain.java
Go to the documentation of this file.
1
/*
2
* Project: Server for annotations sharing
3
* Author: Ing. Jaroslav Dytrych idytrych@fit.vutbr.cz
4
* File: DrupAuthServerMain.java
5
* Description: Backbean for page with administration of drupal authorization servers
6
*/
7
8
/**
9
* @file DrupAuthServerMain.java
10
*
11
* @brief Backbean for page with administration of drupal authorization servers
12
*/
13
14
package
cz.vutbr.fit.knot.annotations.web;
15
16
import
cz.vutbr.fit.knot.annotations.app.AppBean
;
17
import
cz.vutbr.fit.knot.annotations.entity.DrupAuthServer
;
18
import
java.io.Serializable;
19
import
java.util.List;
20
import
javax.faces.bean.ManagedBean;
21
import
javax.faces.bean.SessionScoped;
22
import
javax.faces.component.html.HtmlDataTable;
23
24
/**
25
* Backbean for page with administration of drupal authorization servers
26
*
27
* @brief Backbean for page with administration of drupal authorization servers
28
* @author Martin Petr (xpetrm05)
29
*/
30
@ManagedBean
31
@SessionScoped
32
public
class
DrupAuthServerMain
implements
Serializable {
33
/**
34
* Table with drupal authorization servers
35
*/
36
private
HtmlDataTable
listTable
;
37
/**
38
* Drupal authorization server from table
39
*/
40
private
DrupAuthServer
actualServer
;
41
42
/**
43
* Constructor
44
*/
45
public
DrupAuthServerMain
() {
46
}
47
48
/**
49
* Gets table with drupal authorization servers
50
*
51
* @return Returns table with drupal authorization servers
52
*/
53
public
HtmlDataTable
getListTable
() {
54
return
listTable
;
55
}
56
57
/**
58
* Sets table with drupal authorization servers
59
*
60
* @param listTable Table with drupal authorization servers
61
*/
62
public
void
setListTable
(HtmlDataTable
listTable
) {
63
this.listTable =
listTable
;
64
}
65
66
/**
67
* Gets actual drupal authorization server
68
*
69
* @return Actual drupal authorization server
70
*/
71
public
DrupAuthServer
getActualServer
() {
72
return
actualServer
;
73
}
74
75
/**
76
* Sets actual drupal authorization server
77
*
78
* @param actualServer Actual drupal authorization server
79
*/
80
public
void
setActualServer
(
DrupAuthServer
actualServer
) {
81
this.actualServer =
actualServer
;
82
}
83
84
/**
85
* Gets list of all existing drupal authorization servers
86
*
87
* @return Returns list of all existing drupal authorization servers
88
*/
89
public
List<DrupAuthServer>
getServers
(){
90
@SuppressWarnings(
"unchecked"
)
91
List<DrupAuthServer> retList = AppBean.getPersistenceManager().getEntitiesByName(
"DrupAuthServer"
);
92
93
return
retList;
94
}
95
96
/**
97
* Action listener for edit drupal authorization server in table
98
*
99
* @return Returns page outcome to go to editing page
100
*/
101
public
String
actionEdit
(){
102
// get selected row from table
103
actualServer
= (
DrupAuthServer
)
listTable
.getRowData();
104
// set actual server through the session
105
SessionManager.getSession().setActualDrupAuthServer(
actualServer
);
106
return
"editDrupAuthServer"
;
107
}
108
109
/**
110
* Action listener for delete drupal authorization server in table
111
*
112
* @return Returns page outcome to go to deleting page
113
*/
114
public
String
actionDelete
(){
115
// get selected row from table
116
actualServer
= (
DrupAuthServer
)
listTable
.getRowData();
117
// set actual server through the session
118
SessionManager.getSession().setActualDrupAuthServer(
actualServer
);
119
return
"deleteDrupAuthServer"
;
120
}
121
}
cz.vutbr.fit.knot.annotations.web.DrupAuthServerMain.setListTable
void setListTable(HtmlDataTable listTable)
Definition:
DrupAuthServerMain.java:62
cz.vutbr.fit.knot.annotations.web.DrupAuthServerMain.setActualServer
void setActualServer(DrupAuthServer actualServer)
Definition:
DrupAuthServerMain.java:80
cz.vutbr.fit.knot.annotations.web.DrupAuthServerMain
Backbean for page with administration of drupal authorization servers.
Definition:
DrupAuthServerMain.java:32
cz.vutbr.fit.knot.annotations.app.AppBean
Singleton for storing global variables.
Definition:
AppBean.java:47
cz.vutbr.fit.knot.annotations.entity.DrupAuthServer
Class representing approved drupal authentization server.
Definition:
DrupAuthServer.java:43
cz.vutbr.fit.knot.annotations.web.DrupAuthServerMain.getActualServer
DrupAuthServer getActualServer()
Definition:
DrupAuthServerMain.java:71
cz.vutbr.fit.knot.annotations.web.DrupAuthServerMain.getListTable
HtmlDataTable getListTable()
Definition:
DrupAuthServerMain.java:53
cz.vutbr.fit.knot.annotations.web.DrupAuthServerMain.getServers
List< DrupAuthServer > getServers()
Definition:
DrupAuthServerMain.java:89
cz.vutbr.fit.knot.annotations.web.DrupAuthServerMain.listTable
HtmlDataTable listTable
Definition:
DrupAuthServerMain.java:36
cz.vutbr.fit.knot.annotations.web.DrupAuthServerMain.actionDelete
String actionDelete()
Definition:
DrupAuthServerMain.java:114
cz.vutbr.fit.knot.annotations.web.DrupAuthServerMain.actionEdit
String actionEdit()
Definition:
DrupAuthServerMain.java:101
cz.vutbr.fit.knot.annotations.web.DrupAuthServerMain.actualServer
DrupAuthServer actualServer
Definition:
DrupAuthServerMain.java:40
cz.vutbr.fit.knot.annotations.web.DrupAuthServerMain.DrupAuthServerMain
DrupAuthServerMain()
Definition:
DrupAuthServerMain.java:45
src
java
cz
vutbr
fit
knot
annotations
web
DrupAuthServerMain.java
Generated on Wed Aug 24 2016 14:10:35 for 4A Server - by
1.8.6