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 2f422ce5
authored
Dec 07, 2014
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'neomap' into 'master'
Fix placeslot checking See merge request !140
2 parents
0ce46a2a
428307cd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
4 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/beans/VerkkomaksutFiBean.java
code/moya-beans/ejbModule/fi/codecrew/moya/facade/PlaceSlotFacade.java
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/map/AjaxMapView.java
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/shop/BillEditView.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/VerkkomaksutFiBean.java
View file @
2f422ce
...
@@ -97,6 +97,10 @@ public class VerkkomaksutFiBean implements VerkkomaksutFiBeanLocal {
...
@@ -97,6 +97,10 @@ public class VerkkomaksutFiBean implements VerkkomaksutFiBeanLocal {
@Override
@Override
public
boolean
isSvmEnabled
()
public
boolean
isSvmEnabled
()
{
{
if
(!
permbean
.
hasPermission
(
BillPermission
.
CREATE_VERKKOMAKSU
))
{
return
false
;
}
LanEventPrivateProperty
expire
=
eventbean
.
getPrivateProperty
(
LanEventPrivatePropertyKey
.
VERKKOMAKSU_KEY_EXPIRE
);
LanEventPrivateProperty
expire
=
eventbean
.
getPrivateProperty
(
LanEventPrivatePropertyKey
.
VERKKOMAKSU_KEY_EXPIRE
);
String
merchantid
=
eventbean
.
getPrivatePropertyString
(
LanEventPrivatePropertyKey
.
VERKKOMAKSU_MERCHANT_ID
);
String
merchantid
=
eventbean
.
getPrivatePropertyString
(
LanEventPrivatePropertyKey
.
VERKKOMAKSU_MERCHANT_ID
);
String
merchantPassword
=
eventbean
.
getPrivatePropertyString
(
LanEventPrivatePropertyKey
.
VERKKOMAKSU_MERCHANT_PASSWORD
);
String
merchantPassword
=
eventbean
.
getPrivatePropertyString
(
LanEventPrivatePropertyKey
.
VERKKOMAKSU_MERCHANT_PASSWORD
);
...
...
code/moya-beans/ejbModule/fi/codecrew/moya/facade/PlaceSlotFacade.java
View file @
2f422ce
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
*/
*/
package
fi
.
codecrew
.
moya
.
facade
;
package
fi
.
codecrew
.
moya
.
facade
;
import
java.util.Calendar
;
import
java.util.List
;
import
java.util.List
;
import
javax.ejb.EJB
;
import
javax.ejb.EJB
;
...
@@ -96,8 +97,13 @@ public class PlaceSlotFacade extends IntegerPkGenericFacade<PlaceSlot> {
...
@@ -96,8 +97,13 @@ public class PlaceSlotFacade extends IntegerPkGenericFacade<PlaceSlot> {
CriteriaQuery
<
Long
>
q
=
cb
.
createQuery
(
Long
.
class
);
CriteriaQuery
<
Long
>
q
=
cb
.
createQuery
(
Long
.
class
);
Root
<
PlaceSlot
>
root
=
q
.
from
(
PlaceSlot
.
class
);
Root
<
PlaceSlot
>
root
=
q
.
from
(
PlaceSlot
.
class
);
q
.
select
(
cb
.
count
(
root
));
q
.
select
(
cb
.
count
(
root
));
Path
<
Bill
>
bill
=
root
.
get
(
PlaceSlot_
.
bill
);
q
.
where
(
cb
.
equal
(
root
.
get
(
PlaceSlot_
.
product
),
prod
));
Path
<
Calendar
>
billexp
=
bill
.
get
(
Bill_
.
expires
);
q
.
where
(
cb
.
equal
(
root
.
get
(
PlaceSlot_
.
product
),
prod
),
cb
.
or
(
cb
.
isNull
(
billexp
),
cb
.
greaterThan
(
billexp
,
Calendar
.
getInstance
())
)
);
Long
count
=
super
.
getSingleNullableResult
(
getEm
().
createQuery
(
q
));
Long
count
=
super
.
getSingleNullableResult
(
getEm
().
createQuery
(
q
));
return
count
;
return
count
;
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/map/AjaxMapView.java
View file @
2f422ce
...
@@ -102,7 +102,7 @@ public class AjaxMapView extends GenericCDIView {
...
@@ -102,7 +102,7 @@ public class AjaxMapView extends GenericCDIView {
public
String
buySelectedPlaces
()
{
public
String
buySelectedPlaces
()
{
try
{
try
{
EventUser
user
=
userview
.
getSelectedUser
();
EventUser
user
=
userview
.
getSelectedUser
();
placebean
.
buy
SelectedPlaces
(
user
);
placebean
.
reserve
SelectedPlaces
(
user
);
return
"/place/myGroups"
;
return
"/place/myGroups"
;
}
catch
(
BortalCatchableException
e
)
{
}
catch
(
BortalCatchableException
e
)
{
addFaceMessage
(
"mapView.errorWhileBuyingPlaces"
);
addFaceMessage
(
"mapView.errorWhileBuyingPlaces"
);
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/shop/BillEditView.java
View file @
2f422ce
...
@@ -99,7 +99,7 @@ public class BillEditView extends GenericCDIView {
...
@@ -99,7 +99,7 @@ public class BillEditView extends GenericCDIView {
public
VerkkomaksutReturnEntry
getVerkkomaksuFiToken
()
public
VerkkomaksutReturnEntry
getVerkkomaksuFiToken
()
{
{
if
(
bill
!=
null
&&
vmreturn
==
null
)
if
(
isVerkkomaksuFiAvailable
()
&&
bill
!=
null
&&
vmreturn
==
null
)
{
{
vmreturn
=
vmbean
.
getSvmToken
(
bill
);
vmreturn
=
vmbean
.
getSvmToken
(
bill
);
logger
.
info
(
"Vmtoken url {}, token {}"
,
vmreturn
.
getUrl
(),
vmreturn
.
getToken
());
logger
.
info
(
"Vmtoken url {}, token {}"
,
vmreturn
.
getUrl
(),
vmreturn
.
getToken
());
...
...
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