Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Linnea Samila
/
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 293e3917
authored
May 13, 2012
by
Juho Salli
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of dev.insomnia.fi:/data/bortal
2 parents
f1794f6a
cb952870
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
116 additions
and
14 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/ActionLogBean.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/VotingBean.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/ActionLogMessageResponse.java
code/LanBortalWeb/WebContent/orgrole/create.xhtml
code/LanBortalWeb/WebContent/resources/cditools/orgrole/create.xhtml
code/LanBortalWeb/WebContent/resources/cditools/orgrole/form.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/user/OrgRoleView.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/ActionLogBean.java
View file @
293e391
...
@@ -71,6 +71,7 @@ public class ActionLogBean implements ActionLogBeanLocal {
...
@@ -71,6 +71,7 @@ public class ActionLogBean implements ActionLogBeanLocal {
@RolesAllowed
(
ContentPermission
.
S_MANAGE_ACTIONLOG
)
@RolesAllowed
(
ContentPermission
.
S_MANAGE_ACTIONLOG
)
public
void
addActionLogMessageResponse
(
ActionLogMessage
alm
,
String
message
,
ActionLogMessageState
state
)
{
public
void
addActionLogMessageResponse
(
ActionLogMessage
alm
,
String
message
,
ActionLogMessageState
state
)
{
if
(
alm
.
getState
()
!=
state
&&
state
!=
null
)
{
if
(
alm
.
getState
()
!=
state
&&
state
!=
null
)
{
alm
=
actionLogFacade
.
merge
(
alm
);
alm
.
setState
(
state
);
alm
.
setState
(
state
);
}
}
...
...
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/VotingBean.java
View file @
293e391
...
@@ -63,10 +63,6 @@ public class VotingBean implements VotingBeanLocal {
...
@@ -63,10 +63,6 @@ public class VotingBean implements VotingBeanLocal {
compoFacade
.
flush
();
compoFacade
.
flush
();
compoEntryFile
.
setEntriesId
(
compoEntry
);
compoEntryFile
.
setEntriesId
(
compoEntry
);
compoEntry
.
getFiles
().
add
(
compoEntryFile
);
compoEntry
.
getFiles
().
add
(
compoEntryFile
);
//compoEntry = compoEntryFacade.merge(compoEntry);
//compoEntryFile.setEntriesId(compoEntry);
//compoEntry.getFiles().add(compoEntryFile);
}
}
public
Compo
getCompoById
(
Integer
compoId
)
{
public
Compo
getCompoById
(
Integer
compoId
)
{
...
...
code/LanBortalDatabase/src/fi/insomnia/bortal/model/ActionLogMessageResponse.java
View file @
293e391
...
@@ -17,7 +17,6 @@ import org.eclipse.persistence.annotations.OptimisticLockingType;
...
@@ -17,7 +17,6 @@ import org.eclipse.persistence.annotations.OptimisticLockingType;
import
fi.insomnia.bortal.enums.ActionLogMessageState
;
import
fi.insomnia.bortal.enums.ActionLogMessageState
;
@Entity
@Entity
@Table
(
name
=
"actionlog_message_responses"
)
@Table
(
name
=
"actionlog_message_responses"
)
@OptimisticLocking
(
type
=
OptimisticLockingType
.
CHANGED_COLUMNS
)
@OptimisticLocking
(
type
=
OptimisticLockingType
.
CHANGED_COLUMNS
)
...
@@ -25,17 +24,17 @@ public class ActionLogMessageResponse extends GenericEntity {
...
@@ -25,17 +24,17 @@ public class ActionLogMessageResponse extends GenericEntity {
@Column
(
name
=
"time"
,
nullable
=
false
)
@Column
(
name
=
"time"
,
nullable
=
false
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
private
Date
time
=
new
Date
();
private
Date
time
=
new
Date
();
@JoinColumn
(
name
=
"user_id"
)
@JoinColumn
(
name
=
"user_id"
)
private
I
User
user
;
private
Event
User
user
;
@Column
(
name
=
"message"
,
nullable
=
false
)
@Column
(
name
=
"message"
,
nullable
=
false
)
private
String
message
;
private
String
message
;
@Column
(
name
=
"state_change"
,
nullable
=
true
)
@Column
(
name
=
"state_change"
,
nullable
=
true
)
@Enumerated
(
EnumType
.
STRING
)
@Enumerated
(
EnumType
.
STRING
)
private
ActionLogMessageState
stateChange
;
private
ActionLogMessageState
stateChange
;
@JoinColumn
(
name
=
"actionlog_message_id"
,
referencedColumnName
=
"id"
)
@JoinColumn
(
name
=
"actionlog_message_id"
,
referencedColumnName
=
"id"
)
@ManyToOne
(
optional
=
false
)
@ManyToOne
(
optional
=
false
)
private
ActionLogMessage
actionLogMessage
;
private
ActionLogMessage
actionLogMessage
;
...
@@ -48,11 +47,11 @@ public class ActionLogMessageResponse extends GenericEntity {
...
@@ -48,11 +47,11 @@ public class ActionLogMessageResponse extends GenericEntity {
this
.
time
=
time
;
this
.
time
=
time
;
}
}
public
I
User
getUser
()
{
public
Event
User
getUser
()
{
return
user
;
return
user
;
}
}
public
void
setUser
(
I
User
user
)
{
public
void
setUser
(
Event
User
user
)
{
this
.
user
=
user
;
this
.
user
=
user
;
}
}
...
@@ -71,11 +70,11 @@ public class ActionLogMessageResponse extends GenericEntity {
...
@@ -71,11 +70,11 @@ public class ActionLogMessageResponse extends GenericEntity {
public
void
setStateChange
(
ActionLogMessageState
stateChange
)
{
public
void
setStateChange
(
ActionLogMessageState
stateChange
)
{
this
.
stateChange
=
stateChange
;
this
.
stateChange
=
stateChange
;
}
}
public
ActionLogMessage
getActionLogMessage
()
{
public
ActionLogMessage
getActionLogMessage
()
{
return
actionLogMessage
;
return
actionLogMessage
;
}
}
public
void
setActionLogMessage
(
ActionLogMessage
message
)
{
public
void
setActionLogMessage
(
ActionLogMessage
message
)
{
this
.
actionLogMessage
=
message
;
this
.
actionLogMessage
=
message
;
}
}
...
...
code/LanBortalWeb/WebContent/orgrole/create.xhtml
0 → 100644
View file @
293e391
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:orgrole=
"http://java.sun.com/jsf/composite/cditools/orgrole"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
>
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<ui:param
name=
"thispage"
value=
"page.orgRole.create"
/>
<f:metadata>
<f:event
type=
"preRenderView"
listener=
"#{orgRoleView.initForCreate()}"
/>
</f:metadata>
<ui:define
name=
"content"
>
<orgrole:create
/>
</ui:define>
</ui:composition>
</html>
\ No newline at end of file
code/LanBortalWeb/WebContent/resources/cditools/orgrole/create.xhtml
0 → 100644
View file @
293e391
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:composite=
"http://java.sun.com/jsf/composite"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:tools=
"http://java.sun.com/jsf/composite/tools"
xmlns:orgrole=
"http://java.sun.com/jsf/composite/tools/orgrole"
>
<composite:interface>
</composite:interface>
<composite:implementation>
<h:form>
<ui:include
src=
"form.xhtml"
/>
<h:commandButton
id=
"createorgrole"
value=
"#{i18n['orgrole.create']}"
action=
"#{orgRoleView.create()}"
/>
</h:form>
</composite:implementation>
</html>
code/LanBortalWeb/WebContent/resources/cditools/orgrole/form.xhtml
0 → 100644
View file @
293e391
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:composite=
"http://java.sun.com/jsf/composite"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:tools=
"http://java.sun.com/jsf/composite/tools"
>
<ui:composition>
<h:panelGrid
columns=
"2"
>
<h:outputText
value=
"#{i18n['orgrole.name']}"
/>
<h:inputText
value=
"#{orgRoleView.orgRole.name}"
/>
<h:outputText
value=
"#{i18n['orgrole.parents']}"
/>
<h:selectManyCheckbox
converter=
"#{roleConverter}"
layout=
"pageDirection"
id=
"roleparents"
value=
"#{roleView.role.parents}"
>
<f:selectItems
var=
"par"
itemLabel=
"#{par.name}"
value=
"#{roleView.possibleParents}"
/>
</h:selectManyCheckbox>
<h:outputLabel
value=
"#{i18n['role.cardtemplate']}"
/>
<h:selectOneMenu
converter=
"#{cardTemplateConverter}"
value=
"#{roleView.role.cardTemplate}"
>
<f:selectItems
var=
"role"
itemLabel=
"#{role.name}"
value=
"#{cardView.templatesWithNull}"
/>
</h:selectOneMenu>
</h:panelGrid>
</ui:composition>
</html>
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/user/OrgRoleView.java
View file @
293e391
...
@@ -21,4 +21,9 @@ public class OrgRoleView extends GenericCDIView {
...
@@ -21,4 +21,9 @@ public class OrgRoleView extends GenericCDIView {
requirePermissions
(
permbean
.
hasPermission
(
UserPermission
.
READ_ORGROLES
));
requirePermissions
(
permbean
.
hasPermission
(
UserPermission
.
READ_ORGROLES
));
}
}
public
void
initForCreate
()
{
requirePermissions
(
permbean
.
hasPermission
(
UserPermission
.
WRITE_ORGROLES
));
}
}
}
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