Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Riina Antikainen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0720f073
authored
Mar 21, 2010
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not conflig, fo not conflig...
1 parent
f51d8f3e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/RoleBean.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
code/LanBortalWeb/WebContent/role/list.xhtml
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/RoleBean.java
View file @
0720f07
...
...
@@ -46,6 +46,9 @@ public class RoleBean implements RoleBeanLocal {
public
List
<
Role
>
getPossibleParents
(
Role
role
)
{
List
<
Role
>
roleList
=
listRoles
();
if
(
role
==
null
)
return
roleList
;
List
<
Role
>
children
=
getAllChilds
(
role
,
new
HashSet
<
Role
>());
for
(
Role
unit
:
children
)
{
...
...
@@ -63,7 +66,7 @@ public class RoleBean implements RoleBeanLocal {
List
<
Role
>
returnList
=
new
ArrayList
<
Role
>();
if
(
checkedRoles
.
contains
(
role
))
{
if
(
checkedRoles
.
contains
(
role
)
||
role
==
null
)
{
return
returnList
;
}
...
...
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
View file @
0720f07
...
...
@@ -4,6 +4,7 @@
*/
package
fi
.
insomnia
.
bortal
.
model
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.CascadeType
;
...
...
@@ -47,10 +48,10 @@ public class Role implements EventChildInterface {
@JoinColumns
({
@JoinColumn
(
name
=
"role_id"
,
referencedColumnName
=
"entity_id"
,
nullable
=
false
,
updatable
=
false
,
insertable
=
false
),
@JoinColumn
(
name
=
"role_event_id"
,
referencedColumnName
=
"events_pk_id"
,
nullable
=
false
,
updatable
=
false
,
insertable
=
false
)
})
private
List
<
Role
>
children
;
private
List
<
Role
>
children
=
new
ArrayList
<
Role
>()
;
@ManyToMany
(
mappedBy
=
"children"
)
private
List
<
Role
>
parents
;
private
List
<
Role
>
parents
=
new
ArrayList
<
Role
>()
;
@OneToMany
(
cascade
=
CascadeType
.
ALL
,
mappedBy
=
"role"
)
private
List
<
RoleRight
>
roleRights
;
...
...
code/LanBortalWeb/WebContent/role/list.xhtml
View file @
0720f07
...
...
@@ -11,7 +11,7 @@
<ui:composition
template=
"/layout/default-template.xhtml"
>
<ui:define
name=
"title"
>
listRoles
</ui:define>
<ui:define
name=
"header"
>
List roles
</ui:define>
<ui:define
name=
"header"
>
List
"
roles
</ui:define>
<ui:define
name=
"content"
>
<role:list
/>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment