Skip to content

Commit

Permalink
Merge branch 'development' of git://github.com/dnalot/robotlegs-demos…
Browse files Browse the repository at this point in the history
…-Bundle into development
  • Loading branch information
darscan committed Jan 21, 2010
2 parents b9dfeb3 + efba110 commit e1a7053
Show file tree
Hide file tree
Showing 47 changed files with 1,736 additions and 0 deletions.
46 changes: 46 additions & 0 deletions CafeTownsend/.actionScriptProperties
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties mainApplicationPath="CafeTownsend.mxml" projectUUID="9f052255-e597-4732-8123-e2528c3ab1ea" version="6">
<compiler additionalCompilerArguments="-locale en_US -keep-as3-metadata+=&quot;Inject,PostConstruct&quot;" autoRSLOrdering="false" copyDependentFiles="true" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
<compilerSourcePath>
<compilerSourcePathEntry kind="1" linkType="1" path="locale/{locale}"/>
<compilerSourcePathEntry kind="1" linkType="1" path="build"/>
</compilerSourcePath>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
<excludedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
</excludedEntries>
</libraryPathEntry>
<libraryPathEntry kind="3" linkType="1" path="/robotlegs-framework/bin/robotlegs-framework.swc" useDefaultLinkType="false"/>
</libraryPath>
<sourceAttachmentPath/>
</compiler>
<applications>
<application path="CafeTownsend.mxml"/>
</applications>
<modules/>
<buildCSSFiles/>
<publishSource>
<sourcePathIncludes>
<include path="build"/>
</sourcePathIncludes>
<sourceExcludes>
<exclude path="html-template"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/detail/controller"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/detail/service"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/detail/view/components/assets"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/detail/view/components/events"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/list/controller"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/list/model/vo"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/list/service/dto"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/list/view/components/assets"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/list/view/components/events"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/main/controller"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/main/service/dto"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/main/view/components/events"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/user/service/dto"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/user/view/components/assets"/>
<exclude path="src/org/robotlegs/demos/cafetownsend/user/view/components/events"/>
</sourceExcludes>
</publishSource>
</actionScriptProperties>
2 changes: 2 additions & 0 deletions CafeTownsend/.flexProperties
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
8 changes: 8 additions & 0 deletions CafeTownsend/.gitignore
@@ -0,0 +1,8 @@
.svn/
bin/
bin-debug/
html-template/
libs/
.DS_Store
.settings
bin-release
18 changes: 18 additions & 0 deletions CafeTownsend/.project
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>CafeTownsend_Robotlegs</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.adobe.flexbuilder.project.flexbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.adobe.flexbuilder.project.flexnature</nature>
<nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
</natures>
</projectDescription>
Binary file added CafeTownsend/build/assets/header.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions CafeTownsend/build/data/Employees.xml
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<employees>
<employee>
<emp_id>1</emp_id>
<firstname>Shaun</firstname>
<lastname>Smith</lastname>
<email>darscan@cafetownsend.com</email>
<startdate>04/17/2009</startdate>
</employee>
<employee>
<emp_id>2</emp_id>
<firstname>Joel</firstname>
<lastname>Hooks</lastname>
<email>jhooks@cafetownsend.com</email>
<startdate>07/15/2009</startdate>
</employee>
<employee>
<emp_id>3</emp_id>
<firstname>Robert</firstname>
<lastname>Penner</lastname>
<email>robpenner@cafetownsend.com</email>
<startdate>09/24/2009</startdate>
</employee>
<employee>
<emp_id>4</emp_id>
<firstname>Till</firstname>
<lastname>Schneidereit</lastname>
<email>tschneidereit@cafetownsend.com</email>
<startdate>10/01/2009</startdate>
</employee>
<employee>
<emp_id>5</emp_id>
<firstname>Stray</firstname>
<lastname>x</lastname>
<email>stray_and_ruby@cafetownsend.com</email>
<startdate>10/20/2009</startdate>
</employee>
</employees>
101 changes: 101 additions & 0 deletions CafeTownsend/collateral/hierarchy.rtf
@@ -0,0 +1,101 @@
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf250
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid1\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid2\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid3\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid4\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid5\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid6\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li4320\lin4320 }{\listname ;}\listid1}}
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\f0\b\fs24 \cf0 Project Folder Structure\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls1\ilvl0
\b0 \cf0 {\listtext \uc0\u8259 }asdoc\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls1\ilvl1\cf0 {\listtext \uc0\u8259 }[ASDoc]\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls1\ilvl0\cf0 {\listtext \uc0\u8259 }collateral\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls1\ilvl1\cf0 {\listtext \uc0\u8259 }[project management resources]\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls1\ilvl0\cf0 {\listtext \uc0\u8259 }libs\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls1\ilvl1\cf0 {\listtext \uc0\u8259 }[SWC dependencies]\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls1\ilvl0\cf0 {\listtext \uc0\u8259 }locale\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls1\ilvl1\cf0 {\listtext \uc0\u8259 }en_US\
\pard\tx1660\tx2160\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2160\fi-2160\ql\qnatural\pardirnatural
\ls1\ilvl2\cf0 {\listtext \uc0\u8259 }[system constants]\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls1\ilvl1\cf0 {\listtext \uc0\u8259 }\{locale\}\
\pard\tx1660\tx2160\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2160\fi-2160\ql\qnatural\pardirnatural
\ls1\ilvl2\cf0 {\listtext \uc0\u8259 }[component constants]\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls1\ilvl0\cf0 {\listtext \uc0\u8259 }build\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls1\ilvl1\cf0 {\listtext \uc0\u8259 }assets\
\pard\tx1660\tx2160\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2160\fi-2160\ql\qnatural\pardirnatural
\ls1\ilvl2\cf0 {\listtext \uc0\u8259 }[deployed component resources]\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls1\ilvl1\cf0 {\listtext \uc0\u8259 }data\
\pard\tx1660\tx2160\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2160\fi-2160\ql\qnatural\pardirnatural
\ls1\ilvl2\cf0 {\listtext \uc0\u8259 }[mock service data]\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls1\ilvl1\cf0 {\listtext \uc0\u8259 }[build resources]\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls1\ilvl0\cf0 {\listtext \uc0\u8259 }src\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls1\ilvl1\cf0 {\listtext \uc0\u8259 }\{domain\}.\{project\}.\{case\}\
\pard\tx1660\tx2160\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2160\fi-2160\ql\qnatural\pardirnatural
\ls1\ilvl2\cf0 {\listtext \uc0\u8259 }controller\
\pard\tx2380\tx2880\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2880\fi-2880\ql\qnatural\pardirnatural
\ls1\ilvl3\cf0 {\listtext \uc0\u8259 }[commands]\
\pard\tx1660\tx2160\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2160\fi-2160\ql\qnatural\pardirnatural
\ls1\ilvl2\cf0 {\listtext \uc0\u8259 }model\
\pard\tx2380\tx2880\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2880\fi-2880\ql\qnatural\pardirnatural
\ls1\ilvl3\cf0 {\listtext \uc0\u8259 }events\
\pard\tx3100\tx3600\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li3600\fi-3600\ql\qnatural\pardirnatural
\ls1\ilvl4\cf0 {\listtext \uc0\u8259 }[system communication]\
\pard\tx2380\tx2880\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2880\fi-2880\ql\qnatural\pardirnatural
\ls1\ilvl3\cf0 {\listtext \uc0\u8259 }vo\
\pard\tx3100\tx3600\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li3600\fi-3600\ql\qnatural\pardirnatural
\ls1\ilvl4\cf0 {\listtext \uc0\u8259 }[client domain]\
\pard\tx2380\tx2880\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2880\fi-2880\ql\qnatural\pardirnatural
\ls1\ilvl3\cf0 {\listtext \uc0\u8259 }[proxies]\
\pard\tx1660\tx2160\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2160\fi-2160\ql\qnatural\pardirnatural
\ls1\ilvl2\cf0 {\listtext \uc0\u8259 }service\
\pard\tx2380\tx2880\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2880\fi-2880\ql\qnatural\pardirnatural
\ls1\ilvl3\cf0 {\listtext \uc0\u8259 }dto\
\pard\tx3100\tx3600\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li3600\fi-3600\ql\qnatural\pardirnatural
\ls1\ilvl4\cf0 {\listtext \uc0\u8259 }[server domain]\
\pard\tx2380\tx2880\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2880\fi-2880\ql\qnatural\pardirnatural
\ls1\ilvl3\cf0 {\listtext \uc0\u8259 }interfaces\
\pard\tx3100\tx3600\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li3600\fi-3600\ql\qnatural\pardirnatural
\ls1\ilvl4\cf0 {\listtext \uc0\u8259 }[delegate APIs]\
\pard\tx2380\tx2880\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2880\fi-2880\ql\qnatural\pardirnatural
\ls1\ilvl3\cf0 {\listtext \uc0\u8259 }[delegate implementations]\
\pard\tx1660\tx2160\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2160\fi-2160\ql\qnatural\pardirnatural
\ls1\ilvl2\cf0 {\listtext \uc0\u8259 }view\
\pard\tx2380\tx2880\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2880\fi-2880\ql\qnatural\pardirnatural
\ls1\ilvl3\cf0 {\listtext \uc0\u8259 }components\
\pard\tx3100\tx3600\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li3600\fi-3600\ql\qnatural\pardirnatural
\ls1\ilvl4\cf0 {\listtext \uc0\u8259 }assets\
\pard\tx3820\tx4320\tx4480\tx5040\tx5600\tx6160\tx6720\li4320\fi-4320\ql\qnatural\pardirnatural
\ls1\ilvl5\cf0 {\listtext \uc0\u8259 }[embedded component resources]\
\pard\tx3100\tx3600\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li3600\fi-3600\ql\qnatural\pardirnatural
\ls1\ilvl4\cf0 {\listtext \uc0\u8259 }events\
\pard\tx3820\tx4320\tx4480\tx5040\tx5600\tx6160\tx6720\li4320\fi-4320\ql\qnatural\pardirnatural
\ls1\ilvl5\cf0 {\listtext \uc0\u8259 }[component communication]\
\pard\tx3100\tx3600\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li3600\fi-3600\ql\qnatural\pardirnatural
\ls1\ilvl4\cf0 {\listtext \uc0\u8259 }interfaces\
\pard\tx3820\tx4320\tx4480\tx5040\tx5600\tx6160\tx6720\li4320\fi-4320\ql\qnatural\pardirnatural
\ls1\ilvl5\cf0 {\listtext \uc0\u8259 }[component APIs]\
\pard\tx3100\tx3600\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li3600\fi-3600\ql\qnatural\pardirnatural
\ls1\ilvl4\cf0 {\listtext \uc0\u8259 }[component implementations]\
\pard\tx2380\tx2880\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2880\fi-2880\ql\qnatural\pardirnatural
\ls1\ilvl3\cf0 {\listtext \uc0\u8259 }[mediators]\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls1\ilvl0\cf0 {\listtext \uc0\u8259 }test\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls1\ilvl1\cf0 {\listtext \uc0\u8259 }[unit tests]\
}
11 changes: 11 additions & 0 deletions CafeTownsend/locale/en_US/EmployeeDetail.properties
@@ -0,0 +1,11 @@
# EmployeeDetail.properties
title=Employee Details
abortButtonLabel=<< Back
commitButtonLabel=Submit
removeButtonLabel=Delete
firstNameLabel=First Name:
lastNameLabel=Last Name:
emailLabel=Email:
startDateLabel=Start Date:
confirmRemoveText=Are you sure you want to delete the following employee?
confirmRemoveTitle=Confirm Delete Employee #{id}
5 changes: 5 additions & 0 deletions CafeTownsend/locale/en_US/EmployeeList.properties
@@ -0,0 +1,5 @@
# EmployeeList.properties
title=Employee List
logoutButtonLabel=Logout
addButtonLabel=Add New Employee
itemLabelFormat={lastName}, {firstName}
3 changes: 3 additions & 0 deletions CafeTownsend/locale/en_US/EmployeeListService.properties
@@ -0,0 +1,3 @@
# EmployeeListService.properties
location=data/Employees.xml
loadFailureTitle=Loading Employees Failed
5 changes: 5 additions & 0 deletions CafeTownsend/locale/en_US/EmployeeLogin.properties
@@ -0,0 +1,5 @@
# EmployeeLogin.properties
title=Employee Login
buttonLabel=Login
usernameLabel=Username:
passwordLabel=Password:
2 changes: 2 additions & 0 deletions CafeTownsend/locale/en_US/Main.properties
@@ -0,0 +1,2 @@
# Main.properties
headerImageURL=assets/header.jpg
6 changes: 6 additions & 0 deletions CafeTownsend/locale/en_US/MockEmployeeLoginService.properties
@@ -0,0 +1,6 @@
# MockEmployeeLoginService.properties
username=Flex
password=Robotlegs
hint=Username: {username} Password: {password}
userFailureText=We couldn't validate your username & password. Please try again.
userFailureTitle=Login Failed
14 changes: 14 additions & 0 deletions CafeTownsend/src/CafeTownsend.mxml
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--- @author Jonathan Toland -->
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:cafetownsend="org.robotlegs.demos.cafetownsend.*"
xmlns:components="org.robotlegs.demos.cafetownsend.main.view.components.*"
backgroundColor="black"
layout="vertical"
viewSourceURL="srcview/index.html"
>
<mx:Style source="org/robotlegs/demos/cafetownsend/main/view/components/assets/application.css"/>
<cafetownsend:ApplicationContext contextView="{this}"/>
<components:Main width="700"/>
</mx:Application>
@@ -0,0 +1,85 @@
package org.robotlegs.demos.cafetownsend
{
import mx.resources.IResourceManager;
import mx.resources.ResourceManager;
import mx.rpc.http.HTTPService;
import mx.validators.EmailValidator;
import mx.validators.StringValidator;
import mx.validators.Validator;

import org.robotlegs.demos.cafetownsend.detail.model.EmployeeDetailModel;
import org.robotlegs.demos.cafetownsend.detail.view.EmployeeDetailMediator;
import org.robotlegs.demos.cafetownsend.detail.view.components.EmployeeDetail;
import org.robotlegs.demos.cafetownsend.detail.view.components.interfaces.IEmployeeDetail;
import org.robotlegs.demos.cafetownsend.list.model.EmployeeListModel;
import org.robotlegs.demos.cafetownsend.list.service.EmployeeListService;
import org.robotlegs.demos.cafetownsend.list.service.interfaces.IEmployeeListService;
import org.robotlegs.demos.cafetownsend.list.view.EmployeeListMediator;
import org.robotlegs.demos.cafetownsend.list.view.components.EmployeeList;
import org.robotlegs.demos.cafetownsend.list.view.components.interfaces.IEmployeeList;
import org.robotlegs.demos.cafetownsend.main.service.ResourceManagerService;
import org.robotlegs.demos.cafetownsend.main.service.interfaces.IResourceManagerService;
import org.robotlegs.demos.cafetownsend.main.view.MainMediator;
import org.robotlegs.demos.cafetownsend.main.view.components.Main;
import org.robotlegs.demos.cafetownsend.main.view.components.interfaces.IMain;
import org.robotlegs.demos.cafetownsend.user.controller.UserCommand;
import org.robotlegs.demos.cafetownsend.user.model.EmployeeLoginModel;
import org.robotlegs.demos.cafetownsend.user.model.events.EmployeeLoginEvent;
import org.robotlegs.demos.cafetownsend.user.service.MockEmployeeLoginService;
import org.robotlegs.demos.cafetownsend.user.service.interfaces.IEmployeeLoginService;
import org.robotlegs.demos.cafetownsend.user.view.EmployeeLoginMediator;
import org.robotlegs.demos.cafetownsend.user.view.components.EmployeeLogin;
import org.robotlegs.demos.cafetownsend.user.view.components.interfaces.IEmployeeLogin;
import org.robotlegs.mvcs.Context;

/** @author Jonathan Toland */
public class ApplicationContext extends Context
{

override public function startup():void
{
mapMembership();
mapModel();
mapService();
mapView();
mapController();
super.startup();
}

private function mapMembership():void
{
injector.mapValue(IResourceManager, ResourceManager.getInstance());
injector.mapClass(HTTPService, HTTPService);
injector.mapClass(Validator, StringValidator);
injector.mapClass(Validator, EmailValidator, 'Email');
}

private function mapModel():void
{
injector.mapSingleton(EmployeeLoginModel);
injector.mapSingleton(EmployeeListModel);
injector.mapSingleton(EmployeeDetailModel);
}

private function mapService():void
{
injector.mapSingletonOf(IResourceManagerService, ResourceManagerService);
injector.mapSingletonOf(IEmployeeLoginService, MockEmployeeLoginService);
injector.mapSingletonOf(IEmployeeListService, EmployeeListService);
}

private function mapView():void
{
mediatorMap.mapView(Main, MainMediator, IMain);
mediatorMap.mapView(EmployeeLogin, EmployeeLoginMediator, IEmployeeLogin);
mediatorMap.mapView(EmployeeList, EmployeeListMediator, IEmployeeList);
mediatorMap.mapView(EmployeeDetail, EmployeeDetailMediator, IEmployeeDetail);
}

private function mapController():void
{
commandMap.mapEvent(EmployeeLoginEvent.USER, UserCommand, EmployeeLoginEvent);
}

}
}

0 comments on commit e1a7053

Please sign in to comment.