Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit abb72c29
authored
Oct 27, 2012
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Palautetta
1 parent
2d17d211
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
50 additions
and
21 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/AccountEventBean.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/PermissionBean.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/UserBean.java
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/AccountEventBeanLocal.java
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/UserBeanLocal.java
code/LanBortalUtilities/src/fi/insomnia/bortal/enums/apps/UserPermission.java
code/LanBortalWeb/WebContent/WEB-INF/web.xml
code/LanBortalWeb/WebContent/layout/insomnia2/template.xhtml
code/LanBortalWeb/WebContent/resources/style/insomnia2/css/tyyli.css
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_en.properties
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi_IN.properties
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/AccountEventBean.java
View file @
abb72c2
...
@@ -9,6 +9,7 @@ import java.util.Map.Entry;
...
@@ -9,6 +9,7 @@ import java.util.Map.Entry;
import
javax.annotation.security.DeclareRoles
;
import
javax.annotation.security.DeclareRoles
;
import
javax.annotation.security.RolesAllowed
;
import
javax.annotation.security.RolesAllowed
;
import
javax.ejb.EJB
;
import
javax.ejb.EJB
;
import
javax.ejb.EJBException
;
import
javax.ejb.Stateless
;
import
javax.ejb.Stateless
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -128,4 +129,15 @@ public class AccountEventBean implements AccountEventBeanLocal {
...
@@ -128,4 +129,15 @@ public class AccountEventBean implements AccountEventBeanLocal {
}
}
@Override
public
AccountEvent
markDelivered
(
AccountEvent
e
,
Calendar
c
)
{
accountfacade
.
reload
(
e
);
if
(
e
.
getDelivered
()
!=
null
)
{
throw
new
EJBException
(
"AccountEvent "
+
e
+
" already marked paid!"
);
}
e
.
setDelivered
(
c
);
return
e
;
}
}
}
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/PermissionBean.java
View file @
abb72c2
...
@@ -46,6 +46,7 @@ import fi.insomnia.bortal.model.User;
...
@@ -46,6 +46,7 @@ import fi.insomnia.bortal.model.User;
UserPermission
.
S_INVITE_USERS
,
UserPermission
.
S_INVITE_USERS
,
UserPermission
.
S_READ_ORGROLES
,
UserPermission
.
S_READ_ORGROLES
,
UserPermission
.
S_WRITE_ORGROLES
,
UserPermission
.
S_WRITE_ORGROLES
,
UserPermission
.
S_VITUTTAAKO
,
MapPermission
.
S_VIEW
,
MapPermission
.
S_VIEW
,
MapPermission
.
S_MANAGE_MAPS
,
MapPermission
.
S_MANAGE_MAPS
,
...
...
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/UserBean.java
View file @
abb72c2
...
@@ -520,4 +520,10 @@ public class UserBean implements UserBeanLocal {
...
@@ -520,4 +520,10 @@ public class UserBean implements UserBeanLocal {
return
eventUserFacade
.
searchEventUsers
(
searchQuery
);
return
eventUserFacade
.
searchEventUsers
(
searchQuery
);
}
}
@Override
public
void
submitFeedback
(
String
feedback
)
{
logger
.
warn
(
"Received feedback {}"
,
feedback
);
// TODO
}
}
}
\ No newline at end of file
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/AccountEventBeanLocal.java
View file @
abb72c2
package
fi
.
insomnia
.
bortal
.
beans
;
package
fi
.
insomnia
.
bortal
.
beans
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Calendar
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -25,4 +26,6 @@ public interface AccountEventBeanLocal {
...
@@ -25,4 +26,6 @@ public interface AccountEventBeanLocal {
List
<
Role
>
getRolesFromAccountEvents
(
EventUser
u
);
List
<
Role
>
getRolesFromAccountEvents
(
EventUser
u
);
AccountEvent
markDelivered
(
AccountEvent
e
,
Calendar
c
);
}
}
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/UserBeanLocal.java
View file @
abb72c2
...
@@ -81,4 +81,6 @@ public interface UserBeanLocal {
...
@@ -81,4 +81,6 @@ public interface UserBeanLocal {
SearchResult
<
EventUser
>
getThisEventsUsers
(
UserSearchQuery
searchQuery
);
SearchResult
<
EventUser
>
getThisEventsUsers
(
UserSearchQuery
searchQuery
);
void
submitFeedback
(
String
feedback
);
}
}
code/LanBortalUtilities/src/fi/insomnia/bortal/enums/apps/UserPermission.java
View file @
abb72c2
...
@@ -17,7 +17,7 @@ public enum UserPermission implements IAppPermission {
...
@@ -17,7 +17,7 @@ public enum UserPermission implements IAppPermission {
MANAGE_HTTP_SESSION
,
// ("Manage http sessions"),
MANAGE_HTTP_SESSION
,
// ("Manage http sessions"),
INVITE_USERS
,
// ("Invite users"),
INVITE_USERS
,
// ("Invite users"),
READ_ORGROLES
,
// ("View organization roles"),
READ_ORGROLES
,
// ("View organization roles"),
WRITE_ORGROLES
,
// ("Modify organization roles"),
WRITE_ORGROLES
,
VITUTTAAKO
,
// ("Modify organization roles"),
;
;
public
static
final
String
S_VIEW_ALL
=
"USER/VIEW_ALL"
;
public
static
final
String
S_VIEW_ALL
=
"USER/VIEW_ALL"
;
...
@@ -35,6 +35,7 @@ public enum UserPermission implements IAppPermission {
...
@@ -35,6 +35,7 @@ public enum UserPermission implements IAppPermission {
public
static
final
String
S_INVITE_USERS
=
"USER/INVITE_USERS"
;
public
static
final
String
S_INVITE_USERS
=
"USER/INVITE_USERS"
;
public
static
final
String
S_READ_ORGROLES
=
"USER/READ_ORGROLES"
;
public
static
final
String
S_READ_ORGROLES
=
"USER/READ_ORGROLES"
;
public
static
final
String
S_WRITE_ORGROLES
=
"USER/WRITE_ORGROLES"
;
public
static
final
String
S_WRITE_ORGROLES
=
"USER/WRITE_ORGROLES"
;
public
static
final
String
S_VITUTTAAKO
=
"USER/VITUTTAAKO"
;
private
final
String
fullName
;
private
final
String
fullName
;
private
final
String
key
;
private
final
String
key
;
...
...
code/LanBortalWeb/WebContent/WEB-INF/web.xml
View file @
abb72c2
...
@@ -9,9 +9,9 @@
...
@@ -9,9 +9,9 @@
</session-config>
</session-config>
<context-param>
<context-param>
<param-name>
javax.faces.PROJECT_STAGE
</param-name>
<param-name>
javax.faces.PROJECT_STAGE
</param-name>
<!-- <param-value>Production</param-value> --
>
<param-value>
Production
</param-value
>
<
param-value>
Development
</param-value>
<
!-- <param-value>Development</param-value>-->
</context-param>
</context-param>
<context-param>
<context-param>
...
...
code/LanBortalWeb/WebContent/layout/insomnia2/template.xhtml
View file @
abb72c2
...
@@ -45,12 +45,17 @@
...
@@ -45,12 +45,17 @@
<h:outputText
rendered=
"#{sessionHandler.loggedIn}"
value=
"#{i18n['template.loggedInAs']} #{sessionHandler.currentUser.nick}"
/>
<h:outputText
rendered=
"#{sessionHandler.loggedIn}"
value=
"#{i18n['template.loggedInAs']} #{sessionHandler.currentUser.nick}"
/>
<div>
<div>
<tools:loginLogout
/>
<tools:loginLogout
/>
</div>
</div>
</div>
</div>
<ui:fragment
rendered=
"#{menuView.getMenu(0).size() > 1}"
>
<ui:fragment
rendered=
"#{menuView.getMenu(0).size() > 1}"
>
<ul
id=
"topmenu"
>
<ul
id=
"topmenu"
>
<li
jsfc=
"ui:repeat"
var=
"menuitem"
value=
"#{menuView.getMenu(0)}"
><h:link
outcome=
"#{menuitem.outcome}"
value=
"#{i18n[menuitem.navigation.key]}"
<li
jsfc=
"ui:repeat"
var=
"menuitem"
value=
"#{menuView.getMenu(0)}"
><h:link
outcome=
"#{menuitem.outcome}"
value=
"#{i18n[menuitem.navigation.key]}"
styleClass=
"#{menuitem.selected?'active':''}"
/></li>
styleClass=
"#{menuitem.selected?'active':''}"
/></li>
<ui:fragment
rendered=
"#{feedbackView.canFeedback}"
>
<li><h:link
outcome=
"/feedback/index"
value=
"#{i18n['feedback.canFeedback']}"
/></li>
</ui:fragment>
<li></li>
</ul>
</ul>
</ui:fragment>
</ui:fragment>
</div>
</div>
...
...
code/LanBortalWeb/WebContent/resources/style/insomnia2/css/tyyli.css
View file @
abb72c2
...
@@ -38,7 +38,7 @@ td span span div.rating-cancel {
...
@@ -38,7 +38,7 @@ td span span div.rating-cancel {
}
}
#login
{
#login
{
width
:
400
px
;
width
:
385
px
;
height
:
23px
;
height
:
23px
;
float
:
right
;
float
:
right
;
margin-top
:
10px
;
margin-top
:
10px
;
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_en.properties
View file @
abb72c2
...
@@ -194,6 +194,10 @@ eventorgView.eventname = Name of event
...
@@ -194,6 +194,10 @@ eventorgView.eventname = Name of event
eventorganiser.name
=
Eventorganiser
eventorganiser.name
=
Eventorganiser
feedback.canFeedback
=
Feedback
feedback.submit
=
Submit
feedback.thanks
=
Thanks
food
=
Food
food
=
Food
foodWave.accountevents
=
Accountevents
foodWave.accountevents
=
Accountevents
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
View file @
abb72c2
...
@@ -192,6 +192,10 @@ eventorgView.eventname = Tapahtuman nimi
...
@@ -192,6 +192,10 @@ eventorgView.eventname = Tapahtuman nimi
eventorganiser.name
=
Tapahtumaj
\u
00E4rjest
\u
00E4j
\u
00E4
eventorganiser.name
=
Tapahtumaj
\u
00E4rjest
\u
00E4j
\u
00E4
feedback.canFeedback
=
Vituttaako?
feedback.submit
=
L
\u
00E4het
\u
00E4
feedback.thanks
=
Kiiiiitooooos! :)
food
=
Ruoka
food
=
Ruoka
foodWave.accountevents
=
Maksetut tilaukset
foodWave.accountevents
=
Maksetut tilaukset
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi_IN.properties
View file @
abb72c2
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
View file @
abb72c2
...
@@ -67,7 +67,7 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -67,7 +67,7 @@ public class FoodWaveView extends GenericCDIView {
private
Integer
foodWaveId
;
private
Integer
foodWaveId
;
private
ListDataModel
<
AccountEvent
>
accountEventLines
;
private
ListDataModel
<
AccountEvent
>
accountEventLines
;
private
List
DataModel
<
FoodWave
>
foodWaves
;
private
List
<
FoodWave
>
foodWaves
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FoodWaveView
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FoodWaveView
.
class
);
public
List
<
Product
>
getProducts
()
{
public
List
<
Product
>
getProducts
()
{
...
@@ -80,11 +80,6 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -80,11 +80,6 @@ public class FoodWaveView extends GenericCDIView {
this
.
foodWaveBean
.
saveTemplate
(
template
);
this
.
foodWaveBean
.
saveTemplate
(
template
);
}
}
public
void
onEditFoodWave
()
{
FoodWave
fw
=
foodWaves
.
getRowData
();
this
.
foodWaveBean
.
merge
(
fw
);
}
public
void
initTemplateList
()
{
public
void
initTemplateList
()
{
super
.
requirePermissions
(
ShopPermission
.
SHOP_FOODWAVE
);
super
.
requirePermissions
(
ShopPermission
.
SHOP_FOODWAVE
);
}
}
...
@@ -92,11 +87,7 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -92,11 +87,7 @@ public class FoodWaveView extends GenericCDIView {
public
void
initFoodwaveManagerList
()
{
public
void
initFoodwaveManagerList
()
{
if
(
super
.
requirePermissions
(
ShopPermission
.
MANAGE_FOODWAVES
))
if
(
super
.
requirePermissions
(
ShopPermission
.
MANAGE_FOODWAVES
))
{
{
if
(
foodWaves
==
null
)
{
foodWaves
=
foodWaveBean
.
getEventFoodWaves
();
super
.
beginConversation
();
foodWaves
=
new
ListDataModel
<
FoodWave
>(
foodWaveBean
.
getEventFoodWaves
());
}
}
}
}
}
...
@@ -119,9 +110,9 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -119,9 +110,9 @@ public class FoodWaveView extends GenericCDIView {
if
(
templateId
!=
null
)
if
(
templateId
!=
null
)
{
{
template
=
foodWaveBean
.
findTemplate
(
templateId
);
template
=
foodWaveBean
.
findTemplate
(
templateId
);
foodWaves
=
new
ListDataModel
<
FoodWave
>(
template
.
getFoodwaves
()
);
foodWaves
=
template
.
getFoodwaves
(
);
}
else
{
}
else
{
foodWaves
=
new
ListDataModel
<
FoodWave
>(
foodWaveBean
.
getOpenFoodWaves
()
);
foodWaves
=
foodWaveBean
.
getOpenFoodWaves
(
);
}
}
super
.
beginConversation
();
super
.
beginConversation
();
}
}
...
@@ -244,8 +235,7 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -244,8 +235,7 @@ public class FoodWaveView extends GenericCDIView {
public
String
deliverAccountEvent
()
{
public
String
deliverAccountEvent
()
{
if
(
getAccountEventLines
().
isRowAvailable
())
{
if
(
getAccountEventLines
().
isRowAvailable
())
{
AccountEvent
e
=
getAccountEventLines
().
getRowData
();
AccountEvent
e
=
getAccountEventLines
().
getRowData
();
e
.
setDelivered
(
Calendar
.
getInstance
());
e
=
accountEventBean
.
markDelivered
(
e
,
Calendar
.
getInstance
());
e
=
accountEventBean
.
merge
(
e
);
foodWaveId
=
selectedFoodWave
.
getId
();
foodWaveId
=
selectedFoodWave
.
getId
();
selectedFoodWave
=
null
;
selectedFoodWave
=
null
;
...
@@ -344,11 +334,11 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -344,11 +334,11 @@ public class FoodWaveView extends GenericCDIView {
this
.
billLines
=
billLines
;
this
.
billLines
=
billLines
;
}
}
public
void
setFoodWaves
(
List
DataModel
<
FoodWave
>
foodWaves
)
{
public
void
setFoodWaves
(
List
<
FoodWave
>
foodWaves
)
{
this
.
foodWaves
=
foodWaves
;
this
.
foodWaves
=
foodWaves
;
}
}
public
List
DataModel
<
FoodWave
>
getFoodWaves
()
{
public
List
<
FoodWave
>
getFoodWaves
()
{
return
foodWaves
;
return
foodWaves
;
}
}
...
...
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