diff --git a/flex-todolist-example/flex-todolist-config-example/README.md b/flex-todolist-example/flex-todolist-config-example/README.md new file mode 100644 index 0000000..6d3a198 --- /dev/null +++ b/flex-todolist-example/flex-todolist-config-example/README.md @@ -0,0 +1,7 @@ +flex-todolist-config-example +======================= + + + + +[http://www.adobe.com/devnet/flex/articles/fullstack_pt3.html](http://www.adobe.com/devnet/flex/articles/fullstack_pt3.html) \ No newline at end of file diff --git a/flex-todolist-example/flex-todolist-config-example/pom.xml b/flex-todolist-example/flex-todolist-config-example/pom.xml new file mode 100644 index 0000000..9b00e81 --- /dev/null +++ b/flex-todolist-example/flex-todolist-config-example/pom.xml @@ -0,0 +1,34 @@ + + 4.0.0 + + net.aimeizi + flex-todolist-example + 1.0.0 + + flex-todolist-config-example + pom + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + make shared resources + + single + + package + + + src/main/assembly/resources.xml + + + + + + + + + \ No newline at end of file diff --git a/flex-todolist-example/flex-todolist-config-example/src/main/assembly/resources.xml b/flex-todolist-example/flex-todolist-config-example/src/main/assembly/resources.xml new file mode 100644 index 0000000..dc76377 --- /dev/null +++ b/flex-todolist-example/flex-todolist-config-example/src/main/assembly/resources.xml @@ -0,0 +1,13 @@ + + resources + + zip + + false + + + src/main/resources + + + + diff --git a/flex-todolist-example/flex-todolist-config-example/src/main/resources/remoting-config.xml b/flex-todolist-example/flex-todolist-config-example/src/main/resources/remoting-config.xml new file mode 100644 index 0000000..8083f24 --- /dev/null +++ b/flex-todolist-example/flex-todolist-config-example/src/main/resources/remoting-config.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + spring + todoService + + + diff --git a/flex-todolist-example/flex-todolist-config-example/src/main/resources/services-config.xml b/flex-todolist-example/flex-todolist-config-example/src/main/resources/services-config.xml new file mode 100644 index 0000000..528c423 --- /dev/null +++ b/flex-todolist-example/flex-todolist-config-example/src/main/resources/services-config.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + false + + + + + + + + [BlazeDS] + true + false + true + true + + + Endpoint.* + Service.* + Message.* + DataService.* + Configuration + + + + + + + true + 20 + + {context.root}/WEB-INF/flex/services-config.xml + + + {context.root}/WEB-INF/flex/remoting-config.xml + + {context.root}/WEB-INF/web.xml + + + diff --git a/flex-todolist-example/flex-todolist-ria-example/README.md b/flex-todolist-example/flex-todolist-ria-example/README.md new file mode 100644 index 0000000..3a17b99 --- /dev/null +++ b/flex-todolist-example/flex-todolist-ria-example/README.md @@ -0,0 +1,7 @@ +flex-todolist-ria-example +======================= + + + + +[http://www.adobe.com/devnet/flex/articles/fullstack_pt1.html](http://www.adobe.com/devnet/flex/articles/fullstack_pt1.html) \ No newline at end of file diff --git a/flex-todolist-example/flex-todolist-ria-example/pom.xml b/flex-todolist-example/flex-todolist-ria-example/pom.xml new file mode 100644 index 0000000..3daaf15 --- /dev/null +++ b/flex-todolist-example/flex-todolist-ria-example/pom.xml @@ -0,0 +1,126 @@ + + + 4.0.0 + + net.aimeizi + flex-todolist-example + 1.0.0 + + flex-todolist-ria-example + swf + flex-todolist-ria-example Maven Flex + http://maven.apache.org + + + + + ${project.groupId} + flex-todolist-config-example + ${project.version} + resources + zip + provided + + + + com.adobe.flex.sdk + playerglobal + 3.0.0.3.0.0.477 + swc + external + + + com.adobe.flex.sdk + flex + 3.0.0.3.0.0.477 + swc + + + com.adobe.flex.sdk + framework + 3.0.0.3.0.0.477 + swc + + + com.adobe.flex.sdk + framework + 3.0.0.3.0.0.477 + resource-bundle + en_US + + + com.adobe.flex.sdk + rpc + 3.0.0.3.0.0.477 + swc + + + com.adobe.flex.sdk + rpc + 3.0.0.3.0.0.477 + resource-bundle + en_US + + + com.adobe.flex.sdk + utilities + 3.0.0.3.0.0.477 + swc + + + + + + src/main/flex + + install + + + + ${basedir}/src/main/resources + + + ${basedir}/target/generated-resources + true + + + + + + info.rvin.mojo + flex-compiler-mojo + 1.0-beta3 + true + + + en_US + + flex-todolist-web-example + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-config + + unpack-dependencies + + generate-resources + + ${project.build.directory}/generated-resources + flex-todolist-config-example + ${project.groupId} + true + + + + + + + + \ No newline at end of file diff --git a/flex-todolist-example/flex-todolist-ria-example/src/main/flex/index.mxml b/flex-todolist-example/flex-todolist-ria-example/src/main/flex/index.mxml new file mode 100644 index 0000000..8581bcc --- /dev/null +++ b/flex-todolist-example/flex-todolist-ria-example/src/main/flex/index.mxml @@ -0,0 +1,8 @@ + + + + + + diff --git a/flex-todolist-example/flex-todolist-ria-example/src/main/flex/org/epseelon/samples/todolist/view/entity/TodoItem.as b/flex-todolist-example/flex-todolist-ria-example/src/main/flex/org/epseelon/samples/todolist/view/entity/TodoItem.as new file mode 100644 index 0000000..ef7bcc2 --- /dev/null +++ b/flex-todolist-example/flex-todolist-ria-example/src/main/flex/org/epseelon/samples/todolist/view/entity/TodoItem.as @@ -0,0 +1,10 @@ +package org.epseelon.samples.todolist.view.entity +{ +[RemoteClass(alias="org.epseelon.samples.todolist.domain.TodoItem")] +[Bindable] +public class TodoItem +{ + public var id:Number; + public var title:String; +} +} diff --git a/flex-todolist-example/flex-todolist-ria-example/src/main/flex/org/epseelon/samples/todolist/view/screen/TodoForm.mxml b/flex-todolist-example/flex-todolist-ria-example/src/main/flex/org/epseelon/samples/todolist/view/screen/TodoForm.mxml new file mode 100644 index 0000000..cd64294 --- /dev/null +++ b/flex-todolist-example/flex-todolist-ria-example/src/main/flex/org/epseelon/samples/todolist/view/screen/TodoForm.mxml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flex-todolist-example/flex-todolist-ria-example/src/main/flex/org/flex/todolist/ria/example/Main.mxml b/flex-todolist-example/flex-todolist-ria-example/src/main/flex/org/flex/todolist/ria/example/Main.mxml new file mode 100644 index 0000000..de1a730 --- /dev/null +++ b/flex-todolist-example/flex-todolist-ria-example/src/main/flex/org/flex/todolist/ria/example/Main.mxml @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/flex-todolist-example/flex-todolist-web-example/README.md b/flex-todolist-example/flex-todolist-web-example/README.md new file mode 100644 index 0000000..4398240 --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/README.md @@ -0,0 +1,10 @@ +flex-todolist-web-example +======================= + + +``` +mvn jetty:run +``` + + +[http://www.adobe.com/devnet/flex/articles/fullstack_pt2.html](http://www.adobe.com/devnet/flex/articles/fullstack_pt2.html) \ No newline at end of file diff --git a/flex-todolist-example/flex-todolist-web-example/pom.xml b/flex-todolist-example/flex-todolist-web-example/pom.xml new file mode 100644 index 0000000..f913acb --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/pom.xml @@ -0,0 +1,171 @@ + + + 4.0.0 + + net.aimeizi + flex-todolist-example + 1.0.0 + + flex-todolist-web-example + war + flex-todolist-web-example Maven Webapp + http://maven.apache.org + + + + + mysql + mysql-connector-java + 5.1.31 + + + + ${project.groupId} + flex-todolist-ria-example + ${project.version} + swf + + + + junit + junit + 3.8.1 + test + + + org.springframework + spring + 2.5.2 + + + org.aspectj + aspectjrt + 1.5.4 + + + org.aspectj + aspectjweaver + 1.5.4 + + + org.hibernate + hibernate + 3.2.6.ga + + + + com.adobe.blazeds + blazeds-common + 3.0.0.544 + + + com.adobe.blazeds + blazeds-core + 3.0.0.544 + + + com.adobe.blazeds + blazeds-remoting + 3.0.0.544 + + + backport-util-concurrent + backport-util-concurrent + 3.1 + + + javax.servlet + servlet-api + 2.5 + provided + + + + ${project.groupId} + flex-todolist-config-example + ${project.version} + resources + zip + provided + + + + + + flex-todolist-web-example + + + src/main/resources + + + src/main/java + + **/*.java + + + **/*.xml + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + + + + + maven-dependency-plugin + + + unpack-config + + unpack-dependencies + + generate-resources + + ${project.build.directory}/${project.build.finalName}/WEB-INF/flex + + flex-todolist-config-example + ${project.groupId} + resources + true + jar,swf + + + + copy-swf + process-classes + + copy-dependencies + + + ${project.build.directory}/${project.build.finalName} + swf + + + + + + + info.rvin.mojo + flex-compiler-mojo + true + + + + org.eclipse.jetty + jetty-maven-plugin + + + + + + diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/java/.DS_Store b/flex-todolist-example/flex-todolist-web-example/src/main/java/.DS_Store new file mode 100644 index 0000000..c3fa791 Binary files /dev/null and b/flex-todolist-example/flex-todolist-web-example/src/main/java/.DS_Store differ diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/business/TodoService.java b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/business/TodoService.java new file mode 100644 index 0000000..fc7a798 --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/business/TodoService.java @@ -0,0 +1,15 @@ +package org.epseelon.samples.todolist.business; + +import org.epseelon.samples.todolist.domain.TodoItem; + +import java.util.List; + +public interface TodoService { + void remove(TodoItem todoItem) throws Exception; + + TodoItem save(TodoItem todoItem) throws Exception; + + TodoItem findById(TodoItem todoItem) throws Exception; + + List getList() throws Exception; +} diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/business/TodoServiceImpl.java b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/business/TodoServiceImpl.java new file mode 100644 index 0000000..a86e973 --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/business/TodoServiceImpl.java @@ -0,0 +1,47 @@ +package org.epseelon.samples.todolist.business; + +import org.epseelon.samples.todolist.domain.TodoItem; +import org.epseelon.samples.todolist.domain.TodoItemRepository; + +import java.util.List; + +public class TodoServiceImpl implements TodoService { + private TodoItemRepository todoItemRepository; + + public void setTodoItemRepository(TodoItemRepository todoItemRepository) { + this.todoItemRepository = todoItemRepository; + } + + public TodoItem save(TodoItem item) throws Exception { + try { + this.todoItemRepository.save(item); + return item; + } catch (Exception e) { + throw new Exception("Could not save item because: " + e.getCause()); + } + } + + public void remove(TodoItem item) throws Exception { + try { + this.todoItemRepository.remove(item); + } catch (Exception e) { + throw new Exception("Could not delete item because " + e.getMessage()); + } + } + + public TodoItem findById(TodoItem item) throws Exception { + try { + return this.todoItemRepository.findById(item); + } catch (Exception e) { + throw new Exception("Could not find item because " + e.getMessage()); + } + } + + public List getList() throws Exception { + try { + return this.todoItemRepository.getList(); + } catch (Exception e) { + throw new Exception("Could not list items because " + e.getMessage()); + } + } +} diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/controller/SpringFactory.java b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/controller/SpringFactory.java new file mode 100644 index 0000000..fc644fe --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/controller/SpringFactory.java @@ -0,0 +1,67 @@ +package org.epseelon.samples.todolist.controller; + +import flex.messaging.FactoryInstance; +import flex.messaging.FlexFactory; +import flex.messaging.config.ConfigMap; +import flex.messaging.services.ServiceException; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.NoSuchBeanDefinitionException; +import org.springframework.context.ApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +public class SpringFactory implements FlexFactory { + private static final String SOURCE = "source"; + + public void initialize(String id, ConfigMap configMap) { + } + + public FactoryInstance createFactoryInstance(String id, ConfigMap properties) { + SpringFactoryInstance instance = new SpringFactoryInstance(this, id, properties); + instance.setSource(properties.getPropertyAsString(SOURCE, instance.getId())); + return instance; + } // end method createFactoryInstance() + + public Object lookup(FactoryInstance inst) { + SpringFactoryInstance factoryInstance = (SpringFactoryInstance) inst; + return factoryInstance.lookup(); + } + + static class SpringFactoryInstance extends FactoryInstance { + SpringFactoryInstance(SpringFactory factory, String id, ConfigMap properties) { + super(factory, id, properties); + } + + public String toString() { + return "SpringFactory instance for id=" + getId() + " source=" + getSource() + " scope=" + + getScope(); + } + + public Object lookup() { + ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(flex.messaging.FlexContext.getServletConfig().getServletContext()); + + String beanName = getSource(); + try { + return appContext.getBean(beanName); + } catch (NoSuchBeanDefinitionException nexc) { + ServiceException e = new ServiceException(); + String msg = "Spring service named '" + beanName + + "' does not exist."; + e.setMessage(msg); + e.setRootCause(nexc); + e.setDetails(msg); + e.setCode("Server.Processing"); + + throw e; + } catch (BeansException bexc) { + ServiceException e = new ServiceException(); + String msg = "Unable to create Spring service named '" + + beanName + "' "; + e.setMessage(msg); + e.setRootCause(bexc); + e.setDetails(msg); + e.setCode("Server.Processing"); + throw e; + } + } + } +} diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/.DS_Store b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/.DS_Store differ diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/TodoItem.java b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/TodoItem.java new file mode 100644 index 0000000..1c539e0 --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/TodoItem.java @@ -0,0 +1,22 @@ +package org.epseelon.samples.todolist.domain; + +public class TodoItem { + private long id; + private String title; + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } +} diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/TodoItemRepository.java b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/TodoItemRepository.java new file mode 100644 index 0000000..ac207af --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/TodoItemRepository.java @@ -0,0 +1,13 @@ +package org.epseelon.samples.todolist.domain; + +import java.util.List; + +public interface TodoItemRepository { + void remove(TodoItem todoItem); + + TodoItem save(TodoItem todoItem); + + TodoItem findById(TodoItem todoItem) throws Exception; + + List getList(); +} diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/hibernate/TodoItemHibernateDao.java b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/hibernate/TodoItemHibernateDao.java new file mode 100644 index 0000000..1cf5a25 --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/hibernate/TodoItemHibernateDao.java @@ -0,0 +1,32 @@ +package org.epseelon.samples.todolist.domain.hibernate; + +import org.epseelon.samples.todolist.domain.TodoItem; +import org.epseelon.samples.todolist.domain.TodoItemRepository; +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; + +import java.util.List; + +public class TodoItemHibernateDao extends HibernateDaoSupport implements TodoItemRepository { + public TodoItem save(TodoItem todoItem) { + getHibernateTemplate().saveOrUpdate(todoItem); + return todoItem; + } + + public void remove(TodoItem todoItem) { + getHibernateTemplate().delete(todoItem); + } + + public TodoItem findById(TodoItem todoItem) throws Exception { + long id = todoItem.getId(); + todoItem = (TodoItem) getHibernateTemplate().get(TodoItem.class, todoItem.getId()); + + if (todoItem == null) + throw new Exception("Could not find an item with id " + id); + return todoItem; + } + + @SuppressWarnings("unchecked") + public List getList() { + return (List) getHibernateTemplate().loadAll(TodoItem.class); + } +} diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/hibernate/hbm/TodoItem.hbm.xml b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/hibernate/hbm/TodoItem.hbm.xml new file mode 100644 index 0000000..529a7ea --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/java/org/epseelon/samples/todolist/domain/hibernate/hbm/TodoItem.hbm.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/resources/todolist.sql b/flex-todolist-example/flex-todolist-web-example/src/main/resources/todolist.sql new file mode 100644 index 0000000..c9cf05f --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/resources/todolist.sql @@ -0,0 +1,5 @@ +CREATE TABLE `todoitem` ( + `id_todoitem` int(10) unsigned NOT NULL auto_increment, + `title` varchar(256) NOT NULL, + PRIMARY KEY (`id_todoitem`) +) ENGINE=InnoDB; \ No newline at end of file diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/webapp/.DS_Store b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/.DS_Store new file mode 100644 index 0000000..8da1de7 Binary files /dev/null and b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/.DS_Store differ diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/webapp/AC_OETags.js b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/AC_OETags.js new file mode 100644 index 0000000..e77e6fd --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/AC_OETags.js @@ -0,0 +1,276 @@ +// Flash Player Version Detection - Rev 1.6 +// Detect Client Browser type +// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved. +var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; +var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; +var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false; + +function ControlVersion() +{ + var version; + var axo; + var e; + + // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry + + try { + // version will be set for 7.X or greater players + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); + version = axo.GetVariable("$version"); + } catch (e) { + } + + if (!version) + { + try { + // version will be set for 6.X players only + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); + + // installed player is some revision of 6.0 + // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29, + // so we have to be careful. + + // default to the first public version + version = "WIN 6,0,21,0"; + + // throws if AllowScripAccess does not exist (introduced in 6.0r47) + axo.AllowScriptAccess = "always"; + + // safe to call for 6.0r47 or greater + version = axo.GetVariable("$version"); + + } catch (e) { + } + } + + if (!version) + { + try { + // version will be set for 4.X or 5.X player + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); + version = axo.GetVariable("$version"); + } catch (e) { + } + } + + if (!version) + { + try { + // version will be set for 3.X player + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); + version = "WIN 3,0,18,0"; + } catch (e) { + } + } + + if (!version) + { + try { + // version will be set for 2.X player + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); + version = "WIN 2,0,0,11"; + } catch (e) { + version = -1; + } + } + + return version; +} + +// JavaScript helper required to detect Flash Player PlugIn version information +function GetSwfVer(){ + // NS/Opera version >= 3 check for Flash plugin in plugin array + var flashVer = -1; + + if (navigator.plugins != null && navigator.plugins.length > 0) { + if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) { + var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : ""; + var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description; + var descArray = flashDescription.split(" "); + var tempArrayMajor = descArray[2].split("."); + var versionMajor = tempArrayMajor[0]; + var versionMinor = tempArrayMajor[1]; + var versionRevision = descArray[3]; + if (versionRevision == "") { + versionRevision = descArray[4]; + } + if (versionRevision[0] == "d") { + versionRevision = versionRevision.substring(1); + } else if (versionRevision[0] == "r") { + versionRevision = versionRevision.substring(1); + if (versionRevision.indexOf("d") > 0) { + versionRevision = versionRevision.substring(0, versionRevision.indexOf("d")); + } + } + var flashVer = versionMajor + "." + versionMinor + "." + versionRevision; + } + } + // MSN/WebTV 2.6 supports Flash 4 + else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4; + // WebTV 2.5 supports Flash 3 + else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3; + // older WebTV supports Flash 2 + else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2; + else if ( isIE && isWin && !isOpera ) { + flashVer = ControlVersion(); + } + return flashVer; +} + +// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available +function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) +{ + versionStr = GetSwfVer(); + if (versionStr == -1 ) { + return false; + } else if (versionStr != 0) { + if(isIE && isWin && !isOpera) { + // Given "WIN 2,0,0,11" + tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"] + tempString = tempArray[1]; // "2,0,0,11" + versionArray = tempString.split(","); // ['2', '0', '0', '11'] + } else { + versionArray = versionStr.split("."); + } + var versionMajor = versionArray[0]; + var versionMinor = versionArray[1]; + var versionRevision = versionArray[2]; + + // is the major.revision >= requested major.revision AND the minor version >= requested minor + if (versionMajor > parseFloat(reqMajorVer)) { + return true; + } else if (versionMajor == parseFloat(reqMajorVer)) { + if (versionMinor > parseFloat(reqMinorVer)) + return true; + else if (versionMinor == parseFloat(reqMinorVer)) { + if (versionRevision >= parseFloat(reqRevision)) + return true; + } + } + return false; + } +} + +function AC_AddExtension(src, ext) +{ + if (src.indexOf('?') != -1) + return src.replace(/\?/, ext+'?'); + else + return src + ext; +} + +function AC_Generateobj(objAttrs, params, embedAttrs) +{ + var str = ''; + if (isIE && isWin && !isOpera) + { + str += ' '; + str += ''; + } else { + str += ' + + + + + + + + + + + + + + + + + + + + + + + classpath:org/epseelon/samples/todolist/domain/hibernate/hbm/ + + + + + + + ${hibernate.dialect} + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/webapp/WEB-INF/jdbc.properties b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/WEB-INF/jdbc.properties new file mode 100644 index 0000000..6934778 --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/WEB-INF/jdbc.properties @@ -0,0 +1,5 @@ +jdbc.driverClassName=com.mysql.jdbc.Driver +jdbc.url=jdbc:mysql://localhost:3306/todolist +jdbc.username=root +jdbc.password= +hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/webapp/WEB-INF/log4j.properties b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/WEB-INF/log4j.properties new file mode 100644 index 0000000..8ff0d62 --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/WEB-INF/log4j.properties @@ -0,0 +1,19 @@ +### direct log messages to stdout ### +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n + +# set root logger level to debug and its only appender to mtf +log4j.rootLogger=INFO,development + +# only for development purposes +log4j.appender.development=org.apache.log4j.ConsoleAppender +log4j.appender.development.layout=org.apache.log4j.PatternLayout +log4j.appender.development.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p [%t] (%F:%L) - %m%n + +log4j.logger.noModule=FATAL +log4j.logger.org.springframework=WARN + +# Log JDBC bind parameter runtime arguments +log4j.logger.org.hibernate.type=DEBUG diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/webapp/WEB-INF/web.xml b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..862d02e --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,60 @@ + + + + Todo List + + + contextConfigLocation + /WEB-INF/applicationContext.xml + + + + + org.springframework.web.context.ContextLoaderListener + + + + + org.springframework.web.context.request.RequestContextListener + + + + + flex.class.path + /WEB-INF/flex/hotfixes + + + + + MessageBrokerServlet + + flex.messaging.MessageBrokerServlet + + + services.configuration.file + /WEB-INF/flex/services-config.xml + + + flex.write.path + /WEB-INF/flex + + 1 + + + + MessageBrokerServlet + /messagebroker/* + + + + + index.html + index.htm + index.jsp + + + diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/webapp/history/history.css b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/history/history.css new file mode 100644 index 0000000..dbc47c6 --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/history/history.css @@ -0,0 +1,6 @@ +/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */ + +#ie_historyFrame { width: 0px; height: 0px; display:none } +#firefox_anchorDiv { width: 0px; height: 0px; display:none } +#safari_formDiv { width: 0px; height: 0px; display:none } +#safari_rememberDiv { width: 0px; height: 0px; display:none } diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/webapp/history/history.js b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/history/history.js new file mode 100644 index 0000000..c86514a --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/history/history.js @@ -0,0 +1,645 @@ +BrowserHistoryUtils = { + addEvent: function(elm, evType, fn, useCapture) { + useCapture = useCapture || false; + if (elm.addEventListener) { + elm.addEventListener(evType, fn, useCapture); + return true; + } + else if (elm.attachEvent) { + var r = elm.attachEvent('on' + evType, fn); + return r; + } + else { + elm['on' + evType] = fn; + } + } +} + +BrowserHistory = (function() { + // type of browser + var browser = { + ie: false, + firefox: false, + safari: false, + opera: false, + version: -1 + }; + + // if setDefaultURL has been called, our first clue + // that the SWF is ready and listening + //var swfReady = false; + + // the URL we'll send to the SWF once it is ready + //var pendingURL = ''; + + // Default app state URL to use when no fragment ID present + var defaultHash = ''; + + // Last-known app state URL + var currentHref = document.location.href; + + // Initial URL (used only by IE) + var initialHref = document.location.href; + + // Initial URL (used only by IE) + var initialHash = document.location.hash; + + // History frame source URL prefix (used only by IE) + var historyFrameSourcePrefix = 'history/historyFrame.html?'; + + // History maintenance (used only by Safari) + var currentHistoryLength = -1; + + var historyHash = []; + + var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash); + + var backStack = []; + var forwardStack = []; + + var currentObjectId = null; + + //UserAgent detection + var useragent = navigator.userAgent.toLowerCase(); + + if (useragent.indexOf("opera") != -1) { + browser.opera = true; + } else if (useragent.indexOf("msie") != -1) { + browser.ie = true; + browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4)); + } else if (useragent.indexOf("safari") != -1) { + browser.safari = true; + browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7)); + } else if (useragent.indexOf("gecko") != -1) { + browser.firefox = true; + } + + if (browser.ie == true && browser.version == 7) { + window["_ie_firstload"] = false; + } + + // Accessor functions for obtaining specific elements of the page. + function getHistoryFrame() + { + return document.getElementById('ie_historyFrame'); + } + + function getAnchorElement() + { + return document.getElementById('firefox_anchorDiv'); + } + + function getFormElement() + { + return document.getElementById('safari_formDiv'); + } + + function getRememberElement() + { + return document.getElementById("safari_remember_field"); + } + + /* Get the Flash player object for performing ExternalInterface callbacks. */ + function getPlayer(objectId) { + var objectId = objectId || null; + var player = null; /* AJH, needed? = document.getElementById(getPlayerId()); */ + if (browser.ie && objectId != null) { + player = document.getElementById(objectId); + } + if (player == null) { + player = document.getElementsByTagName('object')[0]; + } + + if (player == null || player.object == null) { + player = document.getElementsByTagName('embed')[0]; + } + + return player; + } + + function getPlayers() { + var players = []; + if (players.length == 0) { + var tmp = document.getElementsByTagName('object'); + players = tmp; + } + + if (players.length == 0 || players[0].object == null) { + var tmp = document.getElementsByTagName('embed'); + players = tmp; + } + return players; + } + + function getIframeHash() { + var doc = getHistoryFrame().contentWindow.document; + var hash = String(doc.location.search); + if (hash.length == 1 && hash.charAt(0) == "?") { + hash = ""; + } + else if (hash.length >= 2 && hash.charAt(0) == "?") { + hash = hash.substring(1); + } + return hash; + } + + /* Get the current location hash excluding the '#' symbol. */ + function getHash() { + // It would be nice if we could use document.location.hash here, + // but it's faulty sometimes. + var idx = document.location.href.indexOf('#'); + return (idx >= 0) ? document.location.href.substr(idx+1) : ''; + } + + /* Get the current location hash excluding the '#' symbol. */ + function setHash(hash) { + // It would be nice if we could use document.location.hash here, + // but it's faulty sometimes. + if (hash == '') hash = '#' + document.location.hash = hash; + } + + function createState(baseUrl, newUrl, flexAppUrl) { + return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null }; + } + + /* Add a history entry to the browser. + * baseUrl: the portion of the location prior to the '#' + * newUrl: the entire new URL, including '#' and following fragment + * flexAppUrl: the portion of the location following the '#' only + */ + function addHistoryEntry(baseUrl, newUrl, flexAppUrl) { + + //delete all the history entries + forwardStack = []; + + if (browser.ie) { + //Check to see if we are being asked to do a navigate for the first + //history entry, and if so ignore, because it's coming from the creation + //of the history iframe + if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) { + currentHref = initialHref; + return; + } + if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) { + newUrl = baseUrl + '#' + defaultHash; + flexAppUrl = defaultHash; + } else { + // for IE, tell the history frame to go somewhere without a '#' + // in order to get this entry into the browser history. + getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl; + } + setHash(flexAppUrl); + } else { + + //ADR + if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) { + initialState = createState(baseUrl, newUrl, flexAppUrl); + } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) { + backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl); + } + + if (browser.safari) { + // for Safari, submit a form whose action points to the desired URL + if (browser.version <= 419.3) { + var file = window.location.pathname.toString(); + file = file.substring(file.lastIndexOf("/")+1); + getFormElement().innerHTML = '
'; + //get the current elements and add them to the form + var qs = window.location.search.substring(1); + var qs_arr = qs.split("&"); + for (var i = 0; i < qs_arr.length; i++) { + var tmp = qs_arr[i].split("="); + var elem = document.createElement("input"); + elem.type = "hidden"; + elem.name = tmp[0]; + elem.value = tmp[1]; + document.forms.historyForm.appendChild(elem); + } + document.forms.historyForm.submit(); + } else { + top.location.hash = flexAppUrl; + } + // We also have to maintain the history by hand for Safari + historyHash[history.length] = flexAppUrl; + _storeStates(); + } else { + // Otherwise, write an anchor into the page and tell the browser to go there + addAnchor(flexAppUrl); + setHash(flexAppUrl); + } + } + backStack.push(createState(baseUrl, newUrl, flexAppUrl)); + } + + function _storeStates() { + if (browser.safari) { + getRememberElement().value = historyHash.join(","); + } + } + + function handleBackButton() { + //The "current" page is always at the top of the history stack. + var current = backStack.pop(); + if (!current) { return; } + var last = backStack[backStack.length - 1]; + if (!last && backStack.length == 0){ + last = initialState; + } + forwardStack.push(current); + } + + function handleForwardButton() { + //summary: private method. Do not call this directly. + + var last = forwardStack.pop(); + if (!last) { return; } + backStack.push(last); + } + + function handleArbitraryUrl() { + //delete all the history entries + forwardStack = []; + } + + /* Called periodically to poll to see if we need to detect navigation that has occurred */ + function checkForUrlChange() { + + if (browser.ie) { + if (currentHref != document.location.href && currentHref + '#' != document.location.href) { + //This occurs when the user has navigated to a specific URL + //within the app, and didn't use browser back/forward + //IE seems to have a bug where it stops updating the URL it + //shows the end-user at this point, but programatically it + //appears to be correct. Do a full app reload to get around + //this issue. + if (browser.version < 7) { + currentHref = document.location.href; + document.location.reload(); + } else { + if (getHash() != getIframeHash()) { + // this.iframe.src = this.blankURL + hash; + var sourceToSet = historyFrameSourcePrefix + getHash(); + getHistoryFrame().src = sourceToSet; + } + } + } + } + + if (browser.safari) { + // For Safari, we have to check to see if history.length changed. + if (currentHistoryLength >= 0 && history.length != currentHistoryLength) { + //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|")); + // If it did change, then we have to look the old state up + // in our hand-maintained array since document.location.hash + // won't have changed, then call back into BrowserManager. + currentHistoryLength = history.length; + var flexAppUrl = historyHash[currentHistoryLength]; + if (flexAppUrl == '') { + //flexAppUrl = defaultHash; + } + //ADR: to fix multiple + if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) { + var pl = getPlayers(); + for (var i = 0; i < pl.length; i++) { + pl[i].browserURLChange(flexAppUrl); + } + } else { + getPlayer().browserURLChange(flexAppUrl); + } + _storeStates(); + } + } + if (browser.firefox) { + if (currentHref != document.location.href) { + var bsl = backStack.length; + + var urlActions = { + back: false, + forward: false, + set: false + } + + if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) { + urlActions.back = true; + // FIXME: could this ever be a forward button? + // we can't clear it because we still need to check for forwards. Ugg. + // clearInterval(this.locationTimer); + handleBackButton(); + } + + // first check to see if we could have gone forward. We always halt on + // a no-hash item. + if (forwardStack.length > 0) { + if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) { + urlActions.forward = true; + handleForwardButton(); + } + } + + // ok, that didn't work, try someplace back in the history stack + if ((bsl >= 2) && (backStack[bsl - 2])) { + if (backStack[bsl - 2].flexAppUrl == getHash()) { + urlActions.back = true; + handleBackButton(); + } + } + + if (!urlActions.back && !urlActions.forward) { + var foundInStacks = { + back: -1, + forward: -1 + } + + for (var i = 0; i < backStack.length; i++) { + if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) { + arbitraryUrl = true; + foundInStacks.back = i; + } + } + for (var i = 0; i < forwardStack.length; i++) { + if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) { + arbitraryUrl = true; + foundInStacks.forward = i; + } + } + handleArbitraryUrl(); + } + + // Firefox changed; do a callback into BrowserManager to tell it. + currentHref = document.location.href; + var flexAppUrl = getHash(); + if (flexAppUrl == '') { + //flexAppUrl = defaultHash; + } + //ADR: to fix multiple + if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) { + var pl = getPlayers(); + for (var i = 0; i < pl.length; i++) { + pl[i].browserURLChange(flexAppUrl); + } + } else { + getPlayer().browserURLChange(flexAppUrl); + } + } + } + //setTimeout(checkForUrlChange, 50); + } + + /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */ + function addAnchor(flexAppUrl) + { + if (document.getElementsByName(flexAppUrl).length == 0) { + getAnchorElement().innerHTML += "" + flexAppUrl + ""; + } + } + + var _initialize = function () { + if (browser.ie) + { + var scripts = document.getElementsByTagName('script'); + for (var i = 0, s; s = scripts[i]; i++) { + if (s.src.indexOf("history.js") > -1) { + var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html"); + } + } + historyFrameSourcePrefix = iframe_location + "?"; + var src = historyFrameSourcePrefix; + + var iframe = document.createElement("iframe"); + iframe.id = 'ie_historyFrame'; + iframe.name = 'ie_historyFrame'; + //iframe.src = historyFrameSourcePrefix; + try { + document.body.appendChild(iframe); + } catch(e) { + setTimeout(function() { + document.body.appendChild(iframe); + }, 0); + } + } + + if (browser.safari) + { + var rememberDiv = document.createElement("div"); + rememberDiv.id = 'safari_rememberDiv'; + document.body.appendChild(rememberDiv); + rememberDiv.innerHTML = ''; + + var formDiv = document.createElement("div"); + formDiv.id = 'safari_formDiv'; + document.body.appendChild(formDiv); + + var reloader_content = document.createElement('div'); + reloader_content.id = 'safarireloader'; + var scripts = document.getElementsByTagName('script'); + for (var i = 0, s; s = scripts[i]; i++) { + if (s.src.indexOf("history.js") > -1) { + html = (new String(s.src)).replace(".js", ".html"); + } + } + reloader_content.innerHTML = ''; + document.body.appendChild(reloader_content); + reloader_content.style.position = 'absolute'; + reloader_content.style.left = reloader_content.style.top = '-9999px'; + iframe = reloader_content.getElementsByTagName('iframe')[0]; + + if (document.getElementById("safari_remember_field").value != "" ) { + historyHash = document.getElementById("safari_remember_field").value.split(","); + } + + } + + if (browser.firefox) + { + var anchorDiv = document.createElement("div"); + anchorDiv.id = 'firefox_anchorDiv'; + document.body.appendChild(anchorDiv); + } + + //setTimeout(checkForUrlChange, 50); + } + + return { + historyHash: historyHash, + backStack: function() { return backStack; }, + forwardStack: function() { return forwardStack }, + getPlayer: getPlayer, + initialize: function(src) { + _initialize(src); + }, + setURL: function(url) { + document.location.href = url; + }, + getURL: function() { + return document.location.href; + }, + getTitle: function() { + return document.title; + }, + setTitle: function(title) { + try { + backStack[backStack.length - 1].title = title; + } catch(e) { } + //if on safari, set the title to be the empty string. + if (browser.safari) { + if (title == "") { + try { + var tmp = window.location.href.toString(); + title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#")); + } catch(e) { + title = ""; + } + } + } + document.title = title; + }, + setDefaultURL: function(def) + { + defaultHash = def; + def = getHash(); + //trailing ? is important else an extra frame gets added to the history + //when navigating back to the first page. Alternatively could check + //in history frame navigation to compare # and ?. + if (browser.ie) + { + window['_ie_firstload'] = true; + var sourceToSet = historyFrameSourcePrefix + def; + var func = function() { + getHistoryFrame().src = sourceToSet; + window.location.replace("#" + def); + setInterval(checkForUrlChange, 50); + } + try { + func(); + } catch(e) { + window.setTimeout(function() { func(); }, 0); + } + } + + if (browser.safari) + { + currentHistoryLength = history.length; + if (historyHash.length == 0) { + historyHash[currentHistoryLength] = def; + var newloc = "#" + def; + window.location.replace(newloc); + } else { + //alert(historyHash[historyHash.length-1]); + } + //setHash(def); + setInterval(checkForUrlChange, 50); + } + + + if (browser.firefox || browser.opera) + { + var reg = new RegExp("#" + def + "$"); + if (window.location.toString().match(reg)) { + } else { + var newloc ="#" + def; + window.location.replace(newloc); + } + setInterval(checkForUrlChange, 50); + //setHash(def); + } + + }, + + /* Set the current browser URL; called from inside BrowserManager to propagate + * the application state out to the container. + */ + setBrowserURL: function(flexAppUrl, objectId) { + if (browser.ie && typeof objectId != "undefined") { + currentObjectId = objectId; + } + //fromIframe = fromIframe || false; + //fromFlex = fromFlex || false; + //alert("setBrowserURL: " + flexAppUrl); + //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ; + + var pos = document.location.href.indexOf('#'); + var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href; + var newUrl = baseUrl + '#' + flexAppUrl; + + if (document.location.href != newUrl && document.location.href + '#' != newUrl) { + currentHref = newUrl; + addHistoryEntry(baseUrl, newUrl, flexAppUrl); + currentHistoryLength = history.length; + } + + return false; + }, + + browserURLChange: function(flexAppUrl) { + var objectId = null; + if (browser.ie && currentObjectId != null) { + objectId = currentObjectId; + } + pendingURL = ''; + + if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) { + var pl = getPlayers(); + for (var i = 0; i < pl.length; i++) { + try { + pl[i].browserURLChange(flexAppUrl); + } catch(e) { } + } + } else { + try { + getPlayer(objectId).browserURLChange(flexAppUrl); + } catch(e) { } + } + + currentObjectId = null; + } + + } + +})(); + +// Initialization + +// Automated unit testing and other diagnostics + +function setURL(url) +{ + document.location.href = url; +} + +function backButton() +{ + history.back(); +} + +function forwardButton() +{ + history.forward(); +} + +function goForwardOrBackInHistory(step) +{ + history.go(step); +} + +//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); }); +(function(i) { + var u =navigator.userAgent;var e=/*@cc_on!@*/false; + var st = setTimeout; + if(/webkit/i.test(u)){ + st(function(){ + var dr=document.readyState; + if(dr=="loaded"||dr=="complete"){i()} + else{st(arguments.callee,10);}},10); + } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){ + document.addEventListener("DOMContentLoaded",i,false); + } else if(e){ + (function(){ + var t=document.createElement('doc:rdy'); + try{t.doScroll('left'); + i();t=null; + }catch(e){st(arguments.callee,0);}})(); + } else{ + window.onload=i; + } +})( function() {BrowserHistory.initialize();} ); diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/webapp/history/historyFrame.html b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/history/historyFrame.html new file mode 100644 index 0000000..e83255f --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/history/historyFrame.html @@ -0,0 +1,29 @@ + + + + + + + + Hidden frame for Browser History support. + + diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/webapp/index.jsp b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/index.jsp new file mode 100644 index 0000000..1da5c89 --- /dev/null +++ b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/index.jsp @@ -0,0 +1,113 @@ + + + + + + + + + + Todo List + + + + + + + + + + + + + + + diff --git a/flex-todolist-example/flex-todolist-web-example/src/main/webapp/playerProductInstall.swf b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/playerProductInstall.swf new file mode 100644 index 0000000..bdc3437 Binary files /dev/null and b/flex-todolist-example/flex-todolist-web-example/src/main/webapp/playerProductInstall.swf differ diff --git a/flex-todolist-example/pom.xml b/flex-todolist-example/pom.xml new file mode 100644 index 0000000..b94ec6f --- /dev/null +++ b/flex-todolist-example/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + net.aimeizi + maven-framework-project + 1.0.0 + + flex-todolist-example + pom + + flex-todolist-ria-example + flex-todolist-web-example + flex-todolist-config-example + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.0 + + + org.apache.maven.plugins + maven-assembly-plugin + 2.2-beta-2 + + + + + + + + + flex-mojos + http://josephj.com/lab/flex-mojos/flex-mojos-read-only/repository/ + + true + + + false + + + + + + + + flex-mojos-repository + http://flex-mojos.googlecode.com/svn/trunk/repository/ + + true + + + false + + + + + flex-mojos + http://josephj.com/lab/flex-mojos/flex-mojos-read-only/repository/ + + true + + + false + + + + + \ No newline at end of file diff --git a/flex-todolist-example/todolist.zip b/flex-todolist-example/todolist.zip new file mode 100644 index 0000000..c84ba17 Binary files /dev/null and b/flex-todolist-example/todolist.zip differ diff --git a/nexus.xml b/nexus.xml new file mode 100644 index 0000000..ecba13e --- /dev/null +++ b/nexus.xml @@ -0,0 +1,2082 @@ + + + 2.2.0 + 2.5.1-01 + + 20000 + 3 + + + + 60000 + + + true + 8082 + strict + + + true + + + + central + Central + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://repo1.maven.org/maven2/ + + + http://mirrors.ibiblio.org/pub/mirrors/maven2 + http://mirrors.ibiblio.org/pub/mirrors/maven2 + + + + + ALLOW + -1 + 1440 + false + true + WARN + RELEASE + true + true + 1440 + + + + apache-snapshots + Apache Snapshots + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://repository.apache.org/snapshots/ + + + ALLOW + 1440 + 1440 + false + true + WARN + SNAPSHOT + true + true + 1440 + + + + codehaus-snapshots + Codehaus Snapshots + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://nexus.codehaus.org/snapshots/ + + + ALLOW + 1440 + 1440 + false + true + WARN + SNAPSHOT + true + true + 1440 + + + + releases + Releases + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + 1440 + true + true + true + ALLOW_WRITE_ONCE + true + true + + file + + + ALLOW + -1 + 1440 + false + false + WARN + RELEASE + + + + snapshots + Snapshots + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + 1440 + true + true + true + ALLOW_WRITE + true + true + + file + + + ALLOW + 1440 + 1440 + false + false + WARN + SNAPSHOT + + + + thirdparty + 3rd party + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + 1440 + true + true + true + ALLOW_WRITE_ONCE + true + true + + file + + + ALLOW + -1 + 1440 + false + false + WARN + RELEASE + + + + central-m1 + Central M1 shadow + org.sonatype.nexus.proxy.repository.ShadowRepository + m2-m1-shadow + IN_SERVICE + 15 + true + true + true + READ_ONLY + + file + + + central + false + + + + public + Public Repositories + org.sonatype.nexus.proxy.repository.GroupRepository + maven2 + IN_SERVICE + 15 + true + true + true + READ_ONLY + true + + file + + + true + + releases + thirdparty + central + alfresco + codehaus + google + java.net-m2 + jboss.repository + sonatyperepository + repo.spring.io.release + kantega + nightlabs + nuxeo + spy + thebuzzmedia + muleforge-repo + repo.maven.mule + yongtai + betaconceptframework + camunda + ibiblio + squashtest + jboss-thirdparty-releases + repo.spring.io.snapshot + oss.sourceforge-releases + softeu + apache-repo + oschina.releases + cloudhopper + kaifazhe + maven-db-plugin-repo + + + + + google + Google Code + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://google-maven-repository.googlecode.com/svn/repository/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + java.net-m2 + java.net - Maven 2 + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://download.java.net/maven/2/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + java.net-m1 + java.net - Maven 1 + org.sonatype.nexus.proxy.repository.Repository + maven1 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + + file + + + http://download.java.net/maven/1/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + sonatyperepository + Sonatype Repository + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://repository.sonatype.org/content/groups/public/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + alfresco + Alfresco + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + https://maven.alfresco.com/nexus/content/repositories/public/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + codehaus + Codehaus + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://repository.codehaus.org/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + jboss.repository + Jboss Repository + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + https://repository.jboss.org/nexus/content/repositories/public/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + java.net-m1-m2 + java.net-M1 M2 shadow + org.sonatype.nexus.proxy.repository.ShadowRepository + m1-m2-shadow + IN_SERVICE + 15 + true + true + true + READ_ONLY + true + + file + + + java.net-m1 + false + + + + repo.spring.io.release + SpringSource Release Repository + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://repo.spring.io/release/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + BLOCKED_AUTO + + + + kantega + kantega + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://opensource.kantega.no/nexus/content/groups/public/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + + + + nightlabs + nightlabs + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://dev.nightlabs.org/maven-repository/repo/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + nuxeo + nuxeo + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + https://maven-us.nuxeo.org/nexus/content/groups/public/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + spy + Spy Repository + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://files.couchbase.com/maven2/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + thebuzzmedia + The Buzz Media Maven Repository + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://maven.thebuzzmedia.com/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + + + + muleforge-repo + MuleForge Repository + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://repository.muleforge.org/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + repo.maven.mule + Mule Repository + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://repo1.maven.org/maven/mule/dependencies/maven2/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + + + + yongtai + yongtai + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://repo.yongtai.com.cn/nexus/content/repositories/public/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + betaconceptframework + betaconceptframework + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://nexus.betaconceptframework.org/nexus/content/groups/public/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + camunda + camunda + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + https://app.camunda.com/nexus/content/groups/public/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + ibiblio + ibiblio + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://mirrors.ibiblio.org/maven/mule/dependencies/maven2/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + + + + squashtest + squashtest + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://repo.squashtest.org/maven2/releases/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + + + + jboss-thirdparty-releases + Jboss Thirdparty Releases Repository + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + + + + repo.spring.io.snapshot + SpringSource Snapshot Repository + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://repo.spring.io/snapshot/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + BLOCKED_AUTO + + + + oss.sourceforge-releases + Sourceforge Releases + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + https://oss.sonatype.org/content/repositories/sourceforge-releases/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + softeu + softeu + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://maven.in.softeu.cz/nexus/content/repositories/public/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + oschina.releases + Oschina Releases + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://maven.oschina.net/content/groups/public/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + + + + apache-repo + Apache Repository + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + https://repository.apache.org/content/groups/public/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + + + + cloudhopper + Repository for Cloudhopper + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://maven.cloudhopper.com/repos/third-party/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + + + + kaifazhe + kaifazhe + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + http://maven.kaifazhe.me/content/groups/public/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + + + + maven-db-plugin-repo + maven db plugin repository + org.sonatype.nexus.proxy.repository.Repository + maven2 + IN_SERVICE + true + 1440 + true + true + true + READ_ONLY + true + true + + file + + + https://maven-db-plugin.googlecode.com/svn/maven/repo/ + + + RELEASE + WARN + true + true + -1 + 1440 + 1440 + true + ALLOW + + + + + + + inhouse-stuff + * + inclusive + + ^/(com|org)/somecompany/.* + + + snapshots + releases + + + + apache-stuff + * + exclusive + + ^/org/some-oss/.* + + + releases + snapshots + + + + + + + 1 + All (Maven2) + maven2 + + .* + + + + 2 + All (Maven1) + maven1 + + .* + + + + 3 + All but sources (Maven2) + maven2 + + (?!.*-sources.*).* + + + + 4 + All Metadata (Maven2) + maven2 + + .*maven-metadata\.xml.* + + + + any + All (Any Repository) + any + + .* + + + + site + All (site) + site + + .* + + + + + + 126 + Health Check: repo.maven.mule + true + HealthCheckTask + WAITING + 1390827763379 + + hourly + 1390827763379 + + + + repoId + repo.maven.mule + + + .name + Health Check: repo.maven.mule + + + .id + 126 + + + + + 83 + Health Check: muleforge-repo + true + HealthCheckTask + WAITING + 1390835252618 + + hourly + 1390835252618 + + + + repoId + muleforge-repo + + + .name + Health Check: muleforge-repo + + + .id + 83 + + + + + 12 + Health Check: alfresco + true + HealthCheckTask + WAITING + 1390836796612 + + hourly + 1390836796612 + + + + repoId + alfresco + + + .name + Health Check: alfresco + + + .id + 12 + + + + + 115 + Health Check: oschina.releases + true + HealthCheckTask + WAITING + 1390834883946 + + hourly + 1390834883946 + + + + repoId + oschina.releases + + + .name + Health Check: oschina.releases + + + .id + 115 + + + + + 106 + Health Check: repo.spring.io.snapshot + true + HealthCheckTask + WAITING + 1390827592119 + + hourly + 1390827592119 + + + + repoId + repo.spring.io.snapshot + + + .name + Health Check: repo.spring.io.snapshot + + + .id + 106 + + + + + 15 + Health Check: google + true + HealthCheckTask + WAITING + 1390836900752 + + hourly + 1390836900752 + + + + repoId + google + + + .name + Health Check: google + + + .id + 15 + + + + + 73 + Health Check: kantega + true + HealthCheckTask + WAITING + 1390836964716 + + hourly + 1390836964716 + + + + repoId + kantega + + + .name + Health Check: kantega + + + .id + 73 + + + + + 134 + Health Check: maven-db-plugin-repo + true + HealthCheckTask + WAITING + 1390836977151 + + hourly + 1390836977151 + + + + repoId + maven-db-plugin-repo + + + .name + HealthCheckTask + + + + + 87 + Health Check: yongtai + true + HealthCheckTask + WAITING + 1390836038673 + + hourly + 1390836038673 + + + + repoId + yongtai + + + .name + Health Check: yongtai + + + .id + 87 + + + + + 102 + Health Check: jboss-thirdparty-releases + true + HealthCheckTask + WAITING + 1390827369711 + + hourly + 1390827369711 + + + + repoId + jboss-thirdparty-releases + + + .name + Health Check: jboss-thirdparty-releases + + + .id + 102 + + + + + 90 + Health Check: betaconceptframework + true + HealthCheckTask + WAITING + 1390836235193 + + hourly + 1390836235193 + + + + repoId + betaconceptframework + + + .name + Health Check: betaconceptframework + + + .id + 90 + + + + + 124 + Health Check: cloudhopper + true + HealthCheckTask + WAITING + 1390837116064 + + hourly + 1390837116064 + + + + repoId + cloudhopper + + + .name + Health Check: cloudhopper + + + .id + 124 + + + + + 125 + Health Check: repo.spring.io.release + true + HealthCheckTask + WAITING + 1390827568079 + + hourly + 1390827568079 + + + + repoId + repo.spring.io.release + + + .name + Health Check: repo.spring.io.release + + + .id + 125 + + + + + 16 + Health Check: java.net-m1 + true + HealthCheckTask + WAITING + 1390837227774 + + hourly + 1390837227774 + + + + repoId + java.net-m1 + + + .name + Health Check: java.net-m1 + + + .id + 16 + + + + + 19 + Health Check: sonatyperepository + true + HealthCheckTask + WAITING + 1390837351046 + + hourly + 1390837351046 + + + + repoId + sonatyperepository + + + .name + Health Check: sonatyperepository + + + .id + 19 + + + + + 18 + Health Check: jboss.repository + true + HealthCheckTask + WAITING + 1390837365364 + + hourly + 1390837365364 + + + + repoId + jboss.repository + + + .name + Health Check: jboss.repository + + + .id + 18 + + + + + 123 + Health Check: apache-repo + true + HealthCheckTask + WAITING + 1390837421683 + + hourly + 1390837421683 + + + + repoId + apache-repo + + + .name + Health Check: apache-repo + + + .id + 123 + + + + + 108 + Health Check: oss.sourceforge-releases + true + HealthCheckTask + WAITING + 1390833217928 + + hourly + 1390833217928 + + + + repoId + oss.sourceforge-releases + + + .name + Health Check: oss.sourceforge-releases + + + .id + 108 + + + + + 92 + Health Check: camunda + true + HealthCheckTask + WAITING + 1390837506345 + + hourly + 1390837506345 + + + + repoId + camunda + + + .name + Health Check: camunda + + + .id + 92 + + + + + 14 + Health Check: codehaus + true + HealthCheckTask + WAITING + 1390837566200 + + hourly + 1390837566200 + + + + repoId + codehaus + + + .name + Health Check: codehaus + + + .id + 14 + + + + + 132 + Health Check: kaifazhe + true + HealthCheckTask + WAITING + 1390830501007 + + hourly + 1390830501007 + + + + repoId + kaifazhe + + + .name + Health Check: kaifazhe + + + .id + 132 + + + + + 21 + Health Check: java.net-m2 + true + HealthCheckTask + WAITING + 1390837004335 + + hourly + 1390837004335 + + + + repoId + java.net-m2 + + + .name + Health Check: java.net-m2 + + + .id + 21 + + + + + 77 + Health Check: nightlabs + true + HealthCheckTask + WAITING + 1390837819924 + + hourly + 1390837819924 + + + + repoId + nightlabs + + + .name + Health Check: nightlabs + + + .id + 77 + + + + + 96 + Health Check: ibiblio + true + HealthCheckTask + WAITING + 1390837860158 + + hourly + 1390837860158 + + + + repoId + ibiblio + + + .name + Health Check: ibiblio + + + .id + 96 + + + + + 76 + Health Check: nuxeo + true + HealthCheckTask + WAITING + 1390838055641 + + hourly + 1390838055641 + + + + repoId + nuxeo + + + .name + Health Check: nuxeo + + + .id + 76 + + + + + 98 + Health Check: squashtest + true + HealthCheckTask + WAITING + 1390840093194 + + hourly + 1390840093194 + + + + repoId + squashtest + + + .name + Health Check: squashtest + + + .id + 98 + + + + + 110 + Health Check: softeu + true + HealthCheckTask + WAITING + 1390833723313 + + hourly + 1390833723313 + + + + repoId + softeu + + + .name + Health Check: softeu + + + .id + 110 + + + + + 81 + Health Check: thebuzzmedia + true + HealthCheckTask + WAITING + 1390840400815 + + hourly + 1390840400815 + + + + repoId + thebuzzmedia + + + .name + Health Check: thebuzzmedia + + + .id + 81 + + + + + 79 + Health Check: spy + true + HealthCheckTask + WAITING + 1390836987291 + + hourly + 1390836987291 + + + + repoId + spy + + + .name + Health Check: spy + + + .id + 79 + + + + + 13 + Health Check: central + true + HealthCheckTask + WAITING + 1390841502664 + + hourly + 1390841502664 + + + + repoId + central + + + .name + Health Check: central + + + .id + 13 + + + + + + smtp-host + 25 + smtp-username + {AI7C9STZ96QHpf5CuoPuG4U5Kd8RaQH3BZvoyCtNoUo=} + system@nexus.org + + + https://issues.sonatype.org + PR + + + diff --git a/pom.xml b/pom.xml index 2443f9f..5bb09a7 100644 --- a/pom.xml +++ b/pom.xml @@ -24,6 +24,8 @@ resteasy-ws-example cxf-soap-ws cxf-rest-ws + flex-todolist-example + spring-flex-testdrive diff --git a/settings.xml b/settings.xml new file mode 100644 index 0000000..7732f67 --- /dev/null +++ b/settings.xml @@ -0,0 +1,402 @@ + + + + + + + D:/developer/.m2/repository + + + + + + + + + + + + + + + + + + + + + + + + + nexus-releases + admin + sysadmin + + + + nexus-snapshots + admin + sysadmin + + + + + + + + + + + + + + + + + + + + + + + + + + + nexus + + + nexus + Nexus + http://localhost:8081/nexus/content/groups/public/ + + true + + + false + + + + + + nexus + Nexus + http://localhost:8081/nexus/content/groups/public/ + + true + + + false + + + + + + + + nexus-osc + + + nexus + local private nexus + http://maven.oschina.net/content/groups/public/ + + true + + + false + + + + + + nexus + local private nexus + http://maven.oschina.net/content/groups/public/ + + true + + + false + + + + + + + + central + + + central + http://central + + true + + + false + + + + + + central + http://central + + true + + + false + + + + + + + + + + + + nexus-osc + + + + \ No newline at end of file diff --git a/spring-flex-testdrive/README.md b/spring-flex-testdrive/README.md new file mode 100644 index 0000000..ebca730 --- /dev/null +++ b/spring-flex-testdrive/README.md @@ -0,0 +1,4 @@ +# spring-flex-testdrive + + +[http://www.adobe.com/devnet/flex/articles/spring_blazeds_testdrive.html](http://www.adobe.com/devnet/flex/articles/spring_blazeds_testdrive.html) \ No newline at end of file diff --git a/spring-flex-testdrive/pom.xml b/spring-flex-testdrive/pom.xml new file mode 100644 index 0000000..0adc8ff --- /dev/null +++ b/spring-flex-testdrive/pom.xml @@ -0,0 +1,10 @@ + + 4.0.0 + + net.aimeizi + maven-framework-project + 1.0.0 + + spring-flex-testdrive + pom + \ No newline at end of file diff --git a/spring-flex-testdrive/spring-flex-testdrive-1.0.3-v1.zip b/spring-flex-testdrive/spring-flex-testdrive-1.0.3-v1.zip new file mode 100644 index 0000000..9fde043 Binary files /dev/null and b/spring-flex-testdrive/spring-flex-testdrive-1.0.3-v1.zip differ diff --git a/spring3-rest-example/src/main/java/net/aimeizi/spring/rest/example/customer/Customer.java b/spring3-rest-example/src/main/java/net/aimeizi/spring/rest/example/customer/Customer.java index fce9674..278cb70 100644 --- a/spring3-rest-example/src/main/java/net/aimeizi/spring/rest/example/customer/Customer.java +++ b/spring3-rest-example/src/main/java/net/aimeizi/spring/rest/example/customer/Customer.java @@ -32,7 +32,37 @@ public class Customer { } - public String getName() { + public CustomerNumber getNumber() { + return number; + } + + + public void setNumber(CustomerNumber number) { + this.number = number; + } + + + public String getFirstname() { + return firstname; + } + + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + + public String getLastname() { + return lastname; + } + + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + + public String getName() { return String.format("%s %s", firstname, lastname); } diff --git a/spring3-rest-example/src/main/java/net/aimeizi/spring/rest/example/customer/CustomerNumber.java b/spring3-rest-example/src/main/java/net/aimeizi/spring/rest/example/customer/CustomerNumber.java index dc3d917..877df28 100644 --- a/spring3-rest-example/src/main/java/net/aimeizi/spring/rest/example/customer/CustomerNumber.java +++ b/spring3-rest-example/src/main/java/net/aimeizi/spring/rest/example/customer/CustomerNumber.java @@ -18,7 +18,12 @@ import net.aimeizi.spring.rest.example.customer.internal.CustomerNumberTypeAdapt @XmlJavaTypeAdapter(CustomerNumberTypeAdapter.class) public class CustomerNumber { - private final String number; + public String getNumber() { + return number; + } + + + private final String number; @Override @@ -37,4 +42,10 @@ public class CustomerNumber { return new CustomerNumber(UUID.randomUUID().toString()); } + + + public CustomerNumber(String number) { + super(); + this.number = number; + } }