You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by do...@apache.org on 2009/02/26 16:54:35 UTC
svn commit: r748189 [2/3] - in /incubator/empire-db/trunk: ./
empire-db-examples/ empire-db-examples/empire-db-example-struts2-cxf/
empire-db-examples/empire-db-example-struts2-cxf/src/
empire-db-examples/empire-db-example-struts2-cxf/src/main/ empire-...
Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actiontypes/SampleAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleBeanClass.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleBeanClass.java?rev=748189&view=auto
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleBeanClass.java (added)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleBeanClass.java Thu Feb 26 15:54:32 2009
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.empire.struts2.websample.ws;
+
+import org.apache.empire.data.DataType;
+import org.apache.empire.data.bean.BeanClass;
+import org.apache.empire.data.bean.BeanDomain;
+import org.apache.empire.data.bean.BeanProperty;
+
+/**
+ * Base class definition for all database tables
+ * Automatically generates a message-key for the field title
+ * e.g. for the column EMPLOYEES.DATE_OF_BIRTH
+ * it generates the key "!field.title.employees.dateOfBirth";
+ */
+public class SampleBeanClass extends BeanClass
+{
+ public final String MESSAGE_KEY_PREFIX = "!field.title.";
+
+ public SampleBeanClass(String name, BeanDomain dom)
+ {
+ super(name);
+ }
+
+ @Override
+ protected void addProp(BeanProperty prop)
+ {
+ // Set Translation Title
+ String name = prop.getBeanPropertyName();
+ String tbl = getName().toLowerCase();
+ String key = MESSAGE_KEY_PREFIX + tbl + "." + name;
+ prop.setTitle(key);
+
+ // Set Default Control Type
+ DataType type = prop.getDataType();
+ if(type==DataType.BOOL)
+ prop.setControlType("checkbox");
+ else if("".equals(type))
+ prop.setControlType("text");
+
+ // Add Column
+ super.addProp(prop);
+ }
+}
Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleBeanClass.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleBeanDomain.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleBeanDomain.java?rev=748189&view=auto
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleBeanDomain.java (added)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleBeanDomain.java Thu Feb 26 15:54:32 2009
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.empire.struts2.websample.ws;
+
+import org.apache.empire.commons.Options;
+import org.apache.empire.data.DataType;
+import org.apache.empire.data.bean.BeanDomain;
+import org.apache.empire.data.bean.BeanProperty;
+import org.apache.empire.struts2.websample.web.SampleApplication;
+
+
+public class SampleBeanDomain extends BeanDomain
+{
+ // Static Access
+ public static SampleBeanDomain getInstance()
+ {
+ return SampleApplication.getInstance().getBeanDomain();
+ }
+
+ /**
+ * Tabellendefinition für Departments
+ */
+ public static class Departments extends SampleBeanClass
+ {
+ public final BeanProperty C_DEPARTMENT_ID;
+ public final BeanProperty C_NAME;
+ public final BeanProperty C_HEAD;
+ public final BeanProperty C_BUSINESS_UNIT;
+ public final BeanProperty C_UPDATE_TIMESTAMP;
+
+ // Konstruktor für Tabelle
+ public Departments(BeanDomain dom)
+ {
+ super("DEPARTMENTS", dom);
+ // ID
+ C_DEPARTMENT_ID = addProp("departmentId", DataType.AUTOINC, 0, true);
+ C_NAME = addProp("name", DataType.TEXT, 80, true);
+ C_HEAD = addProp("head", DataType.TEXT, 80, false);
+ C_BUSINESS_UNIT = addProp("businessUnit", DataType.TEXT, 4, true);
+ C_UPDATE_TIMESTAMP= addProp("updateTimestamp", DataType.DATETIME, 0, true);
+
+ // Primary Key
+ setKeyColumn(C_DEPARTMENT_ID);
+ // Set other Indexes
+ //addIndex("DEARTMENT_NAME_IDX", true, new DBColumn[] { C_NAME });
+ // Set timestamp column for save updates
+ //setTimestampColumn(C_UPDATE_TIMESTAMP);
+ }
+ }
+
+ /**
+ * Tabellendefinition für Persons
+ */
+ public static class Employees extends SampleBeanClass
+ {
+ public final BeanProperty C_EMPLOYEE_ID;
+ public final BeanProperty C_SALUTATION;
+ public final BeanProperty C_FIRSTNAME;
+ public final BeanProperty C_LASTNAME;
+ public final BeanProperty C_DATE_OF_BIRTH;
+ public final BeanProperty C_DEPARTMENT_ID;
+ public final BeanProperty C_GENDER;
+ public final BeanProperty C_PHONE_NUMBER;
+ public final BeanProperty C_EMAIL;
+ public final BeanProperty C_RETIRED;
+ public final BeanProperty C_UPDATE_TIMESTAMP;
+
+ // Konstruktor für Tabelle
+ public Employees(BeanDomain dom)
+ {
+ super("EMPLOYEES", dom);
+ // ID
+ C_EMPLOYEE_ID = addProp("employeeId", DataType.AUTOINC, 0, true);
+ C_SALUTATION = addProp("salutation", DataType.TEXT, 20, false);
+ C_FIRSTNAME = addProp("firstname", DataType.TEXT, 40, true);
+ C_LASTNAME = addProp("lastname", DataType.TEXT, 40, true);
+ C_DATE_OF_BIRTH = addProp("dateOfBirth", DataType.DATE, 0, false);
+ C_DEPARTMENT_ID = addProp("departmentId", DataType.INTEGER, 0, true,"select");
+ C_GENDER = addProp("gender", DataType.TEXT, 1, false,"select");
+ C_PHONE_NUMBER = addProp("phoneNumber", DataType.TEXT, 40, false,"phone");
+ C_EMAIL = addProp("email", DataType.TEXT, 80, false);
+ C_RETIRED = addProp("retired", DataType.BOOL, 0, true);
+ C_UPDATE_TIMESTAMP= addProp("updateTimestamp", DataType.DATETIME, 0, true,"text",true);
+
+ // Primary Key
+ setKeyColumn(C_EMPLOYEE_ID);
+
+ Options genders = new Options();
+ genders.set("M", "!option.employee.gender.male");
+ genders.set("F", "!option.employee.gender.female");
+ C_GENDER.setOptions(genders);
+ }
+ }
+
+ // Tabellen
+ public final Departments T_DEPARTMENTS = new Departments(this);
+ public final Employees T_EMPLOYEES = new Employees(this);
+
+ /**
+ * Konstruktor SampleDB
+ */
+ public SampleBeanDomain()
+ {
+ super("");
+ }
+
+}
Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleBeanDomain.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleRecord.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleRecord.java?rev=748189&view=auto
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleRecord.java (added)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleRecord.java Thu Feb 26 15:54:32 2009
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.empire.struts2.websample.ws;
+
+import org.apache.empire.data.bean.BeanClass;
+import org.apache.empire.data.bean.BeanRecordProxy;
+import org.apache.empire.struts2.websample.web.SampleContext;
+
+public class SampleRecord<T> extends BeanRecordProxy<T>
+{
+ // DBRecord members
+ protected SampleContext context;
+
+ public SampleRecord(SampleContext context, T data, BeanClass beanClass)
+ {
+ super(data, beanClass);
+ this.context = context;
+ }
+}
Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/SampleRecord.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/records/DepartmentRecord.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/records/DepartmentRecord.java?rev=748189&view=auto
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/records/DepartmentRecord.java (added)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/records/DepartmentRecord.java Thu Feb 26 15:54:32 2009
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.empire.struts2.websample.ws.records;
+
+import org.apache.empire.samples.cxf.wssample.common.Department;
+import org.apache.empire.struts2.websample.web.SampleContext;
+import org.apache.empire.struts2.websample.ws.SampleBeanDomain;
+import org.apache.empire.struts2.websample.ws.SampleRecord;
+
+public class DepartmentRecord extends SampleRecord<Department>
+{
+ public static final SampleBeanDomain.Departments T = SampleBeanDomain.getInstance().T_DEPARTMENTS;
+
+ // Department Record
+ public DepartmentRecord(SampleContext context)
+ {
+ super(context, new Department(), T);
+ }
+}
Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/records/DepartmentRecord.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/records/EmployeeRecord.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/records/EmployeeRecord.java?rev=748189&view=auto
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/records/EmployeeRecord.java (added)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/records/EmployeeRecord.java Thu Feb 26 15:54:32 2009
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.empire.struts2.websample.ws.records;
+
+import java.util.List;
+
+import org.apache.empire.commons.OptionEntry;
+import org.apache.empire.commons.Options;
+import org.apache.empire.data.Column;
+import org.apache.empire.samples.cxf.wssample.common.Department;
+import org.apache.empire.samples.cxf.wssample.common.Employee;
+import org.apache.empire.struts2.websample.web.SampleContext;
+import org.apache.empire.struts2.websample.ws.SampleBeanDomain;
+import org.apache.empire.struts2.websample.ws.SampleRecord;
+
+
+public class EmployeeRecord extends SampleRecord<Employee>
+{
+ public static final SampleBeanDomain.Employees T = SampleBeanDomain.getInstance().T_EMPLOYEES;
+
+ // Department Record
+ public EmployeeRecord(SampleContext context)
+ {
+ super(context, new Employee(), T);
+ }
+
+ @Override
+ public Options getFieldOptions(Column column) {
+
+ Options opts = null;
+ if(column.equals(T.C_DEPARTMENT_ID))
+ {
+ opts = getDepartments(context);
+ }
+ else
+ {
+ opts=super.getFieldOptions(column);;
+ }
+ return opts;
+ }
+
+ public static Options getDepartments(SampleContext context)
+ {
+ Options opts = new Options();
+ List<Department> _deps = context.getWebserviceProxy().getDepartments();
+ for(Department d: _deps)
+ {
+ opts.add(new OptionEntry(d.getDepartmentId(),d.getName()));
+ }
+ return opts;
+ }
+
+ @Override
+ public boolean isNew()
+ {
+ return getBean().isNew();
+ }
+
+ @Override
+ public boolean isValid()
+ {
+
+ return super.isValid() && (getBean().getEmployeeId()!=-1 || getBean().isNew());
+ }
+
+}
Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/ws/records/EmployeeRecord.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/log4j.dtd
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/log4j.dtd?rev=748189&view=auto
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/log4j.dtd (added)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/log4j.dtd Thu Feb 26 15:54:32 2009
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+<!-- Authors: Chris Taylor, Ceki Gulcu. -->
+
+<!-- Version: 1.2 -->
+
+<!-- A configuration element consists of optional renderer
+elements,appender elements, categories and an optional root
+element. -->
+
+<!ELEMENT log4j:configuration (renderer*, appender*,(category|logger)*,root?,
+ categoryFactory?)>
+
+<!-- The "threshold" attribute takes a level value such that all -->
+<!-- logging statements with a level equal or below this value are -->
+<!-- disabled. -->
+
+<!-- Setting the "debug" enable the printing of internal log4j logging -->
+<!-- statements. -->
+
+<!-- By default, debug attribute is "null", meaning that we not do touch -->
+<!-- internal log4j logging settings. The "null" value for the threshold -->
+<!-- attribute can be misleading. The threshold field of a repository -->
+<!-- cannot be set to null. The "null" value for the threshold attribute -->
+<!-- simply means don't touch the threshold field, the threshold field -->
+<!-- keeps its old value. -->
+
+<!ATTLIST log4j:configuration
+ xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/"
+ threshold (all|debug|info|warn|error|fatal|off|null) "null"
+ debug (true|false|null) "null"
+>
+
+<!-- renderer elements allow the user to customize the conversion of -->
+<!-- message objects to String. -->
+
+<!ELEMENT renderer EMPTY>
+<!ATTLIST renderer
+ renderedClass CDATA #REQUIRED
+ renderingClass CDATA #REQUIRED
+>
+
+<!-- Appenders must have a name and a class. -->
+<!-- Appenders may contain an error handler, a layout, optional parameters -->
+<!-- and filters. They may also reference (or include) other appenders. -->
+<!ELEMENT appender (errorHandler?, param*, layout?, filter*, appender-ref*)>
+<!ATTLIST appender
+ name ID #REQUIRED
+ class CDATA #REQUIRED
+>
+
+<!ELEMENT layout (param*)>
+<!ATTLIST layout
+ class CDATA #REQUIRED
+>
+
+<!ELEMENT filter (param*)>
+<!ATTLIST filter
+ class CDATA #REQUIRED
+>
+
+<!-- ErrorHandlers can be of any class. They can admit any number of -->
+<!-- parameters. -->
+
+<!ELEMENT errorHandler (param*, root-ref?, logger-ref*, appender-ref?)>
+<!ATTLIST errorHandler
+ class CDATA #REQUIRED
+>
+
+<!ELEMENT root-ref EMPTY>
+
+<!ELEMENT logger-ref EMPTY>
+<!ATTLIST logger-ref
+ ref IDREF #REQUIRED
+>
+
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+ name CDATA #REQUIRED
+ value CDATA #REQUIRED
+>
+
+
+<!-- The priority class is org.apache.log4j.Level by default -->
+<!ELEMENT priority (param*)>
+<!ATTLIST priority
+ class CDATA #IMPLIED
+ value CDATA #REQUIRED
+>
+
+<!-- The level class is org.apache.log4j.Level by default -->
+<!ELEMENT level (param*)>
+<!ATTLIST level
+ class CDATA #IMPLIED
+ value CDATA #REQUIRED
+>
+
+
+<!-- If no level element is specified, then the configurator MUST not -->
+<!-- touch the level of the named category. -->
+<!ELEMENT category (param*,(priority|level)?,appender-ref*)>
+<!ATTLIST category
+ class CDATA #IMPLIED
+ name CDATA #REQUIRED
+ additivity (true|false) "true"
+>
+
+<!-- If no level element is specified, then the configurator MUST not -->
+<!-- touch the level of the named logger. -->
+<!ELEMENT logger (level?,appender-ref*)>
+<!ATTLIST logger
+ name ID #REQUIRED
+ additivity (true|false) "true"
+>
+
+
+<!ELEMENT categoryFactory (param*)>
+<!ATTLIST categoryFactory
+ class CDATA #REQUIRED>
+
+<!ELEMENT appender-ref EMPTY>
+<!ATTLIST appender-ref
+ ref IDREF #REQUIRED
+>
+
+<!-- If no priority element is specified, then the configurator MUST not -->
+<!-- touch the priority of root. -->
+<!-- The root category always exists and cannot be subclassed. -->
+<!ELEMENT root (param*, (priority|level)?, appender-ref*)>
+
+
+<!-- ==================================================================== -->
+<!-- A logging event -->
+<!-- ==================================================================== -->
+<!ELEMENT log4j:eventSet (log4j:event*)>
+<!ATTLIST log4j:eventSet
+ xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/"
+ version (1.1|1.2) "1.2"
+ includesLocationInfo (true|false) "true"
+>
+
+
+
+<!ELEMENT log4j:event (log4j:message, log4j:NDC?, log4j:throwable?,
+ log4j:locationInfo?) >
+
+<!-- The timestamp format is application dependent. -->
+<!ATTLIST log4j:event
+ logger CDATA #REQUIRED
+ level CDATA #REQUIRED
+ thread CDATA #REQUIRED
+ timestamp CDATA #REQUIRED
+>
+
+<!ELEMENT log4j:message (#PCDATA)>
+<!ELEMENT log4j:NDC (#PCDATA)>
+
+<!ELEMENT log4j:throwable (#PCDATA)>
+
+<!ELEMENT log4j:locationInfo EMPTY>
+<!ATTLIST log4j:locationInfo
+ class CDATA #REQUIRED
+ method CDATA #REQUIRED
+ file CDATA #REQUIRED
+ line CDATA #REQUIRED
+>
Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/log4j.dtd
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/log4j.xml
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/log4j.xml?rev=748189&view=auto
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/log4j.xml (added)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/log4j.xml Thu Feb 26 15:54:32 2009
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+ <appender name="default" class="org.apache.log4j.ConsoleAppender">
+ <!-- layout class="org.apache.log4j.TTCCLayout"/ -->
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- param name="ConversionPattern" value="NSB(%c) %-5p %m at %l%n"/ -->
+ <param name="ConversionPattern" value="%-5p: %m at %l %n"/>
+ </layout>
+ </appender>
+
+ <!-- log detail configuration -->
+
+ <logger name="org.apache" additivity="false">
+ <level value="warn"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <logger name="org.apache.struts2" additivity="false">
+ <level value="info"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <logger name="com.opensymphony.xwork" additivity="false">
+ <level value="info"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <logger name="freemarker" additivity="false">
+ <level value="warn"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <logger name="com.mevipro" additivity="false">
+ <level value="debug"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <logger name="org.apache.empire.commons" additivity="false">
+ <level value="warn"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <logger name="org.apache.empire.db" additivity="false">
+ <level value="debug"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <logger name="org.apache.empire.struts2" additivity="false">
+ <level value="debug"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <logger name="org.apache.empire.struts2.websample" additivity="false">
+ <level value="info"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <root>
+ <priority value="warn"/>
+ <appender-ref ref="default"/>
+ </root>
+
+</log4j:configuration>
Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/log4j.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/messages_de.properties
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/messages_de.properties?rev=748189&view=auto
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/messages_de.properties (added)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/messages_de.properties Thu Feb 26 15:54:32 2009
@@ -0,0 +1,95 @@
+#/*
+# * Licensed to the Apache Software Foundation (ASF) under one
+# * or more contributor license agreements. See the NOTICE file
+# * distributed with this work for additional information
+# * regarding copyright ownership. The ASF licenses this file
+# * to you under the Apache License, Version 2.0 (the
+# * "License"); you may not use this file except in compliance
+# * with the License. You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing,
+# * software distributed under the License is distributed on an
+# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# * KIND, either express or implied. See the License for the
+# * specific language governing permissions and limitations
+# * under the License.
+# */
+
+#fields
+field.title.employees.employeeId=Mitarbeiter Nr.
+field.title.employees.salutation=Anrede
+field.title.employees.firstname=Vorname
+field.title.employees.lastname=Nachname
+field.title.employees.dateOfBirth=Geburtsdatum
+field.title.employees.departmentId=Abteilung
+field.title.employees.gender=Geschlecht
+field.title.employees.phoneNumber=Telefonnummer
+field.title.employees.email=E-Mail
+field.title.employees.retired=Ausgeschieden
+field.title.employees.updateTimestamp=Zuletzt geändert am
+field.title.departments.name=Abteilungsname
+field.title.departments.head=Abteilugnsleiter
+
+#options
+option.employee.gender.male=Männlich
+option.employee.gender.female=Weiblich
+
+#labels
+application.title=Mitarbeiterverwaltung (via WebService)
+label.employees=Mitarbeiterliste
+label.employees.beanList=Mitarbeiterliste (Bean-Liste)
+label.employees.reader=Mitarbeiterliste (DBReader)
+label.delete=Löschen
+label.edit=Bearbeiten
+label.employee.edit=Eintrag bearbeiten
+label.employee.add=Eintrag hinzufügen
+label.name=Name
+label.gender=Geschlecht
+label.age=Alter
+label.department=Abteilung
+label.user.Name=Name
+label.user.Pwd=Passwort
+label.user.Language=Sprache
+
+page.label.login=Anmelden
+page.label.loginHint=Hinweis: Geben Sie einen beliebigen Benutzernamen und Kennwort an.
+page.label.logininfo=Sie sind angemeldet als:
+page.label.search=Mitarbeiter suchen
+page.label.list=Mitarbeiter auswählen
+page.label.update=Mitarbeiter bearbeiten
+page.label.add=Mitarbeiter hinzufügen
+
+#button labels
+button.label.login=Anmelden
+button.label.search=Suchen...
+button.label.save=Speichern
+button.label.cancel=Abbrechen
+button.label.delete=Löschen
+
+#link labels
+link.label.addemployee=Neuen Eintrag anlegen
+link.label.newSearch=neue Suche
+link.label.edit=Bearbeiten
+link.label.delete=Löschen
+link.label.logout=Logout
+link.label.search=Suchen
+
+##-- errors
+errors.prefix=<span style="color:red;font-weight:bold;">
+errors.suffix=</span>
+
+error.invalidpassword=Der eingegebene Benutzername ist ungültig (Es ist mindestens ein Zeichen erforderlich!)
+error.web.recordsDontMatch=The form submitted is invalid for the current context.
+error.web.columnNotFound=Die Spalte {0} wurde nicht gefunden!
+error.web.fieldError=Feld {0}: {1}
+error.web.input.integerFormat=Ungültiges Zahlenformat
+error.web.input.numberFormat=Ungültiges Zahlenformat
+error.web.input.dateFormat=Ungültiges Datumsformat
+error.web.input.date.notime=Es wurde keine Zeit angegeben
+error.web.input.required=Das Feld ist eingabepflichtig
+error.web.input.outOfRange=Der Wert muss zwischen {0} und {1} liegen.
+error.web.input.textTooShort=Der Wert muss mindestens {0} Zeichen enthalten.
+
+error.wsnav= Der WebService antwortet nicht!
Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/messages_de.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/messages_en.properties
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/messages_en.properties?rev=748189&view=auto
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/messages_en.properties (added)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/messages_en.properties Thu Feb 26 15:54:32 2009
@@ -0,0 +1,92 @@
+#/*
+# * Licensed to the Apache Software Foundation (ASF) under one
+# * or more contributor license agreements. See the NOTICE file
+# * distributed with this work for additional information
+# * regarding copyright ownership. The ASF licenses this file
+# * to you under the Apache License, Version 2.0 (the
+# * "License"); you may not use this file except in compliance
+# * with the License. You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing,
+# * software distributed under the License is distributed on an
+# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# * KIND, either express or implied. See the License for the
+# * specific language governing permissions and limitations
+# * under the License.
+# */
+
+#fields
+field.title.employees.employeeId=Employee ID
+field.title.employees.salutation=Salutation
+field.title.employees.firstname=Firstname
+field.title.employees.lastname=Lastname
+field.title.employees.dateOfBirth=Date of Birth
+field.title.employees.departmentId=Department
+field.title.employees.gender=Gender
+field.title.employees.phoneNumber=Phone
+field.title.employees.email=E-Mail
+field.title.employees.retired=Retired
+field.title.employees.updateTimestamp=Last change
+field.title.departments.name=Department
+field.title.departments.head=Head of Dept.
+
+#options
+option.employee.gender.male=Male
+option.employee.gender.female=Female
+
+#labels
+application.title=Employee Management Application (via WebService)
+label.employees=List of employees
+label.employees.beanList=Employees (Bean-List)
+label.employees.reader=Employees (DBReader)
+label.delete=Delete
+label.edit=Edit
+label.employee.edit=Employee details
+label.employee.add=Add employee
+label.department=Department
+label.user.Name=Name
+label.user.Pwd=Password
+label.user.Language=Language
+
+page.label.login=Login
+page.label.loginHint=Hint: enter any non null username and password.
+page.label.logininfo=You are logged in as:
+page.label.search=Search employee
+page.label.list=Select employee
+page.label.update=Edit employee details
+page.label.add=Add new employee
+
+#button labels
+button.label.login=Login
+button.label.search=Search
+button.label.save=Save
+button.label.cancel=Cancel
+button.label.delete=Delete
+
+#link labels
+link.label.addemployee=Add new employee
+link.label.newSearch=new Search
+link.label.edit=Edit
+link.label.delete=Delete
+link.label.logout=Logout
+link.label.search=Search
+
+##-- errors
+errors.prefix=<span style="color:red;font-weight:bold;">
+errors.suffix=</span>
+
+error.invalidpassword=The username is invalid (At least one character is required!)
+error.web.recordsDontMatch=The form submitted is invalid for the current context.
+error.web.columnNotFound=The column {0} has not been found!
+error.web.fieldError=Field {0}: {1}
+error.web.input.integerFormat=Invalid Integer format
+error.web.input.numberFormat=Invalid number format
+error.web.input.dateFormat=Invalid date format
+error.web.input.date.notime=No time specified.
+error.web.input.required=This field is required
+error.web.input.outOfRange=The value must be in the range of {0} and {1}.
+error.web.input.textTooShort=The value must contain at least {0} characters.
+
+error.wsnav= The webservice is not responding!
Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/messages_en.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.properties
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.properties?rev=748189&view=auto
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.properties (added)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.properties Thu Feb 26 15:54:32 2009
@@ -0,0 +1,20 @@
+#/*
+# * Licensed to the Apache Software Foundation (ASF) under one
+# * or more contributor license agreements. See the NOTICE file
+# * distributed with this work for additional information
+# * regarding copyright ownership. The ASF licenses this file
+# * to you under the Apache License, Version 2.0 (the
+# * "License"); you may not use this file except in compliance
+# * with the License. You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing,
+# * software distributed under the License is distributed on an
+# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# * KIND, either express or implied. See the License for the
+# * specific language governing permissions and limitations
+# * under the License.
+# */
+struts.custom.i18n.resources=messages
+struts.devMode=true
Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.xml?rev=748189&view=auto
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.xml (added)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.xml Thu Feb 26 15:54:32 2009
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+<!DOCTYPE struts PUBLIC
+ "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+ "http://struts.apache.org/dtds/struts-2.0.dtd">
+<struts>
+
+ <!--
+ <constant name="struts.devMode" value="true" />
+ <constant name="struts.enable.DynamicMethodInvocation" value="false" />
+ -->
+
+ <!-- Configuration for the default package. -->
+ <package name="sample" namespace="" extends="struts-default">
+
+ <interceptors>
+ <!-- org.apache.empire.struts2 Interceptors -->
+ <interceptor name="actionBasics" class="org.apache.empire.struts2.interceptors.ActionBasicsInterceptor" >
+ <param name="errorAction">login!doError</param>
+ </interceptor>
+
+ <!-- org.apache.empire.struts2 Interceptors -->
+ <interceptor name="actionAccess" class="org.apache.empire.struts2.interceptors.ActionAccessInterceptor" >
+ <param name="loginAction">login!doInit</param>
+ <param name="accessDeniedAction">login!doInit</param>
+ </interceptor>
+
+ <!-- Basic stack -->
+ <interceptor-stack name="sampleStack">
+ <interceptor-ref name="actionBasics"/>
+ <interceptor-ref name="actionAccess"/>
+ <!-- interceptor-ref name="servlet-config"/ -->
+ <!-- interceptor-ref name="prepare"/ -->
+ <!-- interceptor-ref name="checkbox"/ -->
+ <interceptor-ref name="params"/>
+ <!-- interceptor-ref name="conversionError"/ -->
+ </interceptor-stack>
+
+ </interceptors>
+
+ <!-- Default interceptor stack. -->
+ <default-interceptor-ref name="sampleStack"/>
+
+ <!-- Static Params Interceptor -->
+ <action name="login" class="org.apache.empire.struts2.websample.web.actions.LoginAction" method="doInit">
+ <result name="input">/jsp/login.jsp</result>
+ <result name="success" type="redirect-action">employeeList!doInit</result>
+ </action>
+
+ <action name="employeeList" class="org.apache.empire.struts2.websample.web.actions.EmployeeListAction" method="doInit">
+ <result name="search">/jsp/employeeSearch.jsp</result>
+ <result name="list">/jsp/employeeList.jsp</result>
+ </action>
+
+ <action name="employeeDetail" class="org.apache.empire.struts2.websample.web.actions.EmployeeDetailAction" method="doLoad">
+ <result name="input">/jsp/employeeDetails.jsp</result>
+ <result name="return" type="redirect-action">employeeList!doList</result>
+ </action>
+
+ </package>
+</struts>
Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/webapp/WEB-INF/config.xml
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/webapp/WEB-INF/config.xml?rev=748189&view=auto
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/webapp/WEB-INF/config.xml (added)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/webapp/WEB-INF/config.xml Thu Feb 26 15:54:32 2009
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+<config>
+
+ <properties>
+ <!-- provider name must match the property-section containing the connection data -->
+ <databaseProvider>webservice</databaseProvider>
+ </properties>
+
+ <properties-webservice>
+ <!-- Service Address properties for a WebService connection -->
+ <serviceHost>http://localhost</serviceHost>
+ <servicePort>8081</servicePort>
+ <serviceName>employeeManagement</serviceName>
+ </properties-webservice>
+
+ <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+ <appender name="default" class="org.apache.log4j.ConsoleAppender">
+ <!-- layout class="org.apache.log4j.TTCCLayout"/ -->
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- param name="ConversionPattern" value="NSB(%c) %-5p %m at %l%n"/ -->
+ <param name="ConversionPattern" value="%-5p [%d{yyyy/MM/dd HH:mm}]: %m at %l %n"/>
+ </layout>
+ </appender>
+
+ <!-- log detail configuration -->
+
+ <logger name="org.apache.empire.xml" additivity="false">
+ <level value="info"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <logger name="org.apache.empire.commons" additivity="false">
+ <level value="warn"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <logger name="org.apache.empire.db" additivity="false">
+ <level value="warn"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <!-- Set this level to "debug" to log all SQL-Statements -->
+ <logger name="org.apache.empire.db.DBDatabase" additivity="false">
+ <level value="debug"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <logger name="org.apache.empire.struts2" additivity="false">
+ <level value="warn"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <logger name="org.apache.empire.struts2.websample" additivity="false">
+ <level value="debug"/>
+ <appender-ref ref="default"/>
+ </logger>
+
+ <root>
+ <priority value="info"/>
+ <appender-ref ref="default"/>
+ </root>
+
+ </log4j:configuration>
+
+</config>
Propchange: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/webapp/WEB-INF/config.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain