Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
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 2a23585b
authored
May 09, 2010
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dunno what?
1 parent
a0ae368f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
24 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/PlaceMapBean.java
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/PlaceMapBeanLocal.java
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/TestDataBeanLocal.java
code/LanBortalDatabase/src/META-INF/persistence.xml
code/LanBortalWeb/build.xml
code/LanBortalWeb/nbproject/genfiles.properties
code/LanBortalWeb/src/fi/insomnia/bortal/view/MapView.java
code/LanBortalWeb/src/fi/insomnia/bortal/view/TestDataView.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/PlaceMapBean.java
View file @
2a23585
...
@@ -91,12 +91,12 @@ public class PlaceMapBean implements PlaceMapBeanLocal {
...
@@ -91,12 +91,12 @@ public class PlaceMapBean implements PlaceMapBeanLocal {
ImageIO
.
write
(
image
,
filetype
,
outputStream
);
ImageIO
.
write
(
image
,
filetype
,
outputStream
);
}
}
public
String
getSelectPlaceMapUrl
(
EventMap
activeMap
,
Place
selectedPlace
,
User
user
)
{
public
String
getSelectPlaceMapUrl
(
EventMap
activeMap
,
List
<
Place
>
selectedPlace
,
User
user
)
{
String
parameters
=
"?"
;
String
parameters
=
"?"
;
if
(
selectedPlace
!=
null
)
{
if
(
selectedPlace
!=
null
)
{
parameters
+=
"placeid="
+
selectedPlace
.
getId
().
getId
();
//
parameters += "placeid=" + selectedPlace.getId().getId();
}
else
{
}
else
{
parameters
+=
"mapid="
+
activeMap
.
getId
().
getId
();
parameters
+=
"mapid="
+
activeMap
.
getId
().
getId
();
}
}
...
...
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/PlaceMapBeanLocal.java
View file @
2a23585
...
@@ -15,7 +15,7 @@ import java.util.List;
...
@@ -15,7 +15,7 @@ import java.util.List;
public
interface
PlaceMapBeanLocal
{
public
interface
PlaceMapBeanLocal
{
void
printPlaceMapToStream
(
OutputStream
outputStream
,
String
filetype
,
Event
event
,
Integer
mapId
,
Integer
userId
,
List
<
Integer
>
placeIds
)
throws
IOException
;
void
printPlaceMapToStream
(
OutputStream
outputStream
,
String
filetype
,
Event
event
,
Integer
mapId
,
Integer
userId
,
List
<
Integer
>
placeIds
)
throws
IOException
;
public
String
getSelectPlaceMapUrl
(
EventMap
activeMap
,
Place
selectedPlace
,
User
user
);
public
String
getSelectPlaceMapUrl
(
EventMap
activeMap
,
List
<
Place
>
selectedPlaces
,
User
user
);
// public EventMap findMap(int i);
// public EventMap findMap(int i);
...
...
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/TestDataBeanLocal.java
View file @
2a23585
...
@@ -10,6 +10,7 @@ import fi.insomnia.bortal.model.User;
...
@@ -10,6 +10,7 @@ import fi.insomnia.bortal.model.User;
@Local
@Local
public
interface
TestDataBeanLocal
{
public
interface
TestDataBeanLocal
{
EventMap
generateTestMap
(
Event
event
);
EventMap
generateTestMap
(
Event
event
);
void
generateTestPlaces
(
EventMap
map
);
void
generateTestPlaces
(
EventMap
map
);
...
...
code/LanBortalDatabase/src/META-INF/persistence.xml
View file @
2a23585
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
<properties>
<properties>
<property
name=
"eclipselink.ddl-generation"
value=
"drop-and-create-tables"
/>
<property
name=
"eclipselink.ddl-generation"
value=
"drop-and-create-tables"
/>
<property
name=
"eclipselink.ddl-generation.output-mode"
value=
"both"
/>
<property
name=
"eclipselink.ddl-generation.output-mode"
value=
"both"
/>
<property
name=
"eclipselink.logging.level"
value=
"ALL"
/>
<property
name=
"eclipselink.cache.type.default"
value=
"NONE"
/>
<property
name=
"eclipselink.cache.type.default"
value=
"NONE"
/>
</properties>
</properties>
</persistence-unit>
</persistence-unit>
...
...
code/LanBortalWeb/build.xml
View file @
2a23585
...
@@ -10,7 +10,8 @@
...
@@ -10,7 +10,8 @@
<project
name=
"LanBortalWeb"
default=
"default"
basedir=
"."
>
<project
name=
"LanBortalWeb"
default=
"default"
basedir=
"."
>
<description>
Builds, tests, and runs the project LanBortalWeb.
</description>
<description>
Builds, tests, and runs the project LanBortalWeb.
</description>
<import
file=
"nbproject/build-impl.xml"
/>
<import
file=
"nbproject/build-impl.xml"
/>
<!--
<import
file=
"nbproject/profiler-build-impl.xml"
/>
<!--
There exist several targets which are by default empty and which can be
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
used for execution of your tasks. These targets are usually executed
...
...
code/LanBortalWeb/nbproject/genfiles.properties
View file @
2a23585
...
@@ -6,3 +6,6 @@ build.xml.stylesheet.CRC32=c0ebde35@1.21.1.1
...
@@ -6,3 +6,6 @@ build.xml.stylesheet.CRC32=c0ebde35@1.21.1.1
nbproject/build-
impl.xml.data.CRC32
=
a85e9fc5
nbproject/build-
impl.xml.data.CRC32
=
a85e9fc5
nbproject/build-
impl.xml.script.CRC32
=
27e0b6a5
nbproject/build-
impl.xml.script.CRC32
=
27e0b6a5
nbproject/build-
impl.xml.stylesheet.CRC32
=
b139b33b@1.21.1.1
nbproject/build-
impl.xml.stylesheet.CRC32
=
b139b33b@1.21.1.1
nbproject/profiler-build-
impl.xml.data.CRC32
=
a85e9fc5
nbproject/profiler-build-
impl.xml.script.CRC32
=
a84d8f2e
nbproject/profiler-build-
impl.xml.stylesheet.CRC32
=
0bb5b37b@1.9.1
code/LanBortalWeb/src/fi/insomnia/bortal/view/MapView.java
View file @
2a23585
...
@@ -9,6 +9,8 @@ import fi.insomnia.bortal.handler.SessionHandler;
...
@@ -9,6 +9,8 @@ import fi.insomnia.bortal.handler.SessionHandler;
import
fi.insomnia.bortal.model.EventMap
;
import
fi.insomnia.bortal.model.EventMap
;
import
fi.insomnia.bortal.model.Place
;
import
fi.insomnia.bortal.model.Place
;
import
fi.insomnia.bortal.model.User
;
import
fi.insomnia.bortal.model.User
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
javax.ejb.EJB
;
import
javax.ejb.EJB
;
import
javax.faces.bean.ManagedBean
;
import
javax.faces.bean.ManagedBean
;
...
@@ -33,7 +35,8 @@ public class MapView {
...
@@ -33,7 +35,8 @@ public class MapView {
@ManagedProperty
(
"#{sessionHandler}"
)
@ManagedProperty
(
"#{sessionHandler}"
)
private
SessionHandler
sessionHandler
;
private
SessionHandler
sessionHandler
;
private
EventMap
activeMap
=
null
;
private
EventMap
activeMap
=
null
;
private
Place
selectedPlace
=
null
;
private
List
<
Place
>
selectedPlaces
=
new
ArrayList
<
Place
>();
//private Place selectedPlace = null;
/** Creates a new instance of MapView */
/** Creates a new instance of MapView */
public
MapView
()
{
public
MapView
()
{
...
@@ -47,8 +50,13 @@ public class MapView {
...
@@ -47,8 +50,13 @@ public class MapView {
int
y
=
new
Integer
((
String
)
requestParams
.
get
(
clientId
+
".y"
)).
intValue
();
int
y
=
new
Integer
((
String
)
requestParams
.
get
(
clientId
+
".y"
)).
intValue
();
Place
place
=
getActiveMap
().
findPlace
(
x
,
y
);
Place
place
=
getActiveMap
().
findPlace
(
x
,
y
);
selectedPlace
=
place
;
//throw new UnsupportedOperationException("We got place, but are doing nothing with it");
if
(
selectedPlaces
.
contains
(
place
))
{
selectedPlaces
.
remove
(
place
);
}
else
{
selectedPlaces
.
add
(
place
);
}
}
}
public
String
getSelectPlaceMapUrl
()
{
public
String
getSelectPlaceMapUrl
()
{
...
@@ -59,7 +67,7 @@ public class MapView {
...
@@ -59,7 +67,7 @@ public class MapView {
return
""
;
return
""
;
}
}
return
placeMapBean
.
getSelectPlaceMapUrl
(
getActiveMap
(),
selectedPlace
,
user
);
return
placeMapBean
.
getSelectPlaceMapUrl
(
getActiveMap
(),
selectedPlace
s
,
user
);
}
}
/**
/**
...
@@ -85,20 +93,6 @@ public class MapView {
...
@@ -85,20 +93,6 @@ public class MapView {
}
}
/**
/**
* @return the selectedPlace
*/
public
Place
getSelectedPlace
()
{
return
selectedPlace
;
}
/**
* @param selectedPlace the selectedPlace to set
*/
public
void
setSelectedPlace
(
Place
selectedPlace
)
{
this
.
selectedPlace
=
selectedPlace
;
}
/**
* @return the sessionHandler
* @return the sessionHandler
*/
*/
public
SessionHandler
getSessionHandler
()
{
public
SessionHandler
getSessionHandler
()
{
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/view/TestDataView.java
View file @
2a23585
...
@@ -37,7 +37,7 @@ public class TestDataView {
...
@@ -37,7 +37,7 @@ public class TestDataView {
EventMap
map
=
testdatabean
.
generateTestMap
(
event
);
EventMap
map
=
testdatabean
.
generateTestMap
(
event
);
testdatabean
.
generateTestPlaces
(
map
);
testdatabean
.
generateTestPlaces
(
map
);
testdatabean
.
generateTestCompos
(
event
);
//
testdatabean.generateTestCompos(event);
}
}
/** Creates a new instance of TestDataView */
/** Creates a new instance of TestDataView */
...
...
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