Commit cdcfd95f by Tuomas Riihimäki

There I fixed it..

1 parent 0b4ec8da
Showing with 172 additions and 542 deletions
No preview for this file type
No preview for this file type
...@@ -5,5 +5,6 @@ ...@@ -5,5 +5,6 @@
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1.2"/> <classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1.2"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/MoyaAuthModuleClient"/> <classpathentry combineaccessrules="false" kind="src" path="/MoyaAuthModuleClient"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/auth-libs"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<name>MoyaAuthModule</name> <name>MoyaAuthModule</name>
<comment></comment> <comment></comment>
<projects> <projects>
<project>LanBortalBeansClient</project> <project>MoyaBeansClient</project>
</projects> </projects>
<buildSpec> <buildSpec>
<buildCommand> <buildCommand>
......
...@@ -6,7 +6,7 @@ import javax.security.auth.login.LoginException; ...@@ -6,7 +6,7 @@ import javax.security.auth.login.LoginException;
import com.sun.appserv.security.AppservCertificateLoginModule; import com.sun.appserv.security.AppservCertificateLoginModule;
public class BortalCertificateLoginModule extends AppservCertificateLoginModule { public class MoyaCertificateLoginModule extends AppservCertificateLoginModule {
@Override @Override
protected void authenticateUser() throws LoginException { protected void authenticateUser() throws LoginException {
......
...@@ -54,7 +54,7 @@ import com.sun.enterprise.security.auth.realm.NoSuchUserException; ...@@ -54,7 +54,7 @@ import com.sun.enterprise.security.auth.realm.NoSuchUserException;
* commitUserAuthentication * commitUserAuthentication
*/ */
public class BortalLoginModule extends AppservPasswordLoginModule { public class MoyaLoginModule extends AppservPasswordLoginModule {
// private static final org.slf4j.Logger logger = // private static final org.slf4j.Logger logger =
// LoggerFactory.getLogger(BortalLoginModule.class); // LoggerFactory.getLogger(BortalLoginModule.class);
...@@ -69,33 +69,32 @@ public class BortalLoginModule extends AppservPasswordLoginModule { ...@@ -69,33 +69,32 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
@Override @Override
protected void authenticateUser() throws LoginException { protected void authenticateUser() throws LoginException {
log((new StringBuilder()).append("CustomRealm Auth Info:_username:") log((new StringBuilder()).append("Moya CustomRealm Auth Info:_username:")
.append(_username) .append(_username)
// .append(";_password:").append(_passwd) // .append(";_password:").append(_passwd)
.append(";_currentrealm:").append(_currentRealm).toString()); .append(";_currentrealm:").append(_currentRealm).toString());
// Check if the given realm is SampleRealm // Check if the given realm is SampleRealm
if (!(_currentRealm instanceof BortalRealm)) { if (!(_currentRealm instanceof MoyaRealm)) {
throw new LoginException("Realm not SampleRealm"); throw new LoginException("Realm not MoyaRealm");
} }
RealmBeanRemote authbean = BortalRealm.getAuthBean(); MoyaRealmBeanRemote authbean = MoyaRealm.getAuthBean();
if (authbean == null) { if (authbean == null) {
throw new LoginException( throw new LoginException("Moya authentication error. Could not get authentication bean!");
"Error. Could not get authentication bean!");
} }
// Authenticate User // Authenticate User
BortalRealm samplerealm = (BortalRealm) _currentRealm; MoyaRealm samplerealm = (MoyaRealm) _currentRealm;
if (!authbean.authenticate(_username, new String(_passwd))) { if (!authbean.authenticate(_username, new String(_passwd))) {
// Login fails // Login fails
throw new LoginException((new StringBuilder()) throw new LoginException((new StringBuilder())
.append("customrealm:Login Failed for user ") .append("moya realm:Login Failed for user ")
.append(_username).toString()); .append(_username).toString());
} }
// Login succeeds // Login succeeds
log((new StringBuilder()).append("SimpleRealm:login succeeded for ") log((new StringBuilder()).append("MoyaRealm:login succeeded for ")
.append(_username).toString()); .append(_username).toString());
// Get group names for the authenticated user from the Realm class // Get group names for the authenticated user from the Realm class
...@@ -106,13 +105,13 @@ public class BortalLoginModule extends AppservPasswordLoginModule { ...@@ -106,13 +105,13 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
throw new LoginException( throw new LoginException(
(new StringBuilder()) (new StringBuilder())
.append("An InvalidOperationException was thrown ") .append("An InvalidOperationException was thrown ")
.append(" while calling getGroupNames() on the SampleRealm ") .append(" while calling getGroupNames() on the MoyaRealm ")
.append(invalidoperationexception).toString()); .append(invalidoperationexception).toString());
} catch (NoSuchUserException nosuchuserexception) { } catch (NoSuchUserException nosuchuserexception) {
throw new LoginException( throw new LoginException(
(new StringBuilder()) (new StringBuilder())
.append("A NoSuchUserException was thrown ") .append("A NoSuchUserException was thrown ")
.append(" while calling getGroupNames() on the SampleRealm ") .append(" while calling getGroupNames() on the MoyaRealm ")
.append(nosuchuserexception).toString()); .append(nosuchuserexception).toString());
} }
ArrayList<String> authenticatedGroups = new ArrayList<String>(); ArrayList<String> authenticatedGroups = new ArrayList<String>();
...@@ -134,7 +133,7 @@ public class BortalLoginModule extends AppservPasswordLoginModule { ...@@ -134,7 +133,7 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
} }
private void log(String s) { private void log(String s) {
System.out.println("BortalLoginModule: " + s); System.out.println("MoyaLoginModule: " + s);
} }
} }
...@@ -54,12 +54,13 @@ import com.sun.enterprise.security.auth.realm.NoSuchUserException; ...@@ -54,12 +54,13 @@ import com.sun.enterprise.security.auth.realm.NoSuchUserException;
* Custom Realm Class that stores user-group information * Custom Realm Class that stores user-group information
*/ */
public class BortalRealm extends AppservRealm { public class MoyaRealm extends AppservRealm {
// private static final Logger logger = // private static final Logger logger =
// LoggerFactory.getLogger(BortalRealm.class); // LoggerFactory.getLogger(BortalRealm.class);
private static final String JAAS_BEAN_JNDI = "java:global/LanBortal/LanBortalBeans/JaasBean!fi.codecrew.moya.beans.JaasBeanRemote"; // private static final String JAAS_BEAN_JNDI =
// "java:global/LanBortal/LanBortalBeans/JaasBean!fi.codecrew.moya.beans.JaasBeanRemote";
/** /**
* Initialization - set the jaas-context property, Set UserA to devGroup and * Initialization - set the jaas-context property, Set UserA to devGroup and
...@@ -74,7 +75,7 @@ public class BortalRealm extends AppservRealm { ...@@ -74,7 +75,7 @@ public class BortalRealm extends AppservRealm {
public void init(Properties properties) public void init(Properties properties)
throws BadRealmException, NoSuchRealmException { throws BadRealmException, NoSuchRealmException {
super.init(properties); super.init(properties);
log("Init BortalRealm"); log("Init MoyaRealm");
String propJaasContext = properties.getProperty(JAAS_CONTEXT_PARAM); String propJaasContext = properties.getProperty(JAAS_CONTEXT_PARAM);
if (propJaasContext != null) { if (propJaasContext != null) {
setProperty(JAAS_CONTEXT_PARAM, propJaasContext); setProperty(JAAS_CONTEXT_PARAM, propJaasContext);
...@@ -110,17 +111,17 @@ public class BortalRealm extends AppservRealm { ...@@ -110,17 +111,17 @@ public class BortalRealm extends AppservRealm {
append(s).toString()); append(s).toString());
} }
public static RealmBeanRemote getAuthBean() { public static MoyaRealmBeanRemote getAuthBean() {
Object beanObj = null; Object beanObj = null;
try { try {
beanObj = new InitialContext().lookup(JAAS_BEAN_JNDI); beanObj = new InitialContext().lookup(MoyaRealmBeanRemote.REMOTE_BEAN_NAME);
} catch (NamingException e) { } catch (NamingException e) {
log("Error fetching LoginHandlerRemote bean from initial context"); log("Error fetching LoginHandlerRemote bean from initial context");
e.printStackTrace(); e.printStackTrace();
return null; return null;
} }
if (beanObj instanceof RealmBeanRemote) { if (beanObj instanceof MoyaRealmBeanRemote) {
return (RealmBeanRemote) beanObj; return (MoyaRealmBeanRemote) beanObj;
} }
return null; return null;
......
...@@ -7,6 +7,8 @@ import javax.ejb.Remote; ...@@ -7,6 +7,8 @@ import javax.ejb.Remote;
@Remote @Remote
public interface MoyaRealmBeanRemote { public interface MoyaRealmBeanRemote {
public static final String REMOTE_BEAN_NAME = "MoyaRemoteRealmBean";
Enumeration<String> getGroupNames(String user); Enumeration<String> getGroupNames(String user);
boolean authenticate(String _username, String string); boolean authenticate(String _username, String string);
......
...@@ -42,13 +42,9 @@ import org.xml.sax.SAXException; ...@@ -42,13 +42,9 @@ import org.xml.sax.SAXException;
import com.sun.org.apache.xerces.internal.parsers.DOMParser; import com.sun.org.apache.xerces.internal.parsers.DOMParser;
import fi.codecrew.moya.checkoutfi.CheckoutFiParam; import fi.codecrew.moya.checkoutfi.CheckoutFiParam;
import fi.codecrew.moya.facade.BillFacade;
import fi.codecrew.moya.beans.CheckoutFiBeanLocal;
import fi.codecrew.moya.beans.LoggingBeanLocal;
import fi.codecrew.moya.beans.PermissionBeanLocal;
import fi.codecrew.moya.beans.SecurityLogType;
import fi.codecrew.moya.clientutils.BortalLocalContextHolder; import fi.codecrew.moya.clientutils.BortalLocalContextHolder;
import fi.codecrew.moya.enums.apps.BillPermission; import fi.codecrew.moya.enums.apps.BillPermission;
import fi.codecrew.moya.facade.BillFacade;
import fi.codecrew.moya.model.Bill; import fi.codecrew.moya.model.Bill;
import fi.codecrew.moya.model.LanEventPrivateProperty; import fi.codecrew.moya.model.LanEventPrivateProperty;
import fi.codecrew.moya.model.LanEventPrivatePropertyKey; import fi.codecrew.moya.model.LanEventPrivatePropertyKey;
...@@ -131,7 +127,7 @@ public class CheckoutFiBean implements CheckoutFiBeanLocal { ...@@ -131,7 +127,7 @@ public class CheckoutFiBean implements CheckoutFiBeanLocal {
final String returnUrl = new StringBuilder(BortalLocalContextHolder.isSsl() ? "https://" : "http://") final String returnUrl = new StringBuilder(BortalLocalContextHolder.isSsl() ? "https://" : "http://")
.append(BortalLocalContextHolder.getHostname()) .append(BortalLocalContextHolder.getHostname())
.append("/LanBortalWeb/checkout/") .append("/MoyaWeb/checkout/")
.toString(); .toString();
final StringBuilder stamp = new StringBuilder(); final StringBuilder stamp = new StringBuilder();
......
...@@ -12,16 +12,12 @@ import org.slf4j.Logger; ...@@ -12,16 +12,12 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import fi.codecrew.moya.MoyaRealmBeanRemote; import fi.codecrew.moya.MoyaRealmBeanRemote;
import fi.codecrew.moya.facade.EventUserFacade;
import fi.codecrew.moya.facade.UserFacade;
import fi.codecrew.moya.beans.EventBeanLocal;
import fi.codecrew.moya.beans.LoggingBeanLocal;
import fi.codecrew.moya.beans.PermissionBeanLocal;
import fi.codecrew.moya.beans.SecurityLogType;
import fi.codecrew.moya.enums.BortalApplication; import fi.codecrew.moya.enums.BortalApplication;
import fi.codecrew.moya.enums.apps.IAppPermission; import fi.codecrew.moya.enums.apps.IAppPermission;
import fi.codecrew.moya.enums.apps.SpecialPermission; import fi.codecrew.moya.enums.apps.SpecialPermission;
import fi.codecrew.moya.enums.apps.UserPermission; import fi.codecrew.moya.enums.apps.UserPermission;
import fi.codecrew.moya.facade.EventUserFacade;
import fi.codecrew.moya.facade.UserFacade;
import fi.codecrew.moya.model.ApplicationPermission; import fi.codecrew.moya.model.ApplicationPermission;
import fi.codecrew.moya.model.EventUser; import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.LanEvent; import fi.codecrew.moya.model.LanEvent;
...@@ -31,7 +27,7 @@ import fi.codecrew.moya.model.User; ...@@ -31,7 +27,7 @@ import fi.codecrew.moya.model.User;
/** /**
* Session Bean implementation class SessionHandlerBean * Session Bean implementation class SessionHandlerBean
*/ */
@Stateless @Stateless(mappedName = MoyaRealmBeanRemote.REMOTE_BEAN_NAME)
public class JaasBean implements MoyaRealmBeanRemote { public class JaasBean implements MoyaRealmBeanRemote {
private static final Logger logger = LoggerFactory.getLogger(JaasBean.class); private static final Logger logger = LoggerFactory.getLogger(JaasBean.class);
......
...@@ -35,20 +35,16 @@ import org.w3c.dom.NodeList; ...@@ -35,20 +35,16 @@ import org.w3c.dom.NodeList;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import fi.codecrew.moya.beanutil.DecimalXMLAdapter; import fi.codecrew.moya.beanutil.DecimalXMLAdapter;
import fi.codecrew.moya.facade.BillFacade;
import fi.codecrew.moya.verkkomaksutfi.PaymentEntry;
import fi.codecrew.moya.beans.LoggingBeanLocal;
import fi.codecrew.moya.beans.PermissionBeanLocal;
import fi.codecrew.moya.beans.SecurityLogType;
import fi.codecrew.moya.beans.VerkkomaksutFiBeanLocal;
import fi.codecrew.moya.clientutils.BortalLocalContextHolder; import fi.codecrew.moya.clientutils.BortalLocalContextHolder;
import fi.codecrew.moya.enums.apps.BillPermission; import fi.codecrew.moya.enums.apps.BillPermission;
import fi.codecrew.moya.facade.BillFacade;
import fi.codecrew.moya.model.Bill; import fi.codecrew.moya.model.Bill;
import fi.codecrew.moya.model.LanEventPrivateProperty; import fi.codecrew.moya.model.LanEventPrivateProperty;
import fi.codecrew.moya.model.LanEventPrivatePropertyKey; import fi.codecrew.moya.model.LanEventPrivatePropertyKey;
import fi.codecrew.moya.util.SvmReturnType; import fi.codecrew.moya.util.SvmReturnType;
import fi.codecrew.moya.util.VerkkomaksutReturnEntry; import fi.codecrew.moya.util.VerkkomaksutReturnEntry;
import fi.codecrew.moya.utilities.PasswordFunctions; import fi.codecrew.moya.utilities.PasswordFunctions;
import fi.codecrew.moya.verkkomaksutfi.PaymentEntry;
/** /**
* Session Bean implementation class VerkkomaksutFiBean * Session Bean implementation class VerkkomaksutFiBean
...@@ -145,7 +141,7 @@ public class VerkkomaksutFiBean implements VerkkomaksutFiBeanLocal { ...@@ -145,7 +141,7 @@ public class VerkkomaksutFiBean implements VerkkomaksutFiBeanLocal {
return null; return null;
} }
String returnUrl = new StringBuilder("http://").append(BortalLocalContextHolder.getHostname()) String returnUrl = new StringBuilder("http://").append(BortalLocalContextHolder.getHostname())
.append("/LanBortalWeb/svm/").toString(); .append("/MoyaWeb/svm/").toString();
PaymentEntry message = new PaymentEntry(returnUrl); PaymentEntry message = new PaymentEntry(returnUrl);
message.setOrderNumber(bill.getId().toString()); message.setOrderNumber(bill.getId().toString());
...@@ -230,7 +226,7 @@ public class VerkkomaksutFiBean implements VerkkomaksutFiBeanLocal { ...@@ -230,7 +226,7 @@ public class VerkkomaksutFiBean implements VerkkomaksutFiBeanLocal {
// logger.info("ordernr: {}", ret.getOrderNumber()); // logger.info("ordernr: {}", ret.getOrderNumber());
// logger.info("token: {}", ret.getToken()); // logger.info("token: {}", ret.getToken());
PaymentEntry message = new PaymentEntry("http://localhost:8080/LanBortalWeb/svm/"); PaymentEntry message = new PaymentEntry("http://localhost:8080/MoyaWeb/svm/");
message.setOrderNumber("123123"); message.setOrderNumber("123123");
message.setPrice(BigDecimal.valueOf(123.45)); message.setPrice(BigDecimal.valueOf(123.45));
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="LanBortalDatabase" default="default" basedir=".">
<description>Builds, tests, and runs the project LanBortalDatabase.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="LanBortalDatabase-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
<nextCatalog catalog="nbproject/private/retriever/catalog.xml"/>
</catalog>
<?xml version="1.0" encoding="UTF-8"?>
<project name="LanBortalDatabase" default="LanBortalDatabase.jar">
<description>Build the JAR to be embedded in your EAR</description>
<property name="LanBortalDatabase.jar" location="../LanBortal/EarContent/lib/LanBortalDatabase.jar" />
<uptodate property="LanBortalDatabase.jar-uptodate" targetfile="${LanBortalDatabase.jar}">
<srcfiles dir="build/classes" includes="**" />
</uptodate>
<target name="LanBortalDatabase.jar" unless="LanBortalDatabase.jar-uptodate">
<jar destfile="${LanBortalDatabase.jar}" basedir="build/classes" />
</target>
</project>
\ No newline at end of file
build.xml.data.CRC32=063cb014
build.xml.script.CRC32=d54e84fc
build.xml.stylesheet.CRC32=958a1d3e@1.32.1.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=063cb014
nbproject/build-impl.xml.script.CRC32=0fc51d31
nbproject/build-impl.xml.stylesheet.CRC32=576378a2@1.32.1.45
compile.on.save=true
do.depend=false
do.jar=true
javac.debug=true
javadoc.preview=true
jaxbwiz.endorsed.dirs=/usr/local/netbeans-6.8/ide12/modules/ext/jaxb/api
user.properties.file=/home/tuukka/.netbeans/6.8/build.properties
application.title=LanBortalDatabase
application.vendor=tuukka
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/LanBortalDatabase.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.LanBortalDatabase-src=src
file.reference.slf4j-api-1.5.8.jar=../LanBortal/EarContent/lib/slf4j-api-1.5.8.jar
file.reference.slf4j-jdk14-1.5.8.jar=../LanBortal/EarContent/lib/slf4j-jdk14-1.5.8.jar
includes=**
jar.compress=false
javac.classpath=\
${libs.javaee-api-6.0.classpath}:\
${file.reference.slf4j-api-1.5.8.jar}:\
${file.reference.slf4j-jdk14-1.5.8.jar}:\
${reference.LanBortalUtilities.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.source=1.5
javac.target=1.5
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit.classpath}:\
${libs.junit_4.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
main.class=
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
platform.active=default_platform
project.LanBortalUtilities=../LanBortalUtilities
reference.LanBortalUtilities.jar=${project.LanBortalUtilities}/dist/LanBortalUtilities.jar
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=${file.reference.LanBortalDatabase-src}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>LanBortalDatabase</name>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots/>
</data>
<references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
<reference>
<foreign-project>LanBortalUtilities</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
</references>
</configuration>
</project>
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
<property name="eclipselink.logging.logger" value="ServerLogger" /> <property name="eclipselink.logging.logger" value="ServerLogger" />
<property name="eclipselink.jdbc.uppercase-columns" value="false" /> <property name="eclipselink.jdbc.uppercase-columns" value="false" />
<property name="eclipselink.target-database" <property name="eclipselink.target-database"
value="fi.insomnia.bortal.database.BortalPostgreSQLPlatform" /> value="fi.codecrew.moya.database.MoyaPostgreSQLPlatform" />
<property name="eclipselink.session-event-listener" <property name="eclipselink.session-event-listener"
value="org.ancoron.postgresql.jpa.eclipselink.ConverterInitializer" /> value="org.ancoron.postgresql.jpa.eclipselink.ConverterInitializer" />
<property name="eclipselink.descriptor.customizer" <property name="eclipselink.descriptor.customizer"
value="fi.insomnia.bortal.database.BortalDescriptorCustomizer" /> value="fi.codecrew.moya.database.MoyaDescriptorCustomizer" />
</properties> </properties>
</persistence-unit> </persistence-unit>
......
...@@ -8,7 +8,7 @@ import org.eclipse.persistence.descriptors.ClassDescriptor; ...@@ -8,7 +8,7 @@ import org.eclipse.persistence.descriptors.ClassDescriptor;
import org.eclipse.persistence.descriptors.ReturningPolicy; import org.eclipse.persistence.descriptors.ReturningPolicy;
import org.eclipse.persistence.internal.helper.DatabaseField; import org.eclipse.persistence.internal.helper.DatabaseField;
public class BortalDescriptorCustomizer implements DescriptorCustomizer { public class MoyaDescriptorCustomizer implements DescriptorCustomizer {
@Override @Override
public void customize(ClassDescriptor descriptor) throws Exception { public void customize(ClassDescriptor descriptor) throws Exception {
......
...@@ -5,7 +5,7 @@ import java.util.Hashtable; ...@@ -5,7 +5,7 @@ import java.util.Hashtable;
import org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition; import org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition;
import org.eclipse.persistence.platform.database.PostgreSQLPlatform; import org.eclipse.persistence.platform.database.PostgreSQLPlatform;
public class BortalPostgreSQLPlatform extends PostgreSQLPlatform { public class MoyaPostgreSQLPlatform extends PostgreSQLPlatform {
private static final long serialVersionUID = 6351395815598077327L; private static final long serialVersionUID = 6351395815598077327L;
@SuppressWarnings({ "rawtypes", "unchecked" }) @SuppressWarnings({ "rawtypes", "unchecked" })
...@@ -14,8 +14,7 @@ public class BortalPostgreSQLPlatform extends PostgreSQLPlatform { ...@@ -14,8 +14,7 @@ public class BortalPostgreSQLPlatform extends PostgreSQLPlatform {
Hashtable map = super.buildFieldTypes(); Hashtable map = super.buildFieldTypes();
map.put(String.class, new FieldTypeDefinition("TEXT", false)); map.put(String.class, new FieldTypeDefinition("TEXT", false));
map.put(java.sql.Timestamp.class, new FieldTypeDefinition( map.put(java.sql.Timestamp.class, new FieldTypeDefinition("TIMESTAMPTZ", false));
"TIMESTAMPTZ", false));
return map; return map;
} }
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<name>MoyaEar</name> <name>MoyaEar</name>
<comment></comment> <comment></comment>
<projects> <projects>
<project>LanBortalWeb</project>
<project>MoyaAuthModuleClient</project> <project>MoyaAuthModuleClient</project>
<project>MoyaBeans</project> <project>MoyaBeans</project>
<project>MoyaBeansClient</project> <project>MoyaBeansClient</project>
<project>MoyaDatabase</project> <project>MoyaDatabase</project>
<project>MoyaTerminalWeb</project> <project>MoyaTerminalWeb</project>
<project>MoyaUtilities</project> <project>MoyaUtilities</project>
<project>MoyaWeb</project>
</projects> </projects>
<buildSpec> <buildSpec>
<buildCommand> <buildCommand>
......
...@@ -26,5 +26,9 @@ ...@@ -26,5 +26,9 @@
<dependent-module archiveName="MoyaUtilities.jar" deploy-path="/lib" handle="module:/resource/MoyaUtilities/MoyaUtilities"> <dependent-module archiveName="MoyaUtilities.jar" deploy-path="/lib" handle="module:/resource/MoyaUtilities/MoyaUtilities">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<dependent-module archiveName="MoyaWeb.war" deploy-path="/" handle="module:/resource/MoyaWeb/MoyaWeb">
<dependent-object/>
<dependency-type>uses</dependency-type>
</dependent-module>
</wb-module> </wb-module>
</project-modules> </project-modules>
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
GlassFish Application Server 3.0 Java EE Application 6.0//EN" GlassFish Application Server 3.0 Java EE Application 6.0//EN"
"http://www.sun.com/software/appserver/dtds/sun-application_6_0-0.dtd"> "http://www.sun.com/software/appserver/dtds/sun-application_6_0-0.dtd">
<sun-application> <sun-application>
<realm>omniarealm</realm> <realm>moyaRealm</realm>
</sun-application> </sun-application>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<PROCESS model-entity="JSFProcess"/>
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
<application> <application>
<resource-bundle> <resource-bundle>
<base-name>fi.insomnia.bortal.terminal.resources.i18n</base-name> <base-name>fi.codecrew.moya.terminal.resources.i18n</base-name>
<var>i18n</var> <var>i18n</var>
</resource-bundle> </resource-bundle>
<message-bundle>fi.insomnia.bortal.terminal.resources.i18n</message-bundle> <message-bundle>fi.codecrew.moya.terminal.resources.i18n</message-bundle>
<!-- Legal Country codes: http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm --> <!-- Legal Country codes: http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm -->
<!-- Assigned Country codes: --> <!-- Assigned Country codes: -->
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
--> -->
<factory> <factory>
<exception-handler-factory>fi.insomnia.bortal.terminal.exceptions.BortalTerminalExceptionHandlerFactory</exception-handler-factory> <exception-handler-factory>fi.codecrew.moya.terminal.exceptions.BortalTerminalExceptionHandlerFactory</exception-handler-factory>
</factory> </factory>
</faces-config> </faces-config>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
<sun-web-app error-url=""> <sun-web-app error-url="">
<context-root>/LanBortalTerminalWeb</context-root> <context-root>/MoyaTerminalWeb</context-root>
<class-loader delegate="true"/> <class-loader delegate="true"/>
<jsp-config> <jsp-config>
<property name="keepgenerated" value="true"> <property name="keepgenerated" value="true">
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="LanBortalUtilities" default="default" basedir=".">
<description>Builds, tests, and runs the project LanBortalUtilities.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="LanBortalUtilities-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
build.xml.data.CRC32=6da48401
build.xml.script.CRC32=7f14bcb5
build.xml.stylesheet.CRC32=958a1d3e@1.32.1.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=6da48401
nbproject/build-impl.xml.script.CRC32=eb7b29bd
nbproject/build-impl.xml.stylesheet.CRC32=576378a2@1.32.1.45
application.title=LanBortalUtilities
application.vendor=tuukka
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/LanBortalUtilities.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.LanBortalUtilities-src=src
file.reference.slf4j-api-1.5.8.jar=../LanBortal/EarContent/lib/slf4j-api-1.5.8.jar
file.reference.slf4j-jdk14-1.5.8.jar=../LanBortal/EarContent/lib/slf4j-jdk14-1.5.8.jar
includes=**
jar.compress=false
javac.classpath=\
${file.reference.slf4j-api-1.5.8.jar}:\
${file.reference.slf4j-jdk14-1.5.8.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.source=1.5
javac.target=1.5
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit.classpath}:\
${libs.junit_4.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
main.class=
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=${file.reference.LanBortalUtilities-src}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>LanBortalUtilities</name>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots/>
</data>
</configuration>
</project>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 6 (MacOS X Default)">
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> <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 3.1.2"> <classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1.2">
<attributes> <attributes>
<attribute name="owner.project.facets" value="jst.web"/> <attribute name="owner.project.facets" value="jst.web"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry combineaccessrules="false" kind="src" path="/lib-AuthModule-depends"/> <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="output" path="build/classes"/> <classpathentry kind="output" path="build/classes"/>
</classpath> </classpath>
<?xml version="1.0" encoding="UTF-8"?>
<pageflow:Pageflow xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pageflow="http://www.sybase.com/suade/pageflow" id="pf13012981621060" configfile="/LanBortalWeb/WebContent/WEB-INF/faces-config.xml">
<nodes xsi:type="pageflow:PFPage" name="*" x="122" y="562" id="pf131682121330014" referenceLink="//@navigationRule.0/@fromViewId|" outlinks="pf131682121330015 pf13196506256640 pf13372956347970" path="*"/>
<nodes xsi:type="pageflow:PFPage" name="auth/logoutResponse" x="338" y="178" id="pf131682121330016" referenceLink="//@navigationRule.0/@navigationCase.0/@toViewId|" inlinks="pf131682121330015" path="/auth/logoutResponse"/>
<nodes xsi:type="pageflow:PFPage" name="place/placemap" x="122" y="946" id="pf13168224196920" referenceLink="//@navigationRule.2/@navigationCase.0/@toViewId|" outlinks="pf13168224196921" inlinks="pf13168224196921" path="/place/placemap"/>
<nodes xsi:type="pageflow:PFPage" name="user/sendPicture" x="338" y="562" id="pf13196506256641" referenceLink="//@navigationRule.0/@navigationCase.1/@toViewId|" inlinks="pf13196506256640" path="/user/sendPicture"/>
<nodes xsi:type="pageflow:PFPage" name="news/edit" x="122" y="1330" id="pf13241645918110" path="/news/edit.xhtml"/>
<nodes xsi:type="pageflow:PFPage" name="news/listAll" x="122" y="1714" id="pf13241645918111" path="/news/listAll.xhtml"/>
<nodes xsi:type="pageflow:PFPage" name="actionlog/messagelist" x="122" y="2098" id="pf13336707109910" referenceLink="//@navigationRule.3/@navigationCase.0/@toViewId|" outlinks="pf13336707109911" inlinks="pf13336707109911" path="/actionlog/messagelist.xhtml"/>
<nodes xsi:type="pageflow:PFPage" name="news/editNews" x="122" y="2482" id="pf13336707109912" referenceLink="//@navigationRule.1/@fromViewId|" outlinks="pf13336707109913" path="/news/editNews"/>
<nodes xsi:type="pageflow:PFPage" name="news/listAll" x="338" y="2482" id="pf13336707109914" referenceLink="//@navigationRule.1/@navigationCase.0/@toViewId|" inlinks="pf13336707109913" path="/news/listAll"/>
<nodes xsi:type="pageflow:PFPage" name="shop/createBill" x="122" y="2866" id="pf13365201875590" referenceLink="//@navigationRule.2/@fromViewId|" path="/shop/createBill"/>
<nodes xsi:type="pageflow:PFPage" name="bill/list" x="338" y="946" id="pf13365201875592" referenceLink="//@navigationRule.0/@navigationCase.2/@toViewId|" inlinks="pf13372956347970" path="/bill/list"/>
<nodes xsi:type="pageflow:PFPage" name="voting/create" x="122" y="3250" id="pf13372956347981" referenceLink="//@navigationRule.4/@fromViewId|" outlinks="pf13372956347982" path="/voting/create.xhtml"/>
<nodes xsi:type="pageflow:PFPage" name="voting/compolist.xhtml" x="338" y="3250" id="pf13372956347983" referenceLink="//@navigationRule.4/@navigationCase.0/@toViewId|" inlinks="pf13372956347982" path="/voting/compolist.xhtml"/>
<links id="pf131682121330015" target="pf131682121330016" source="pf131682121330014" outcome="logoutDone" redirect="true"/>
<links id="pf13196506256640" target="pf13196506256641" source="pf131682121330014" outcome="redirToUserimage" redirect="true"/>
<links id="pf13336707109913" target="pf13336707109914" source="pf13336707109912" outcome="news/listAll" redirect="true"/>
<links id="pf13372956347970" target="pf13365201875592" source="pf131682121330014" outcome="redirBillList" redirect="true"/>
<links id="pf13372956347982" target="pf13372956347983" source="pf13372956347981" outcome="success" redirect="true"/>
<links id="pf13168224196921" target="pf13168224196920" source="pf13168224196920" outcome="placesReserved" redirect="true">
<bendPoints d1Height="-36" d2Height="-36"/>
<bendPoints d1Width="-64" d1Height="-36" d2Width="-64" d2Height="-36"/>
<bendPoints d1Width="-64" d2Width="-64"/>
</links>
<links id="pf13336707109911" target="pf13336707109910" source="pf13336707109910" outcome="success" redirect="true">
<bendPoints d1Height="-36" d2Height="-36"/>
<bendPoints d1Width="-64" d1Height="-36" d2Width="-64" d2Height="-36"/>
<bendPoints d1Width="-64" d2Width="-64"/>
</links>
</pageflow:Pageflow>
...@@ -21,16 +21,6 @@ ...@@ -21,16 +21,6 @@
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.jboss.tools.jst.web.kb.kbbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.jboss.tools.cdi.core.cdibuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name> <name>org.eclipse.wst.validation.validationbuilder</name>
<arguments> <arguments>
</arguments> </arguments>
...@@ -42,7 +32,5 @@ ...@@ -42,7 +32,5 @@
<nature>org.eclipse.wst.common.project.facet.core.nature</nature> <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature> <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>org.jboss.tools.jst.web.kb.kbnature</nature>
<nature>org.jboss.tools.cdi.core.cdinature</nature>
</natures> </natures>
</projectDescription> </projectDescription>
eclipse.preferences.version=1
encoding/<project>=UTF-8
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6 org.eclipse.jdt.core.compiler.source=1.6
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0"> <project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="MoyaWeb"> <wb-module deploy-name="MoyaWeb">
<wb-resource deploy-path="/" source-path="/WebContent"/> <wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<property name="java-output-path" value="/MoyaWeb/build/classes"/> <property name="java-output-path" value="/MoyaWeb/build/classes"/>
<property name="context-root" value="MoyaWeb"/> <property name="context-root" value="MoyaWeb"/>
......
<root>
<facet id="jst.jsf">
<node name="libprov">
<attribute name="provider-id" value="jsf-no-op-library-provider"/>
</node>
</facet>
</root>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<faceted-project> <faceted-project>
<runtime name="GlassFish 3.1.2"/> <runtime name="GlassFish 3.1.2"/>
<fixed facet="jst.web"/>
<fixed facet="java"/> <fixed facet="java"/>
<fixed facet="wst.jsdt.web"/> <fixed facet="wst.jsdt.web"/>
<fixed facet="jst.web"/>
<installed facet="java" version="1.6"/> <installed facet="java" version="1.6"/>
<installed facet="jst.web" version="3.0"/> <installed facet="jst.web" version="3.0"/>
<installed facet="sun.facet" version="9"/> <installed facet="sun.facet" version="9"/>
<installed facet="wst.jsdt.web" version="1.0"/> <installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="jst.jsf" version="2.0"/>
</faceted-project> </faceted-project>
default.configuration=
eclipse.preferences.version=1
hibernate3.enabled=false
Manifest-Version: 1.0 Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
<?xml version="1.0" encoding="UTF-8"?>
<PROCESS model-entity="JSFProcess">
<PROCESS-ITEM NAME="rules:*" PATH="*" SHAPE="32,17,0,0" model-entity="JSFProcessGroup">
<PROCESS-ITEM ID="rules:*:0" NAME="item" PATH="*" model-entity="JSFProcessItem">
<PROCESS-ITEM-OUTPUT ID="shopToUser::#shop#shopToUser" NAME="output"
PATH="/shop/shopToUser" TARGET="rules:#shop#shopToUser"
TITLE="shopToUser" model-entity="JSFProcessItemOutput"/>
<PROCESS-ITEM-OUTPUT ID="logoutDone::#auth#logoutResponse"
NAME="output1" PATH="/auth/logoutResponse"
TARGET="rules:#auth#logoutResponse" TITLE="logoutDone" model-entity="JSFProcessItemOutput"/>
<PROCESS-ITEM-OUTPUT ID="redirToUserimage::#user#sendPicture"
NAME="output2" PATH="/user/sendPicture"
TARGET="rules:#user#sendPicture" TITLE="redirToUserimage" model-entity="JSFProcessItemOutput"/>
<PROCESS-ITEM-OUTPUT ID="redirBillList::#bill#list" NAME="output3"
PATH="/bill/list" TARGET="rules:#bill#list" TITLE="redirBillList" model-entity="JSFProcessItemOutput"/>
</PROCESS-ITEM>
</PROCESS-ITEM>
<PROCESS-ITEM NAME="rules:#news#editNews" PATH="/news/editNews"
SHAPE="32,561,0,0" model-entity="JSFProcessGroup">
<PROCESS-ITEM ID="rules:#news#editNews:0" NAME="item"
PATH="/news/editNews" model-entity="JSFProcessItem">
<PROCESS-ITEM-OUTPUT ID="news#listAll::#news#listAll" NAME="output"
PATH="/news/listAll" TARGET="rules:#news#listAll"
TITLE="news/listAll" model-entity="JSFProcessItemOutput"/>
</PROCESS-ITEM>
</PROCESS-ITEM>
<PROCESS-ITEM NAME="rules:#place#placemap" PATH="/place/placemap"
SHAPE="32,1009,0,0" model-entity="JSFProcessGroup">
<PROCESS-ITEM ID="rules:#place#placemap:0" NAME="item"
PATH="/place/placemap" model-entity="JSFProcessItem">
<PROCESS-ITEM-OUTPUT ID="placesReserved::#place#placemap"
NAME="output" PATH="/place/placemap" TARGET="rules:#place#placemap"
TITLE="placesReserved" model-entity="JSFProcessItemOutput"/>
</PROCESS-ITEM>
</PROCESS-ITEM>
<PROCESS-ITEM NAME="rules:#actionlog#messagelist.xhtml"
PATH="/actionlog/messagelist.xhtml" SHAPE="240,1025,0,0" model-entity="JSFProcessGroup">
<PROCESS-ITEM ID="rules:#actionlog#messagelist.xhtml:0" NAME="item"
PATH="/actionlog/messagelist.xhtml" model-entity="JSFProcessItem">
<PROCESS-ITEM-OUTPUT ID="success::#actionlog#messagelist.xhtml"
NAME="output" PATH="/actionlog/messagelist.xhtml"
TARGET="rules:#actionlog#messagelist.xhtml" TITLE="success" model-entity="JSFProcessItemOutput"/>
</PROCESS-ITEM>
</PROCESS-ITEM>
<PROCESS-ITEM NAME="rules:#card#massprint.xhtml"
PATH="/card/massprint.xhtml" SHAPE="32,673,0,0" model-entity="JSFProcessGroup">
<PROCESS-ITEM ID="rules:#card#massprint.xhtml:0" NAME="item"
PATH="/card/massprint.xhtml" model-entity="JSFProcessItem">
<PROCESS-ITEM-OUTPUT ID="accepted::#useradmin#list.xhtml"
NAME="output" PATH="/useradmin/list.xhtml"
TARGET="rules:#useradmin#list.xhtml" TITLE="accepted" model-entity="JSFProcessItemOutput"/>
</PROCESS-ITEM>
</PROCESS-ITEM>
<PROCESS-ITEM NAME="rules:#useradmin#sendPicture.xhtml"
PATH="/useradmin/sendPicture.xhtml" SHAPE="32,785,0,0" model-entity="JSFProcessGroup">
<PROCESS-ITEM ID="rules:#useradmin#sendPicture.xhtml:0" NAME="item"
PATH="/useradmin/sendPicture.xhtml" model-entity="JSFProcessItem">
<PROCESS-ITEM-OUTPUT ID="accepted::#useradmin#edit.xhtml"
NAME="output" PATH="/useradmin/edit.xhtml"
TARGET="rules:#useradmin#edit.xhtml" TITLE="accepted" model-entity="JSFProcessItemOutput"/>
</PROCESS-ITEM>
</PROCESS-ITEM>
<PROCESS-ITEM NAME="rules:#voting#create.xhtml"
PATH="/voting/create.xhtml" SHAPE="32,897,0,0" model-entity="JSFProcessGroup">
<PROCESS-ITEM ID="rules:#voting#create.xhtml:0" NAME="item"
PATH="/voting/create.xhtml" model-entity="JSFProcessItem">
<PROCESS-ITEM-OUTPUT ID="success::#voting#compolist.xhtml"
NAME="output" PATH="/voting/compolist.xhtml"
TARGET="rules:#voting#compolist.xhtml" TITLE="success" model-entity="JSFProcessItemOutput"/>
</PROCESS-ITEM>
</PROCESS-ITEM>
<PROCESS-ITEM NAME="rules:#useradmin#edit.xhtml"
PATH="/useradmin/edit.xhtml" SHAPE="240,801,0,0" model-entity="JSFProcessGroup"/>
<PROCESS-ITEM NAME="rules:#bill#list" PATH="/bill/list"
SHAPE="288,465,0,0" model-entity="JSFProcessGroup"/>
<PROCESS-ITEM NAME="rules:#news#listAll" PATH="/news/listAll"
SHAPE="240,577,0,0" model-entity="JSFProcessGroup"/>
<PROCESS-ITEM NAME="rules:#shop#shopToUser" PATH="/shop/shopToUser"
SHAPE="288,33,0,0" model-entity="JSFProcessGroup"/>
<PROCESS-ITEM NAME="rules:#useradmin#list.xhtml"
PATH="/useradmin/list.xhtml" SHAPE="240,689,0,0" model-entity="JSFProcessGroup"/>
<PROCESS-ITEM NAME="rules:#voting#compolist.xhtml"
PATH="/voting/compolist.xhtml" SHAPE="240,913,0,0" model-entity="JSFProcessGroup"/>
<PROCESS-ITEM NAME="rules:#user#sendPicture" PATH="/user/sendPicture"
SHAPE="288,353,0,0" model-entity="JSFProcessGroup"/>
<PROCESS-ITEM NAME="rules:#auth#logoutResponse"
PATH="/auth/logoutResponse" SHAPE="288,241,0,0" model-entity="JSFProcessGroup"/>
</PROCESS>
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
version="2.0"> version="2.0">
<application> <application>
<resource-bundle> <resource-bundle>
<base-name>fi.insomnia.bortal.resources.i18n</base-name> <base-name>fi.codecrew.moya.resources.i18n</base-name>
<var>i18n</var> <var>i18n</var>
</resource-bundle> </resource-bundle>
<message-bundle>fi.insomnia.bortal.resources.i18n</message-bundle> <message-bundle>fi.codecrew.moya.resources.i18n</message-bundle>
<!-- Legal Country codes: http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm --> <!-- Legal Country codes: http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm -->
<!-- Assigned Country codes: --> <!-- Assigned Country codes: -->
<!-- Insomnia: IN (INDIA) --> <!-- Insomnia: IN (INDIA) -->
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<!-- </navigation-case> --> <!-- </navigation-case> -->
<!-- </navigation-rule> --> <!-- </navigation-rule> -->
<factory> <factory>
<exception-handler-factory>fi.insomnia.bortal.exceptions.BortalExceptionHandlerFactory</exception-handler-factory> <exception-handler-factory>fi.codecrew.moya.exceptions.BortalExceptionHandlerFactory</exception-handler-factory>
</factory> </factory>
<navigation-rule> <navigation-rule>
<display-name>place/placemap</display-name> <display-name>place/placemap</display-name>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
<sun-web-app error-url="/auth/login.jsf"> <sun-web-app error-url="">
<context-root>/LanBortalWeb</context-root> <context-root>/MoyaWeb2</context-root>
<class-loader delegate="true"/> <class-loader delegate="true"/>
<jsp-config> <jsp-config>
<property name="keepgenerated" value="true"> <property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class java code.</description> <description>Keep a copy of the generated servlet class java code.</description>
</property> </property>
</jsp-config> </jsp-config>
<locale-charset-info>
<locale-charset-map locale="" charset=""/>
<parameter-encoding default-charset="UTF-8"/>
</locale-charset-info>
</sun-web-app> </sun-web-app>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>LanBortalWeb</display-name> <display-name>LanBortalWeb</display-name>
<session-config> <session-config>
<session-timeout>30</session-timeout> <session-timeout>30</session-timeout>
</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>Development</param-value> <param-value>Development</param-value>
</context-param> </context-param>
<context-param> <context-param>
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name> <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
...@@ -38,7 +33,7 @@ ...@@ -38,7 +33,7 @@
</servlet> </servlet>
<servlet> <servlet>
<servlet-name>UploadServlet</servlet-name> <servlet-name>UploadServlet</servlet-name>
<servlet-class>fi.insomnia.bortal.servlet.UploadServlet</servlet-class> <servlet-class>fi.codecrew.moya.servlet.UploadServlet</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>UploadServlet</servlet-name> <servlet-name>UploadServlet</servlet-name>
...@@ -46,7 +41,7 @@ ...@@ -46,7 +41,7 @@
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>UserImageServlet</servlet-name> <servlet-name>UserImageServlet</servlet-name>
<servlet-class>fi.insomnia.bortal.servlet.UserImageServlet</servlet-class> <servlet-class>fi.codecrew.moya.servlet.UserImageServlet</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>UserImageServlet</servlet-name> <servlet-name>UserImageServlet</servlet-name>
...@@ -54,7 +49,7 @@ ...@@ -54,7 +49,7 @@
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>UserCardServlet</servlet-name> <servlet-name>UserCardServlet</servlet-name>
<servlet-class>fi.insomnia.bortal.servlet.UserCardServlet</servlet-class> <servlet-class>fi.codecrew.moya.servlet.UserCardServlet</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>UserCardServlet</servlet-name> <servlet-name>UserCardServlet</servlet-name>
...@@ -62,7 +57,7 @@ ...@@ -62,7 +57,7 @@
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>CardTemplateServlet</servlet-name> <servlet-name>CardTemplateServlet</servlet-name>
<servlet-class>fi.insomnia.bortal.servlet.CardTemplateServlet</servlet-class> <servlet-class>fi.codecrew.moya.servlet.CardTemplateServlet</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>CardTemplateServlet</servlet-name> <servlet-name>CardTemplateServlet</servlet-name>
...@@ -70,7 +65,7 @@ ...@@ -70,7 +65,7 @@
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>PlaceMap</servlet-name> <servlet-name>PlaceMap</servlet-name>
<servlet-class>fi.insomnia.bortal.servlet.PlaceMap</servlet-class> <servlet-class>fi.codecrew.moya.servlet.PlaceMap</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>Faces Servlet</servlet-name> <servlet-name>Faces Servlet</servlet-name>
...@@ -90,7 +85,7 @@ ...@@ -90,7 +85,7 @@
<filter> <filter>
<display-name>HostnameFilter</display-name> <display-name>HostnameFilter</display-name>
<filter-name>HostnameFilter</filter-name> <filter-name>HostnameFilter</filter-name>
<filter-class>fi.insomnia.bortal.HostnameFilter</filter-class> <filter-class>fi.codecrew.moya.HostnameFilter</filter-class>
</filter> </filter>
<filter-mapping> <filter-mapping>
<filter-name>HostnameFilter</filter-name> <filter-name>HostnameFilter</filter-name>
...@@ -98,7 +93,7 @@ ...@@ -98,7 +93,7 @@
</filter-mapping> </filter-mapping>
<login-config> <login-config>
<auth-method>FORM</auth-method> <auth-method>FORM</auth-method>
<realm-name>omniarealm</realm-name> <realm-name>moyaRealm</realm-name>
<form-login-config> <form-login-config>
<form-login-page>/auth/login.jsf</form-login-page> <form-login-page>/auth/login.jsf</form-login-page>
<form-error-page>/auth/loginError.jsf</form-error-page> <form-error-page>/auth/loginError.jsf</form-error-page>
...@@ -123,7 +118,7 @@ ...@@ -123,7 +118,7 @@
<description></description> <description></description>
<display-name>PrintBill</display-name> <display-name>PrintBill</display-name>
<servlet-name>PrintBill</servlet-name> <servlet-name>PrintBill</servlet-name>
<servlet-class>fi.insomnia.bortal.servlet.PrintBill</servlet-class> <servlet-class>fi.codecrew.moya.servlet.PrintBill</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>PrintBill</servlet-name> <servlet-name>PrintBill</servlet-name>
...@@ -136,14 +131,10 @@ ...@@ -136,14 +131,10 @@
<description></description> <description></description>
<display-name>PlaceGroupPdf</display-name> <display-name>PlaceGroupPdf</display-name>
<servlet-name>PlaceGroupPdf</servlet-name> <servlet-name>PlaceGroupPdf</servlet-name>
<servlet-class>fi.insomnia.bortal.servlet.PlaceGroupPdf</servlet-class> <servlet-class>fi.codecrew.moya.servlet.PlaceGroupPdf</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>PlaceGroupPdf</servlet-name> <servlet-name>PlaceGroupPdf</servlet-name>
<url-pattern>/PlaceGroupPdf</url-pattern> <url-pattern>/PlaceGroupPdf</url-pattern>
</servlet-mapping> </servlet-mapping>
<!-- <context-param>
<param-name>primefaces.THEME</param-name>
<param-value>bortal</param-value>
</context-param> -->
</web-app> </web-app>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:tools="http://java.sun.com/jsf/composite/tools" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:tools="http://java.sun.com/jsf/composite/tools"
> >
<composite:interface> <composite:interface>
<composite:attribute name="view" required="true" type="fi.insomnia.bortal.web.cdiview.IPaginationView" /> <composite:attribute name="view" required="true" type="fi.codecrew.moya.web.cdiview.IPaginationView" />
</composite:interface> </composite:interface>
<composite:implementation> <composite:implementation>
......
...@@ -2,11 +2,8 @@ package fi.codecrew.moya.cmdline; ...@@ -2,11 +2,8 @@ package fi.codecrew.moya.cmdline;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import javax.ejb.EJB;
import fi.codecrew.moya.beans.PermissionBeanLocal; import fi.codecrew.moya.beans.PermissionBeanLocal;
public class Hello implements ICommandlineCommand { public class Hello implements ICommandlineCommand {
...@@ -19,17 +16,17 @@ public class Hello implements ICommandlineCommand { ...@@ -19,17 +16,17 @@ public class Hello implements ICommandlineCommand {
public int execute(String[] argv, InputStreamReader stdin, OutputStreamWriter stdout, OutputStreamWriter stderr) { public int execute(String[] argv, InputStreamReader stdin, OutputStreamWriter stdout, OutputStreamWriter stderr) {
try { try {
if(argv.length != 2) { if (argv.length != 2) {
stderr.write("usage: "+argv[0]+" <name>\r\n"); stderr.write("usage: " + argv[0] + " <name>\r\n");
stderr.flush(); stderr.flush();
return 1; return 1;
} else { } else {
String currentUser = permBean.getPrincipal(); String currentUser = permBean.getPrincipal();
if(currentUser.equals(argv[1])) { if (currentUser.equals(argv[1])) {
stdout.write("hello, "+argv[1]+"\r\n"); stdout.write("hello, " + argv[1] + "\r\n");
} else { } else {
stdout.write("you lie, "+currentUser+"!\r\n"); stdout.write("you lie, " + currentUser + "!\r\n");
} }
stdout.flush(); stdout.flush();
return 0; return 0;
......
...@@ -4,6 +4,7 @@ import java.io.IOException; ...@@ -4,6 +4,7 @@ import java.io.IOException;
import java.security.Principal; import java.security.Principal;
import java.util.HashSet; import java.util.HashSet;
import javax.resource.spi.security.PasswordCredential;
import javax.security.auth.Subject; import javax.security.auth.Subject;
import javax.security.auth.callback.Callback; import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler; import javax.security.auth.callback.CallbackHandler;
...@@ -17,8 +18,6 @@ import org.apache.sshd.server.session.ServerSession; ...@@ -17,8 +18,6 @@ import org.apache.sshd.server.session.ServerSession;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.sun.enterprise.security.auth.login.common.PasswordCredential;
import fi.codecrew.moya.clientutils.BortalLocalContextHolder; import fi.codecrew.moya.clientutils.BortalLocalContextHolder;
public class BortalPasswordAuthenticator implements PasswordAuthenticator { public class BortalPasswordAuthenticator implements PasswordAuthenticator {
...@@ -39,7 +38,7 @@ public class BortalPasswordAuthenticator implements PasswordAuthenticator { ...@@ -39,7 +38,7 @@ public class BortalPasswordAuthenticator implements PasswordAuthenticator {
public boolean authenticate(final String username, final String password) { public boolean authenticate(final String username, final String password) {
try { try {
PasswordCredential pwdcred = new PasswordCredential(username, password.toCharArray(), "bortalRealm"); PasswordCredential pwdcred = new PasswordCredential(username, password.toCharArray());
HashSet<PasswordCredential> privcred = new HashSet<PasswordCredential>(); HashSet<PasswordCredential> privcred = new HashSet<PasswordCredential>();
privcred.add(pwdcred); privcred.add(pwdcred);
Subject subject = new Subject(false, new HashSet<Principal>(), new HashSet<Object>(), privcred); Subject subject = new Subject(false, new HashSet<Principal>(), new HashSet<Object>(), privcred);
......
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!