Commit 1aeabaac by Tuomas Riihimäki

Hmm.. Stuff:

  - Removed commons-codec ( Could not get it to propagate via EAR, or otherwise )
  - Added commons-codec base64 libs to LanBortalUtils..
  - Fixed JVM crash problem ( maybe Place FetchType.EAGER )
  - Added graniteds and AXDT flash stuff.. :)
  - Broke everything else!!
1 parent 608b95a5
Showing with 1286 additions and 116 deletions
......@@ -20,9 +20,12 @@ bortalRealm {
3. suorita seuraava komento hakemistossa glassfish/glassfish/bin/
./asadmin create-auth-realm --classname fi.insomnia.bortal.BortalRealm --property jaas-context=bortalRealm omniarealm
# ./asadmin create-auth-realm --classname fi.insomnia.bortal.BortalRealm --property jaas-context=bortalRealm omniarealm
./asadmin create-jdbc-connection-pool --datasourceclassname org.postgresql.ds.PGSimpleDataSource --restype javax.sql.DataSource --ping true --property DatabaseName=BortalDb:Password=derkoppa:User=bortal Omniapossu
# ./asadmin create-jdbc-connection-pool --datasourceclassname org.postgresql.ds.PGSimpleDataSource --restype javax.sql.DataSource --ping true --property DatabaseName=BortalDb:Password=derkoppa:User=bortal Omniapossu
Lis JDBC resource jdbc/bortal connection poolille Omniapossu wepiklist.
\ No newline at end of file
Lis JDBC resource jdbc/bortal connection poolille Omniapossu wepiklist.
Debug-tulosteet fi namespacesta saa nkyviin seuraavasti:
# echo fi.level=FINEST >> glassfish/domains/domain1/config/logging.properties
\ No newline at end of file
......@@ -16,5 +16,17 @@
<dependent-module archiveName="LanBortalUtilities.jar" deploy-path="/lib" handle="module:/resource/LanBortalUtilities/LanBortalUtilities">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="granite.jar" deploy-path="/lib" handle="module:/classpath/lib/LanBortal/ExtraLibs/granite.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="granite-eclipselink.jar" deploy-path="/lib" handle="module:/classpath/lib/LanBortal/ExtraLibs/granite-eclipselink.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="slf4j-api-1.5.8.jar" deploy-path="/lib" handle="module:/classpath/lib/LanBortal/ExtraLibs/slf4j-api-1.5.8.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="slf4j-jdk14-1.5.8.jar" deploy-path="/lib" handle="module:/classpath/lib/LanBortal/ExtraLibs/slf4j-jdk14-1.5.8.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
</wb-module>
</project-modules>
No preview for this file type
......@@ -2,8 +2,12 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/LanBortalAuthModuleClient"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish v3 Java EE 6"/>
<classpathentry kind="lib" path="/Users/tuomari/bin/glassfishv31_0507_2/glassfish/lib/appserv-rt.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>
......@@ -7,6 +7,11 @@
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
......@@ -14,5 +19,6 @@
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
#Sat Apr 17 01:39:34 EEST 2010
#Fri Jul 16 17:41:25 EEST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
......
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed facet="java" version="1.6"/>
</faceted-project>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM 1.6">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<graniteProperties version="2.0">
<gas3 uid="uid" as3TypeFactory="org.granite.generator.as3.DefaultAs3TypeFactory" entityFactory="org.granite.generator.as3.DefaultEntityFactory" remoteDestinationFactory="org.granite.generator.as3.DefaultRemoteDestinationFactory" debugEnabled="false" flexConfig="false">
<source path="src" includes="" excludes="" output="as3;"/>
<template kind="ENTITY" uris="class:org/granite/generator/template/entity.gsp;class:org/granite/generator/template/entityBase.gsp"/>
<template kind="BEAN" uris="class:org/granite/generator/template/bean.gsp;class:org/granite/generator/template/beanBase.gsp"/>
<template kind="REMOTE_DESTINATION" uris="class:org/granite/generator/template/remote.gsp;class:org/granite/generator/template/remoteBase.gsp"/>
<template kind="INTERFACE" uris="class:org/granite/generator/template/interface.gsp"/>
<template kind="ENUM" uris="class:org/granite/generator/template/enum.gsp"/>
<transformer type="org.granite.generator.as3.JavaAs3GroovyTransformer"/>
</gas3>
</graniteProperties>
\ No newline at end of file
......@@ -20,11 +20,17 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.granite.builder.granitebuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.granite.builder.granitenature</nature>
</natures>
</projectDescription>
#Sat Jun 12 04:35:47 EEST 2010
#Fri Jul 16 17:41:15 EEST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
......
......@@ -3,6 +3,6 @@
<runtime name="GlassFish v3 Java EE 6"/>
<fixed facet="java"/>
<fixed facet="jst.utility"/>
<installed facet="java" version="1.6"/>
<installed facet="jst.utility" version="1.0"/>
<installed facet="java" version="1.6"/>
</faceted-project>
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal {
public interface RealmBeanRemote {
}
}
\ No newline at end of file
......@@ -2,14 +2,22 @@
<classpath>
<classpathentry kind="src" path="ejbModule"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish v3 Java EE 6"/>
<classpathentry kind="lib" path="libs/PDFjet.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<classpathentry kind="lib" path="libs/PDFjet.jar">
<attributes>
<attribute name="owner.project.facets" value="java"/>
<attribute name="org.eclipse.jst.component.dependency" value="../"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/LanBortalBeansClient"/>
<classpathentry combineaccessrules="false" kind="src" path="/LanBortalAuthModuleClient"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish Server Open Source Edition 3 (Java EE 6)">
<attributes>
<attribute name="owner.project.facets" value="jst.ejb"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM 1.6">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="build/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<graniteProperties version="2.0">
<gas3 uid="uid" as3TypeFactory="org.granite.generator.as3.DefaultAs3TypeFactory" entityFactory="org.granite.generator.as3.DefaultEntityFactory" remoteDestinationFactory="org.granite.generator.as3.DefaultRemoteDestinationFactory" debugEnabled="false" flexConfig="false">
<source path="ejbModule" includes="" excludes="" output="../LanBortalWeb/as3;"/>
<project path="LanBortalAuthModuleClient"/>
<project path="LanBortalBeansClient"/>
<template kind="REMOTE_DESTINATION" uris="class:org/granite/generator/template/remote.gsp;class:org/granite/generator/template/remoteBase.gsp"/>
<template kind="ENTITY" uris="class:org/granite/generator/template/entity.gsp;class:org/granite/generator/template/entityBase.gsp"/>
<template kind="INTERFACE" uris="class:org/granite/generator/template/interface.gsp"/>
<template kind="ENUM" uris="class:org/granite/generator/template/enum.gsp"/>
<template kind="BEAN" uris="class:org/granite/generator/template/bean.gsp;class:org/granite/generator/template/beanBase.gsp"/>
<transformer type="org.granite.generator.as3.JavaAs3GroovyTransformer"/>
</gas3>
</graniteProperties>
\ No newline at end of file
......@@ -20,11 +20,17 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.granite.builder.granitebuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.granite.builder.granitenature</nature>
</natures>
</projectDescription>
#Sat Jul 17 22:07:14 EEST 2010
XDOCLETBUILDERACTIVE=true
XDOCLETHOME=
XDOCLETUSEGLOBAL=true
XDOCLETVERSION=1.2.1
eclipse.preferences.version=1
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish Server Open Source Edition 3 (Java EE 6)"/>
<fixed facet="jst.ejb"/>
<fixed facet="jst.java"/>
<installed facet="jst.java" version="6.0"/>
......
......@@ -2,18 +2,13 @@ package fi.insomnia.bortal.beans;
import java.io.ByteArrayOutputStream;
import javax.annotation.security.DeclareRoles;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.servlet.ServletOutputStream;
import fi.insomnia.bortal.beanutil.AuthorisationBean;
import fi.insomnia.bortal.beanutil.AuthorisationBean.Right;
import fi.insomnia.bortal.beanutil.AuthorisationBean.RightType;
import fi.insomnia.bortal.beanutil.AuthorisationBeanLocal;
import fi.insomnia.bortal.beanutil.AuthorisationBeanLocal.Right;
import fi.insomnia.bortal.beanutil.AuthorisationBeanLocal.RightType;
import fi.insomnia.bortal.beanutil.PdfPrinter;
import fi.insomnia.bortal.enums.BeanRole;
import fi.insomnia.bortal.facade.BillFacade;
import fi.insomnia.bortal.model.Bill;
import fi.insomnia.bortal.model.Event;
......@@ -31,10 +26,10 @@ public class BillBean implements BillBeanLocal {
private UserBeanLocal userBean;
@EJB
private SecurityBean secubean;
private SecurityBeanLocal secubean;
@EJB
private AuthorisationBean authbean;
private AuthorisationBeanLocal authbean;
/**
* Default constructor.
......
......@@ -3,6 +3,10 @@ package fi.insomnia.bortal.beans;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import org.granite.messaging.service.annotations.RemoteDestination;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fi.insomnia.bortal.facade.EventFacade;
import fi.insomnia.bortal.facade.EventOrganiserFacade;
import fi.insomnia.bortal.facade.UserFacade;
......@@ -18,7 +22,7 @@ public class EventBean implements EventBeanLocal {
private static final String DEFAULT_EVENT_NAME = "Default event";
private static final String DEFAULT_ORGANISATION_NAME = "Default organisation";
private static final Logger logger = LoggerFactory.getLogger(EventBean.class);
@EJB
private EventFacade eventFacade;
......@@ -69,4 +73,8 @@ public class EventBean implements EventBeanLocal {
return settings;
}
}
......@@ -15,8 +15,13 @@ import javax.ejb.Stateless;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fi.insomnia.bortal.facade.AccessRightFacade;
import fi.insomnia.bortal.facade.RoleFacade;
import fi.insomnia.bortal.facade.RoleRightFacade;
import fi.insomnia.bortal.model.AccessRight;
import fi.insomnia.bortal.model.Event;
import fi.insomnia.bortal.model.Role;
import fi.insomnia.bortal.model.RoleRight;
/**
*
......@@ -25,15 +30,14 @@ import fi.insomnia.bortal.model.Role;
@Stateless
public class RoleBean implements RoleBeanLocal {
// public static final String[] DECLARED_ROLES =
// {
// BeanRole.SUPERADMIN.toString(),
// BeanRole.ADMIN_BASE.name(),
// BeanRole.USER_BASE.name()
// };
@EJB
private RoleFacade roleFacade;
@EJB
private AccessRightFacade arf;
@EJB
private RoleRightFacade rrfacade;
@EJB
private AccessRightFacade accessrightFacade;
private static final Logger logger = LoggerFactory.getLogger(RoleBean.class);
public List<Role> listRoles() {
......@@ -47,7 +51,6 @@ public class RoleBean implements RoleBeanLocal {
public Role create(Role role) {
roleFacade.create(role);
return role;
}
......@@ -86,11 +89,30 @@ public class RoleBean implements RoleBeanLocal {
return returnList;
}
// public static String[] getDeclaredRoles() {
// return DECLARED_ROLES;
// }
public List<RoleRight> getEventRoleRights(Event e, Role r) {
List<AccessRight> rights = arf.findAll();
List<RoleRight> ret = new ArrayList<RoleRight>();
for(AccessRight ar : rights)
{
RoleRight roleright = rrfacade.find(e, ar, r);
if(roleright == null)
{
roleright = new RoleRight(e);
roleright.setAccessRight(ar);
roleright.setRole(r);
rrfacade.create(roleright);
}
ret.add(roleright);
}
return ret;
}
@Override
public RoleRight mergeChanges(RoleRight row) {
return rrfacade.merge(row);
}
// Add business logic below. (Right-click in editor and choose
// "Insert Code > Add Business Method")
......
......@@ -72,7 +72,7 @@ public class SecurityBean implements SecurityBeanLocal {
return entry;
}
public void logPermissionDenied(User currentuser, String string) {
public LogEntry logPermissionDenied(User currentuser, String message) {
return logMessage(SecurityLogType.permissionDenied, currentuser, message);
}
}
......@@ -12,6 +12,9 @@ import java.util.logging.Logger;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import org.slf4j.LoggerFactory;
......@@ -31,6 +34,7 @@ import fi.insomnia.bortal.model.Event;
import fi.insomnia.bortal.model.EventMap;
import fi.insomnia.bortal.model.Place;
import fi.insomnia.bortal.model.User;
import fi.insomnia.bortal.utilities.apachecodec.binary.Base64;
/**
* Session Bean implementation class TestDataBean
......@@ -39,6 +43,8 @@ import fi.insomnia.bortal.model.User;
// @DeclareRoles("ADMIN_BASE")
// @RolesAllowed("ADMIN_BASE")
public class TestDataBean implements TestDataBeanLocal {
@PersistenceContext
private EntityManager em;
public static final String TEST_MAP_IMAGE_NAME = "testmap.png";
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(TestDataBean.class);
......@@ -66,13 +72,33 @@ public class TestDataBean implements TestDataBeanLocal {
private RoleBeanLocal role;
@EJB
private UserBeanLocal userbean;
public void bootstrap()
{
}
// @PersistenceUnit
// private EntityManagerFactory emf;
//
public void bootstrap() {
}
public void writeMap(Event e, long bytes) {
EventMap map = new EventMap(e);
map.setName("test" + bytes);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < bytes; ++i) {
sb.append((char) (33 + i % 92));
}
map.setMapData(sb.toString());
eventMapFacade.create(map);
}
public EventMap readMap(long bytes) {
return eventMapFacade.findByName("test" + bytes);
}
/**
* Default constructor.
*/
......@@ -129,7 +155,7 @@ public class TestDataBean implements TestDataBeanLocal {
u.setZip("6666");
u.setSuperadmin(true);
userFacade.create(u);
return u;
}
......@@ -190,7 +216,6 @@ public class TestDataBean implements TestDataBeanLocal {
File file = new File(getClass().getResource(TEST_MAP_IMAGE_NAME).toURI());
long length = file.length();
// Create the byte array to hold the data
byte[] bytes = new byte[(int) length];
......@@ -208,9 +233,10 @@ public class TestDataBean implements TestDataBeanLocal {
}
stream.close();
map.setMapData(bytes);
String str = Base64.encodeBase64String(bytes);
logger.debug("Saving image with {} base64 encoded chars", str.length());
map.setMapData(str );
map.setName("test0");
eventMapFacade.create(map);
return map;
......@@ -283,4 +309,10 @@ public class TestDataBean implements TestDataBeanLocal {
compoEntry2.setName("Another test entry for test compo");
compoEntryFacade.create(compoEntry2);
}
@Override
public void flushMaps() {
Query q = em.createQuery("delete from EventMap");
q.executeUpdate();
}
}
......@@ -11,6 +11,7 @@ import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.SessionContext;
import javax.ejb.Stateless;
import javax.enterprise.deploy.spi.Target;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -71,7 +72,7 @@ public class UserBean implements UserBeanLocal {
@Override
public User mergeChanges(User user) {
return userFacade.merge(user);
return userFacade.merge(user);
}
public User getUser(String nick) {
......@@ -120,6 +121,7 @@ public class UserBean implements UserBeanLocal {
// TODO: FIX THIS!! really bad idea....
if (user.isSuperadmin()) {
logger.debug("Returning true for superadmin for {} perm {}", target.name(),permission);
return true;
}
......@@ -147,12 +149,12 @@ public class UserBean implements UserBeanLocal {
if (rr.getAccessRight().equals(expectedRight)) {
switch (permission) {
case READ:
if (rr.getRead()) {
if (rr.isRead()) {
return true;
}
break;
case WRITE:
if (rr.getWrite()) {
if (rr.isWrite()) {
return true;
}
break;
......
package fi.insomnia.bortal.beans.flash;
public class Dummyclass {
private String name;
private Integer id;
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
}
package fi.insomnia.bortal.beans.flash;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.PersistenceContext;
import javax.persistence.PersistenceUnit;
import org.granite.messaging.service.annotations.RemoteDestination;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fi.insomnia.bortal.facade.EventFacade;
import fi.insomnia.bortal.facade.EventMapFacade;
import fi.insomnia.bortal.model.EventMap;
import fi.insomnia.bortal.model.EventPk;
import fi.insomnia.bortal.model.Place;
import fi.insomnia.bortal.utilities.apachecodec.binary.Base64;
/**
* Session Bean implementation class FlashMapBean
*/
@Stateless
@RemoteDestination
public class FlashMapBean implements FlashMapBeanLocal {
private static final Logger logger = LoggerFactory.getLogger(FlashMapBean.class);
@EJB
private EventFacade eventFacade;
@EJB
private EventMapFacade mapFacade;
@PersistenceUnit
private EntityManagerFactory emf;
/**
* Default constructor.
*/
public FlashMapBean() {
// TODO Auto-generated constructor stub
}
public byte[] getMapBackground(Integer eventId, Integer mapId)
{
logger.debug("Fetching data with eventid {}, mapid {}", eventId, mapId);
EntityManager em = emf.createEntityManager();
EventMap map = em.find(EventMap.class, new EventPk(eventId, mapId));
logger.debug("Got map: {}", map);
return Base64.decodeBase64(map.getMapData());
}
public List<Place> getMapPlaces(Integer eventId, Integer mapId)
{
EventMap map = mapFacade.getMapById(eventId, mapId);
return map.getPlaces();
}
public String getEventById(Integer id)
{
return "returning event with id " + id;
}
}
package fi.insomnia.bortal.beans.flash;
import java.util.List;
import javax.ejb.Local;
import fi.insomnia.bortal.model.Event;
import fi.insomnia.bortal.model.Place;
@Local
public interface FlashMapBeanLocal {
byte[] getMapBackground(Integer eventId, Integer mapId);
List<Place> getMapPlaces(Integer eventId, Integer mapId);
String getEventById(Integer id);
}
......@@ -10,13 +10,7 @@ import fi.insomnia.bortal.model.User;
@Stateless
public class AuthorisationBean implements AuthorisationBeanLocal {
public enum Right {
ADMIN
}
public enum RightType {
READ, WRITE, EXECUTE
}
/**
* Default constructor.
......
package fi.insomnia.bortal.beanutil;
import javax.ejb.Local;
import fi.insomnia.bortal.model.User;
@Local
public interface AuthorisationBeanLocal {
public enum Right {
ADMIN
}
public enum RightType {
READ, WRITE, EXECUTE
}
boolean isAuthorised(User currentuser, Right admin, RightType read);
}
......@@ -8,6 +8,8 @@ import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
import fi.insomnia.bortal.model.AccessRight;
import fi.insomnia.bortal.model.Event;
import fi.insomnia.bortal.model.Role;
@Stateless
@LocalBean
......@@ -53,4 +55,8 @@ public class AccessRightFacade extends IntegerPkGenericFacade<AccessRight> {
return right;
}
public void find(Event e, Role r) {
}
}
......@@ -20,9 +20,9 @@ public abstract class EventChildGenericFacade<T extends EventChildInterface> ext
public T find(Integer eventId, Integer id) {
EventPk pk = new EventPk(eventId);
pk.setId(id);
logger.debug("Fetching object {} with key {}", this.getEntityClass(), pk);
return find(pk);
}
......
......@@ -6,12 +6,16 @@ import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fi.insomnia.bortal.model.Event;
@Stateless
@LocalBean
public class EventFacade extends GenericFacade<Integer, Event> {
private static final Logger logger = LoggerFactory.getLogger(EventFacade.class);
@PersistenceContext
private EntityManager em;
......@@ -24,6 +28,7 @@ public class EventFacade extends GenericFacade<Integer, Event> {
}
public Event findByHostname(String hostname) {
logger.debug("finding event with hostname {}", hostname);
TypedQuery<Event> q = em.createNamedQuery("Event.findByReferer", Event.class);
q.setParameter("referer", hostname);
return this.getSingleNullableResult(q);
......
package fi.insomnia.bortal.facade;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fi.insomnia.bortal.model.EventMap;
@Stateless
......@@ -13,6 +21,9 @@ public class EventMapFacade extends EventChildGenericFacade<EventMap> {
@PersistenceContext
private EntityManager em;
@EJB
private EventMapFacade mapfacade;
public EventMapFacade() {
super(EventMap.class);
}
......@@ -21,4 +32,14 @@ public class EventMapFacade extends EventChildGenericFacade<EventMap> {
return em;
}
public EventMap getMapById(Integer eventId, Integer id) {
return mapfacade.find(eventId, id);
}
public EventMap findByName(String name) {
TypedQuery<EventMap> q = em.createNamedQuery("EventMap.findByName", EventMap.class);
q.setParameter("name", name);
return this.getSingleNullableResult(q);
}
}
......@@ -47,6 +47,7 @@ public abstract class GenericFacade<PK,T extends ModelInterface<PK>>{
}
public T find(PK id) {
logger.debug("GenericFacade Find class {} By pk {}", new Object[]{getEntityClass(), id});
T ret = getEm().find(getEntityClass(), id);
return ret;
}
......
......@@ -4,6 +4,11 @@ import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
import fi.insomnia.bortal.model.AccessRight;
import fi.insomnia.bortal.model.Event;
import fi.insomnia.bortal.model.Role;
import fi.insomnia.bortal.model.RoleRight;
@Stateless
......@@ -21,4 +26,12 @@ public class RoleRightFacade extends EventChildGenericFacade<RoleRight> {
return em;
}
public RoleRight find(Event event, AccessRight right, Role role) {
TypedQuery<RoleRight> q = this.getEm().createNamedQuery("RoleRight.findByRightAndRoleForEvent", RoleRight.class);
q.setParameter("accessright", right);
q.setParameter("role", role);
q.setParameter("event_id", event.getId());
return this.getSingleNullableResult(q);
}
}
......@@ -2,12 +2,16 @@
<classpath>
<classpathentry kind="src" path="ejbModule"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish v3 Java EE 6"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<classpathentry combineaccessrules="false" kind="src" path="/LanBortalAuthModuleClient"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish Server Open Source Edition 3 (Java EE 6)">
<attributes>
<attribute name="owner.project.facets" value="jst.utility"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM 1.6">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/LanBortalAuthModuleClient"/>
<classpathentry kind="output" path="ejbModule"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<graniteProperties version="2.0">
<gas3 uid="uid" as3TypeFactory="org.granite.generator.as3.DefaultAs3TypeFactory" entityFactory="org.granite.generator.as3.DefaultEntityFactory" remoteDestinationFactory="org.granite.generator.as3.DefaultRemoteDestinationFactory" debugEnabled="false" flexConfig="false">
<source path="ejbModule" includes="" excludes="" output="../LanBortalWeb/as3;"/>
<project path="LanBortalAuthModuleClient"/>
<project path="LanBortalDatabase"/>
<template kind="ENTITY" uris="class:org/granite/generator/template/entity.gsp;class:org/granite/generator/template/entityBase.gsp"/>
<template kind="BEAN" uris="class:org/granite/generator/template/bean.gsp;class:org/granite/generator/template/beanBase.gsp"/>
<template kind="REMOTE_DESTINATION" uris="class:org/granite/generator/template/remote.gsp;class:org/granite/generator/template/remoteBase.gsp"/>
<template kind="INTERFACE" uris="class:org/granite/generator/template/interface.gsp"/>
<template kind="ENUM" uris="class:org/granite/generator/template/enum.gsp"/>
<transformer type="org.granite.generator.as3.JavaAs3GroovyTransformer"/>
</gas3>
</graniteProperties>
\ No newline at end of file
......@@ -20,11 +20,17 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.granite.builder.granitebuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.granite.builder.granitenature</nature>
</natures>
</projectDescription>
#Thu Jun 10 02:19:46 EEST 2010
#Thu Jul 15 01:16:17 EEST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
......
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish Server Open Source Edition 3 (Java EE 6)"/>
<fixed facet="jst.utility"/>
<fixed facet="jst.java"/>
<installed facet="jst.java" version="5.0"/>
<installed facet="jst.utility" version="1.0"/>
<installed facet="jst.java" version="1.6"/>
</faceted-project>
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
public interface AccessRightBeanLocal {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
public interface BillBeanLocal {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
public interface EventBeanLocal {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR. INSTEAD, EDIT THE INHERITED CLASS (EventBeanLocal.as).
*/
package fi.insomnia.bortal.beans {
import mx.messaging.ChannelSet;
import mx.messaging.config.ServerConfig;
import mx.rpc.remoting.mxml.RemoteObject;
public class EventBeanLocalBase extends RemoteObject {
private var _initRemote:Boolean = false;
private function initRemote():void {
destination = "";
channelSet = new ChannelSet();
channelSet.addChannel(ServerConfig.getChannel(""));
_initRemote = true;
}
public function getEvent(arg0:Number):void {
if (!_initRemote)
initRemote();
getOperation("getEvent").send(arg0);
}
public function getEventByHostname(arg0:String):void {
if (!_initRemote)
initRemote();
getOperation("getEventByHostname").send(arg0);
}
public function addOperationListener(op:Function, type:String, handler:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void {
if (op == this.getEvent)
this.getOperation("getEvent").addEventListener(type, handler, useCapture, priority, useWeakReference);
if (op == this.getEventByHostname)
this.getOperation("getEventByHostname").addEventListener(type, handler, useCapture, priority, useWeakReference);
}
public function removeOperationListener(op:Function, event:String, handler:Function):void {
if (op == this.getEvent)
this.getOperation("getEvent").removeEventListener(event, handler);
if (op == this.getEventByHostname)
this.getOperation("getEventByHostname").removeEventListener(event, handler);
}
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
public interface EventStatusBeanLocal {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
public interface JaasBeanLocal {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
import fi.insomnia.bortal.RealmBeanRemote;
public interface JaasBeanRemote extends RealmBeanRemote {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
public interface PlaceBeanLocal {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR. INSTEAD, EDIT THE INHERITED CLASS (PlaceBeanLocal.as).
*/
package fi.insomnia.bortal.beans {
import fi.insomnia.bortal.model.Place;
import mx.messaging.ChannelSet;
import mx.messaging.config.ServerConfig;
import mx.rpc.remoting.mxml.RemoteObject;
public class PlaceBeanLocalBase extends RemoteObject {
private var _initRemote:Boolean = false;
private function initRemote():void {
destination = "";
channelSet = new ChannelSet();
channelSet.addChannel(ServerConfig.getChannel(""));
_initRemote = true;
}
public function mergeChanges(arg0:Place):void {
if (!_initRemote)
initRemote();
getOperation("mergeChanges").send(arg0);
}
public function addOperationListener(op:Function, type:String, handler:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void {
if (op == this.mergeChanges)
this.getOperation("mergeChanges").addEventListener(type, handler, useCapture, priority, useWeakReference);
}
public function removeOperationListener(op:Function, event:String, handler:Function):void {
if (op == this.mergeChanges)
this.getOperation("mergeChanges").removeEventListener(event, handler);
}
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
public interface PlaceMapBeanLocal {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR. INSTEAD, EDIT THE INHERITED CLASS (PlaceMapBeanLocal.as).
*/
package fi.insomnia.bortal.beans {
import fi.insomnia.bortal.model.Event;
import fi.insomnia.bortal.model.EventMap;
import fi.insomnia.bortal.model.User;
import java.io.OutputStream;
import mx.collections.ListCollectionView;
import mx.messaging.ChannelSet;
import mx.messaging.config.ServerConfig;
import mx.rpc.remoting.mxml.RemoteObject;
public class PlaceMapBeanLocalBase extends RemoteObject {
private var _initRemote:Boolean = false;
private function initRemote():void {
destination = "";
channelSet = new ChannelSet();
channelSet.addChannel(ServerConfig.getChannel(""));
_initRemote = true;
}
public function printPlaceMapToStream(arg0:OutputStream, arg1:String, arg2:Event, arg3:Number, arg4:ListCollectionView):void {
if (!_initRemote)
initRemote();
getOperation("printPlaceMapToStream").send(arg0, arg1, arg2, arg3, arg4);
}
public function getSelectPlaceMapUrl(arg0:EventMap, arg1:ListCollectionView, arg2:User):void {
if (!_initRemote)
initRemote();
getOperation("getSelectPlaceMapUrl").send(arg0, arg1, arg2);
}
public function selectablePlaceCount(arg0:User, arg1:Event):void {
if (!_initRemote)
initRemote();
getOperation("selectablePlaceCount").send(arg0, arg1);
}
public function addOperationListener(op:Function, type:String, handler:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void {
if (op == this.printPlaceMapToStream)
this.getOperation("printPlaceMapToStream").addEventListener(type, handler, useCapture, priority, useWeakReference);
if (op == this.getSelectPlaceMapUrl)
this.getOperation("getSelectPlaceMapUrl").addEventListener(type, handler, useCapture, priority, useWeakReference);
if (op == this.selectablePlaceCount)
this.getOperation("selectablePlaceCount").addEventListener(type, handler, useCapture, priority, useWeakReference);
}
public function removeOperationListener(op:Function, event:String, handler:Function):void {
if (op == this.printPlaceMapToStream)
this.getOperation("printPlaceMapToStream").removeEventListener(event, handler);
if (op == this.getSelectPlaceMapUrl)
this.getOperation("getSelectPlaceMapUrl").removeEventListener(event, handler);
if (op == this.selectablePlaceCount)
this.getOperation("selectablePlaceCount").removeEventListener(event, handler);
}
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
public interface ProductBeanLocal {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
public interface RoleBeanLocal {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
public interface SecurityBeanLocal {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
import org.granite.util.Enum;
[Bindable]
[RemoteClass(alias="fi.insomnia.bortal.beans.SecurityLogType")]
public class SecurityLogType extends Enum {
public static const permissionDenied:SecurityLogType = new SecurityLogType("permissionDenied", _);
public static const unknownException:SecurityLogType = new SecurityLogType("unknownException", _);
public static const genericMessage:SecurityLogType = new SecurityLogType("genericMessage", _);
function SecurityLogType(value:String = null, restrictor:* = null) {
super((value || permissionDenied.name), restrictor);
}
override protected function getConstants():Array {
return constants;
}
public static function get constants():Array {
return [permissionDenied, unknownException, genericMessage];
}
public static function valueOf(name:String):SecurityLogType {
return SecurityLogType(permissionDenied.constantOf(name));
}
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
public interface TestDataBeanLocal {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
import mx.collections.ListCollectionView;
public interface UserBeanLocal {
function get users():ListCollectionView;
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR. INSTEAD, EDIT THE INHERITED CLASS (UserBeanLocal.as).
*/
package fi.insomnia.bortal.beans {
import fi.insomnia.bortal.enums.Permission;
import fi.insomnia.bortal.enums.RolePermission;
import fi.insomnia.bortal.model.Event;
import fi.insomnia.bortal.model.User;
import mx.messaging.ChannelSet;
import mx.messaging.config.ServerConfig;
import mx.rpc.remoting.mxml.RemoteObject;
public class UserBeanLocalBase extends RemoteObject {
private var _initRemote:Boolean = false;
private function initRemote():void {
destination = "";
channelSet = new ChannelSet();
channelSet.addChannel(ServerConfig.getChannel(""));
_initRemote = true;
}
public function hasPermission(arg0:Permission, arg1:User, arg2:RolePermission):void {
if (!_initRemote)
initRemote();
getOperation("hasPermission").send(arg0, arg1, arg2);
}
public function getUsers():void {
if (!_initRemote)
initRemote();
getOperation("getUsers").send();
}
public function mergeChanges(arg0:User):void {
if (!_initRemote)
initRemote();
getOperation("mergeChanges").send(arg0);
}
public function getUser(arg0:String):void {
if (!_initRemote)
initRemote();
getOperation("getUser").send(arg0);
}
public function getDefaultUser(arg0:Event):void {
if (!_initRemote)
initRemote();
getOperation("getDefaultUser").send(arg0);
}
public function createNewUser(arg0:String, arg1:String):void {
if (!_initRemote)
initRemote();
getOperation("createNewUser").send(arg0, arg1);
}
public function getCurrentUser(arg0:Event):void {
if (!_initRemote)
initRemote();
getOperation("getCurrentUser").send(arg0);
}
public function isCurrentUser(arg0:User):void {
if (!_initRemote)
initRemote();
getOperation("isCurrentUser").send(arg0);
}
public function addOperationListener(op:Function, type:String, handler:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void {
if (op == this.hasPermission)
this.getOperation("hasPermission").addEventListener(type, handler, useCapture, priority, useWeakReference);
if (op == this.getUsers)
this.getOperation("getUsers").addEventListener(type, handler, useCapture, priority, useWeakReference);
if (op == this.mergeChanges)
this.getOperation("mergeChanges").addEventListener(type, handler, useCapture, priority, useWeakReference);
if (op == this.getUser)
this.getOperation("getUser").addEventListener(type, handler, useCapture, priority, useWeakReference);
if (op == this.getDefaultUser)
this.getOperation("getDefaultUser").addEventListener(type, handler, useCapture, priority, useWeakReference);
if (op == this.createNewUser)
this.getOperation("createNewUser").addEventListener(type, handler, useCapture, priority, useWeakReference);
if (op == this.getCurrentUser)
this.getOperation("getCurrentUser").addEventListener(type, handler, useCapture, priority, useWeakReference);
if (op == this.isCurrentUser)
this.getOperation("isCurrentUser").addEventListener(type, handler, useCapture, priority, useWeakReference);
}
public function removeOperationListener(op:Function, event:String, handler:Function):void {
if (op == this.hasPermission)
this.getOperation("hasPermission").removeEventListener(event, handler);
if (op == this.getUsers)
this.getOperation("getUsers").removeEventListener(event, handler);
if (op == this.mergeChanges)
this.getOperation("mergeChanges").removeEventListener(event, handler);
if (op == this.getUser)
this.getOperation("getUser").removeEventListener(event, handler);
if (op == this.getDefaultUser)
this.getOperation("getDefaultUser").removeEventListener(event, handler);
if (op == this.createNewUser)
this.getOperation("createNewUser").removeEventListener(event, handler);
if (op == this.getCurrentUser)
this.getOperation("getCurrentUser").removeEventListener(event, handler);
if (op == this.isCurrentUser)
this.getOperation("isCurrentUser").removeEventListener(event, handler);
}
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.enums {
import org.granite.util.Enum;
[Bindable]
[RemoteClass(alias="fi.insomnia.bortal.enums.BeanRole")]
public class BeanRole extends Enum {
public static const ANONYMOUS:BeanRole = new BeanRole("ANONYMOUS", _);
public static const USER_BASE:BeanRole = new BeanRole("USER_BASE", _);
public static const ADMIN_BASE:BeanRole = new BeanRole("ADMIN_BASE", _);
public static const SUPERADMIN:BeanRole = new BeanRole("SUPERADMIN", _);
public static const ORGANIZATION_ROOT:BeanRole = new BeanRole("ORGANIZATION_ROOT", _);
function BeanRole(value:String = null, restrictor:* = null) {
super((value || ANONYMOUS.name), restrictor);
}
override protected function getConstants():Array {
return constants;
}
public static function get constants():Array {
return [ANONYMOUS, USER_BASE, ADMIN_BASE, SUPERADMIN, ORGANIZATION_ROOT];
}
public static function valueOf(name:String):BeanRole {
return BeanRole(ANONYMOUS.constantOf(name));
}
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.enums {
import org.granite.util.Enum;
[Bindable]
[RemoteClass(alias="fi.insomnia.bortal.enums.EventStatusEnum")]
public class EventStatusEnum extends Enum {
public static const INACTIVE:EventStatusEnum = new EventStatusEnum("INACTIVE", _);
public static const TICKET_SALES:EventStatusEnum = new EventStatusEnum("TICKET_SALES", _);
public static const PRE_EVENT:EventStatusEnum = new EventStatusEnum("PRE_EVENT", _);
public static const RUNNING:EventStatusEnum = new EventStatusEnum("RUNNING", _);
public static const SPLITTED:EventStatusEnum = new EventStatusEnum("SPLITTED", _);
public static const ARCHIVED:EventStatusEnum = new EventStatusEnum("ARCHIVED", _);
function EventStatusEnum(value:String = null, restrictor:* = null) {
super((value || INACTIVE.name), restrictor);
}
override protected function getConstants():Array {
return constants;
}
public static function get constants():Array {
return [INACTIVE, TICKET_SALES, PRE_EVENT, RUNNING, SPLITTED, ARCHIVED];
}
public static function valueOf(name:String):EventStatusEnum {
return EventStatusEnum(INACTIVE.constantOf(name));
}
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.enums {
import org.granite.util.Enum;
[Bindable]
[RemoteClass(alias="fi.insomnia.bortal.enums.Permission")]
public class Permission extends Enum {
public static const PERMISSION:Permission = new Permission("PERMISSION", _);
public static const LOGIN:Permission = new Permission("LOGIN", _);
public static const USER_MANAGEMENT:Permission = new Permission("USER_MANAGEMENT", _);
public static const TICKET_SALES:Permission = new Permission("TICKET_SALES", _);
public static const ROLE_MANAGEMENT:Permission = new Permission("ROLE_MANAGEMENT", _);
function Permission(value:String = null, restrictor:* = null) {
super((value || PERMISSION.name), restrictor);
}
override protected function getConstants():Array {
return constants;
}
public static function get constants():Array {
return [PERMISSION, LOGIN, USER_MANAGEMENT, TICKET_SALES, ROLE_MANAGEMENT];
}
public static function valueOf(name:String):Permission {
return Permission(PERMISSION.constantOf(name));
}
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.enums {
import org.granite.util.Enum;
[Bindable]
[RemoteClass(alias="fi.insomnia.bortal.enums.RolePermission")]
public class RolePermission extends Enum {
public static const READ:RolePermission = new RolePermission("READ", _);
public static const WRITE:RolePermission = new RolePermission("WRITE", _);
public static const EXECUTE:RolePermission = new RolePermission("EXECUTE", _);
function RolePermission(value:String = null, restrictor:* = null) {
super((value || READ.name), restrictor);
}
override protected function getConstants():Array {
return constants;
}
public static function get constants():Array {
return [READ, WRITE, EXECUTE];
}
public static function valueOf(name:String):RolePermission {
return RolePermission(READ.constantOf(name));
}
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* NOTE: this file is only generated if it does not exist. You may safely put
* your custom code here.
*/
package fi.insomnia.bortal.exceptions {
[Bindable]
[RemoteClass(alias="fi.insomnia.bortal.exceptions.EjbPermissionDeniedException")]
public class EjbPermissionDeniedException extends EjbPermissionDeniedExceptionBase {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR. INSTEAD, EDIT THE INHERITED CLASS (EjbPermissionDeniedException.as).
*/
package fi.insomnia.bortal.exceptions {
import flash.utils.IDataInput;
import flash.utils.IDataOutput;
import flash.utils.IExternalizable;
[Bindable]
public class EjbPermissionDeniedExceptionBase implements IExternalizable {
public function readExternal(input:IDataInput):void {
}
public function writeExternal(output:IDataOutput):void {
}
}
}
\ No newline at end of file
Manifest-Version: 1.0
Class-Path: lib/LanBortalDatabase.jar
Class-Path: lib/LanBortalDatabase.jar lib/granite.jar
......@@ -8,11 +8,14 @@ package fi.insomnia.bortal.beans;
import fi.insomnia.bortal.model.Place;
import javax.ejb.Local;
import org.granite.messaging.service.annotations.RemoteDestination;
/**
*
* @author tuukka
*/
@Local
@RemoteDestination
public interface PlaceBeanLocal {
public Place mergeChanges(Place place);
......
......@@ -6,6 +6,8 @@ import java.util.List;
import javax.ejb.Local;
import org.granite.messaging.service.annotations.RemoteDestination;
import fi.insomnia.bortal.exceptions.EjbPermissionDeniedException;
import fi.insomnia.bortal.model.Event;
import fi.insomnia.bortal.model.EventMap;
......@@ -13,6 +15,7 @@ import fi.insomnia.bortal.model.Place;
import fi.insomnia.bortal.model.User;
@Local
@RemoteDestination
public interface PlaceMapBeanLocal {
void printPlaceMapToStream(OutputStream outputStream, String filetype, Event event, Integer mapId, List<Integer> placeIds) throws EjbPermissionDeniedException,IOException;
......
......@@ -5,11 +5,15 @@
package fi.insomnia.bortal.beans;
import fi.insomnia.bortal.model.Role;
import java.util.List;
import javax.ejb.Local;
import fi.insomnia.bortal.model.AccessRight;
import fi.insomnia.bortal.model.Event;
import fi.insomnia.bortal.model.Role;
import fi.insomnia.bortal.model.RoleRight;
/**
*
* @author tuukka
......@@ -24,5 +28,11 @@ public interface RoleBeanLocal {
public Role create(Role role);
public List<Role> getPossibleParents(Role role);
public List<RoleRight> getEventRoleRights(Event e, Role r);
public RoleRight mergeChanges(RoleRight row);
}
......@@ -20,4 +20,6 @@ public interface SecurityBeanLocal {
LogEntry logMessage(SecurityLogType type, String description);
LogEntry logPermissionDenied(User currentuser, String message);
}
......@@ -28,4 +28,10 @@ public interface TestDataBeanLocal {
User createAdmin();
EventMap readMap(long bytes);
void writeMap(Event e, long bytes);
void flushMaps();
}
......@@ -4,6 +4,8 @@ import java.util.List;
import javax.ejb.Local;
import org.granite.messaging.service.annotations.RemoteDestination;
import fi.insomnia.bortal.enums.Permission;
import fi.insomnia.bortal.enums.RolePermission;
import fi.insomnia.bortal.model.Event;
......
......@@ -2,12 +2,17 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/LanBortalUtilities"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<classpathentry combineaccessrules="false" kind="src" path="/LanBortalUtilities"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish Server Open Source Edition 3 (Java EE 6)">
<attributes>
<attribute name="owner.project.facets" value="jst.utility"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM 1.6">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish v3 Java EE 6"/>
<classpathentry kind="lib" path="/LanBortal/ExtraLibs/granite.jar"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<graniteProperties version="2.0">
<gas3 uid="uid" as3TypeFactory="org.granite.generator.as3.DefaultAs3TypeFactory" entityFactory="org.granite.generator.as3.DefaultEntityFactory" remoteDestinationFactory="org.granite.generator.as3.DefaultRemoteDestinationFactory" debugEnabled="false" flexConfig="false">
<source path="src" includes="" excludes="" output="../LanBortalWeb/as3;"/>
<template kind="ENTITY" uris="class:org/granite/generator/template/entity.gsp;class:org/granite/generator/template/entityBase.gsp"/>
<template kind="BEAN" uris="class:org/granite/generator/template/bean.gsp;class:org/granite/generator/template/beanBase.gsp"/>
<template kind="REMOTE_DESTINATION" uris="class:org/granite/generator/template/remote.gsp;class:org/granite/generator/template/remoteBase.gsp"/>
<template kind="INTERFACE" uris="class:org/granite/generator/template/interface.gsp"/>
<template kind="ENUM" uris="class:org/granite/generator/template/enum.gsp"/>
<transformer type="org.granite.generator.as3.JavaAs3GroovyTransformer"/>
</gas3>
</graniteProperties>
\ No newline at end of file
......@@ -31,11 +31,23 @@
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.granite.builder.granitebuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.axdt.as3.imp.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.granite.builder.granitenature</nature>
<nature>org.axdt.as3.imp.nature</nature>
</natures>
</projectDescription>
#Thu Jul 15 02:45:50 EEST 2010
SOURCE_PATHS=../LanBortalWeb/as3
eclipse.preferences.version=1
#Sun Dec 20 03:33:41 EET 2009
#Thu Jul 15 01:17:01 EEST 2010
eclipse.preferences.version=1
org.eclipse.jpt.core.discoverAnnotatedClasses=true
org.eclipse.jpt.core.platform=eclipselink1_1
org.eclipse.jpt.core.platform=eclipselink2_1
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish Server Open Source Edition 3 (Java EE 6)"/>
<fixed facet="jst.utility"/>
<fixed facet="jst.java"/>
<fixed facet="jpt.jpa"/>
<installed facet="jst.java" version="6.0"/>
<installed facet="jst.utility" version="1.0"/>
<installed facet="jpt.jpa" version="1.0"/>
<installed facet="jpt.jpa" version="2.0"/>
</faceted-project>
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* NOTE: this file is only generated if it does not exist. You may safely put
* your custom code here.
*/
package fi.insomnia.bortal.model {
[Bindable]
[RemoteClass(alias="fi.insomnia.bortal.model.Event")]
public class Event extends EventBase {
}
}
\ No newline at end of file
......@@ -12,5 +12,6 @@
<target name="LanBortalDatabase.jar" unless="LanBortalDatabase.jar-uptodate">
<jar destfile="${LanBortalDatabase.jar}" basedir="build/classes" />
</target>
</project>
\ No newline at end of file
......@@ -6,6 +6,7 @@
<property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
<property name="eclipselink.ddl-generation.output-mode" value="both"/>
<property name="eclipselink.cache.type.default" value="NONE"/>
<property name="eclipselink.logging.level" value="ALL"/>
</properties>
</persistence-unit>
......
......@@ -99,7 +99,7 @@ public class Event implements ModelInterface<Integer> {
private List<Role> roles;
@Version
@Column(nullable = false)
@Column(nullable = true)
private int jpaVersionField = 0;
@OneToMany(mappedBy = "event")
......
......@@ -28,6 +28,8 @@ import javax.persistence.Version;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fi.insomnia.bortal.utilities.apachecodec.binary.Base64;
/**
*
*/
......@@ -44,10 +46,11 @@ public class EventMap implements EventChildInterface {
private EventPk id;
@Lob
@Column(name = "map_data")
private byte[] mapData;
private String mapData;
@Column(name = "map_name")
private String name;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "map")
@OneToMany(cascade = CascadeType.ALL, mappedBy = "map")
private List<Place> places = new ArrayList<Place>();
@ManyToOne(optional = false)
@JoinColumn(name = "event_id", referencedColumnName = "event_id", insertable = false, updatable = false, nullable = false)
......@@ -65,13 +68,6 @@ public class EventMap implements EventChildInterface {
this.id = new EventPk(event);
}
public byte[] getMapData() {
return mapData;
}
public void setMapData(byte[] mapData) {
this.mapData = mapData;
}
public String getName() {
return name;
......@@ -167,7 +163,7 @@ public class EventMap implements EventChildInterface {
public BufferedImage getMapWithPlaces() throws IOException {
BufferedImage image = ImageIO.read(new ByteArrayInputStream(getMapData()));
BufferedImage image = ImageIO.read(new ByteArrayInputStream(Base64.decodeBase64( getMapData())));
List<Place> myplaces = getPlaces();
logger.info("Getting places in Event map {}, found {}", this, myplaces.size());
......@@ -197,4 +193,12 @@ public class EventMap implements EventChildInterface {
return null;
}
public void setMapData(String mapData) {
this.mapData = mapData;
}
public String getMapData() {
return mapData;
}
}
......@@ -9,6 +9,7 @@ import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
......@@ -46,7 +47,7 @@ public class EventOrganiser implements ModelInterface<Integer> {
@OneToMany(cascade = CascadeType.ALL, mappedBy = "organiser")
private List<Event> events;
@ManyToOne
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name = "admin_user_id", referencedColumnName = "user_id", nullable = false)
private User admin;
......
......@@ -31,7 +31,13 @@ public class EventPk implements Serializable {
super();
this.setEventId(eventId);
}
public EventPk(Integer eventId, Integer id)
{
super();
this.setEventId(eventId);
this.setId(id);
}
public void setId(Integer id) {
this.id = id;
}
......
......@@ -17,14 +17,13 @@ import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;
/**
*
*/
@Entity
@Table(name = "event_log_types", uniqueConstraints = { @UniqueConstraint(columnNames = { "events_pk_id", "logentry_name" }) })
@Table(name = "event_log_types") //, uniqueConstraints = { @UniqueConstraint(columnNames = { "events_pk_id", "type_name" }) })
@NamedQueries( {
@NamedQuery(name = "LogEntryType.findAll", query = "SELECT l FROM LogEntryType l"),
@NamedQuery(name = "LogEntryType.findByName", query = "SELECT l FROM LogEntryType l WHERE l.name = :name"),
......@@ -41,7 +40,7 @@ public class LogEntryType implements ModelInterface<Integer> {
/**
* Do not change this.. log entries are added to this field..
*/
@Column(name = "type_name", nullable = false, updatable = false)
@Column(name = "type_name", nullable = false, updatable = false, unique = true)
private String name;
@Lob
......
......@@ -2,6 +2,12 @@ package fi.insomnia.bortal.model;
import java.io.Serializable;
import javax.persistence.EntityListeners;
import org.granite.tide.data.DataPublishListener;
@EntityListeners(DataPublishListener.class)
public interface ModelInterface<T> extends Serializable {
public T getId();
......
......@@ -27,7 +27,7 @@ import javax.persistence.Version;
*
*/
@Entity
@Table(name = "roles", uniqueConstraints = { @UniqueConstraint(columnNames = { "events_id", "role_name" }) })
@Table(name = "roles", uniqueConstraints = { @UniqueConstraint(columnNames = { "event_id", "role_name" }) })
@NamedQueries( {
@NamedQuery(name = "Role.findAll", query = "SELECT r FROM Role r"),
@NamedQuery(name = "Role.findByRoleName", query = "SELECT r FROM Role r WHERE r.name = :name") })
......
......@@ -13,6 +13,7 @@ import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;
/**
......@@ -20,20 +21,9 @@ import javax.persistence.Version;
* @author jkj
*/
@Entity
@Table(name = "role_rights")
@NamedQueries( { @NamedQuery(name = "RoleRight.findAll", query = "SELECT r FROM RoleRight r")
/*
* ,
*
* @ NamedQuery ( name = "RoleRight.findByRead" , query =
* "SELECT r FROM RoleRight r WHERE r.read = :read" ) ,
*
* @ NamedQuery ( name = "RoleRight.findByWrite" , query =
* "SELECT r FROM RoleRight r WHERE r.write = :write" ) ,
*
* @ NamedQuery ( name = "RoleRight.findByExecute" , query =
* "SELECT r FROM RoleRight r WHERE r.execute = :execute" )
*/})
@Table(name = "role_rights", uniqueConstraints = {@UniqueConstraint(columnNames = { "event_id","role_id", "access_right_id" })})
@NamedQueries( { @NamedQuery(name = "RoleRight.findAll", query = "SELECT r FROM RoleRight r"),
@NamedQuery(name = "RoleRight.findByRightAndRoleForEvent", query = "SELECT r FROM RoleRight r where r.role = :role and r.accessRight = :accessright and r.id.eventId = :event_id")})
public class RoleRight implements EventChildInterface {
private static final long serialVersionUID = 1L;
......@@ -79,7 +69,7 @@ public class RoleRight implements EventChildInterface {
this.execute = execute;
}
public boolean getRead() {
public boolean isRead() {
return read;
}
......@@ -87,7 +77,7 @@ public class RoleRight implements EventChildInterface {
this.read = read;
}
public boolean getWrite() {
public boolean isWrite() {
return write;
}
......
......@@ -10,6 +10,7 @@ import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
......@@ -143,7 +144,7 @@ public class User implements ModelInterface<Integer> {
/**
* The places this user has registered into.
*/
@OneToMany(mappedBy = "currentUser")
@OneToMany(mappedBy = "currentUser", fetch=FetchType.LAZY)
private List<Place> currentPlaces;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "user")
......
......@@ -24,11 +24,9 @@ import javax.persistence.Version;
* A vote for a compo entry
*/
@Entity
@Table(name = "votes", uniqueConstraints = { @UniqueConstraint(columnNames = {
"entries_id", "users_id" }) })
@NamedQueries( {
@Table(name = "votes", uniqueConstraints = { @UniqueConstraint(columnNames = { "entry_id", "event_id", "voter_user_id" }) })
@NamedQueries({
@NamedQuery(name = "Vote.findAll", query = "SELECT v FROM Vote v"),
@NamedQuery(name = "Vote.findByScore", query = "SELECT v FROM Vote v WHERE v.score = :score"),
@NamedQuery(name = "Vote.findByTime", query = "SELECT v FROM Vote v WHERE v.time = :time") })
public class Vote implements EventChildInterface {
......@@ -44,7 +42,7 @@ public class Vote implements EventChildInterface {
@Temporal(TemporalType.TIMESTAMP)
private Calendar time;
@JoinColumns( {
@JoinColumns({
@JoinColumn(name = "entry_id", referencedColumnName = "id", nullable = false, updatable = false, insertable = false),
@JoinColumn(name = "event_id", referencedColumnName = "event_id", nullable = false, updatable = false, insertable = false) })
@ManyToOne(optional = false)
......
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>LanBortalFlash</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.axdt.as3.imp.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.axdt.as3.imp.nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
#Wed Jul 14 04:57:37 EEST 2010
DEPLOY_PATH=flashdeploy
LIBRARY_PATHS=flashlibs
SOURCE_PATHS=flashsrc
eclipse.preferences.version=1
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal {
public interface RealmBeanRemote {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
public interface AccessRightBeanLocal {
}
}
\ No newline at end of file
/**
* Generated by Gas3 v2.1.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR.
*/
package fi.insomnia.bortal.beans {
public interface BillBeanLocal {
}
}
\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!