From 5ededf0d64c4b7994fb51db05c3e59ccbf905753 Mon Sep 17 00:00:00 2001 From: Benjamin Culkin Date: Wed, 17 Jan 2024 20:12:21 -0500 Subject: Initial commit --- .classpath | 19 ++ .project | 23 +++ .settings/org.eclipse.core.resources.prefs | 2 + Components/Main.api | 5 + Components/Main.wo/Main.html | 9 + Components/Main.wo/Main.wod | 0 Components/Main.wo/Main.woo | 4 + Resources/Properties | 68 +++++++ Sources/com/ashardalon/pagic/Application.java | 24 +++ Sources/com/ashardalon/pagic/DirectAction.java | 19 ++ Sources/com/ashardalon/pagic/Session.java | 10 + Sources/com/ashardalon/pagic/components/Main.java | 11 + .../pagic/rest/controllers/BaseRestController.java | 43 ++++ .../pagic/rest/controllers/PagesController.java | 28 +++ build.xml | 223 +++++++++++++++++++++ build/.version | 1 + build/Pagic.woa/Contents/Info.plist | 37 ++++ build/Pagic.woa/Contents/Resources/Main.api | 5 + .../Pagic.woa/Contents/Resources/Main.wo/Main.html | 9 + .../Pagic.woa/Contents/Resources/Main.wo/Main.wod | 0 .../Pagic.woa/Contents/Resources/Main.wo/Main.woo | 4 + build/Pagic.woa/Contents/Resources/Properties | 68 +++++++ woproject/classes.exclude.patternset | 1 + woproject/classes.include.patternset | 2 + woproject/resources.exclude.patternset | 3 + woproject/resources.include.patternset | 3 + woproject/wsresources.exclude.patternset | 3 + woproject/wsresources.include.patternset | 1 + 28 files changed, 625 insertions(+) create mode 100644 .classpath create mode 100644 .project create mode 100644 .settings/org.eclipse.core.resources.prefs create mode 100644 Components/Main.api create mode 100644 Components/Main.wo/Main.html create mode 100644 Components/Main.wo/Main.wod create mode 100644 Components/Main.wo/Main.woo create mode 100644 Resources/Properties create mode 100644 Sources/com/ashardalon/pagic/Application.java create mode 100644 Sources/com/ashardalon/pagic/DirectAction.java create mode 100644 Sources/com/ashardalon/pagic/Session.java create mode 100644 Sources/com/ashardalon/pagic/components/Main.java create mode 100644 Sources/com/ashardalon/pagic/rest/controllers/BaseRestController.java create mode 100644 Sources/com/ashardalon/pagic/rest/controllers/PagesController.java create mode 100644 build.xml create mode 100644 build/.version create mode 100644 build/Pagic.woa/Contents/Info.plist create mode 100644 build/Pagic.woa/Contents/Resources/Main.api create mode 100644 build/Pagic.woa/Contents/Resources/Main.wo/Main.html create mode 100644 build/Pagic.woa/Contents/Resources/Main.wo/Main.wod create mode 100644 build/Pagic.woa/Contents/Resources/Main.wo/Main.woo create mode 100644 build/Pagic.woa/Contents/Resources/Properties create mode 100644 woproject/classes.exclude.patternset create mode 100644 woproject/classes.include.patternset create mode 100644 woproject/resources.exclude.patternset create mode 100644 woproject/resources.include.patternset create mode 100644 woproject/wsresources.exclude.patternset create mode 100644 woproject/wsresources.include.patternset diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..4e4b2d8 --- /dev/null +++ b/.classpath @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..13dbb6e --- /dev/null +++ b/.project @@ -0,0 +1,23 @@ + + + Pagic + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.objectstyle.wolips.incrementalbuilder + + + + + + org.eclipse.jdt.core.javanature + org.objectstyle.wolips.incrementalapplicationnature + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/Components/Main.api b/Components/Main.api new file mode 100644 index 0000000..12535ad --- /dev/null +++ b/Components/Main.api @@ -0,0 +1,5 @@ + + + + + diff --git a/Components/Main.wo/Main.html b/Components/Main.wo/Main.html new file mode 100644 index 0000000..7f43a90 --- /dev/null +++ b/Components/Main.wo/Main.html @@ -0,0 +1,9 @@ + + + + Untitled + + +Hello World + + diff --git a/Components/Main.wo/Main.wod b/Components/Main.wo/Main.wod new file mode 100644 index 0000000..e69de29 diff --git a/Components/Main.wo/Main.woo b/Components/Main.wo/Main.woo new file mode 100644 index 0000000..1f6e847 --- /dev/null +++ b/Components/Main.wo/Main.woo @@ -0,0 +1,4 @@ +{ + "WebObjects Release" = "WebObjects 5.0"; + encoding = "UTF-8"; +} \ No newline at end of file diff --git a/Resources/Properties b/Resources/Properties new file mode 100644 index 0000000..7fac881 --- /dev/null +++ b/Resources/Properties @@ -0,0 +1,68 @@ +# OGNL +ognl.helperFunctions=true +ognl.inlineBindings=true + +# Misc +er.extensions.stackTrace.cleanup=true + +# EOF +er.extensions.ERXEC.safeLocking=true +er.extensions.ERXEC.useSharedEditingContext=false +er.extensions.ERXEnterpriseObject.applyRestrictingQualifierOnInsert=true +er.extensions.ERXEnterpriseObject.updateInverseRelationships=true +#dbConnectURLGLOBAL= +#dbConnectUserGLOBAL= +#dbConnectPasswordGLOBAL= + +# Migrations +#er.migration.migrateAtStartup=true +#er.migration.createTablesIfNecessary=true +#er.migration.modelNames=YourModel + +# Misc Components +#er.extensions.ERXWOForm.multipleSubmitDefault=true +#er.extensions.ERXWORepetition.checkHashCodes=true +#er.extensions.ERXWORepetition.raiseOnUnmatchedObject=true +#er.extensions.ERXWORepetition.eoSupport=true +#er.component.clickToOpen=true +#wolips.password=wo + +# ERJavaMail +er.javamail.centralize=true +er.javamail.adminEmail=admin@yourhost.com +er.javamail.debugEnabled=false +er.javamail.smtpHost=your.smtpserver.com +er.javamail.smtpAuth=false +er.javamail.smtpUser= +er.javamail.smtpPassword= + +# Log4j Configuration +log4j.loggerFactory=er.extensions.logging.ERXLogger$Factory +log4j.rootCategory=INFO,A1 +log4j.appender.A1=er.extensions.logging.ERXConsoleAppender +log4j.appender.A1.layout=er.extensions.logging.ERXPatternLayout +log4j.appender.A1.layout.ConversionPattern=%d{MMM dd HH:mm:ss} %$[%#] %-5p %c %x - %m%n + +# Log4j Categories +# Here are a few log4j sub-categories that are interesting. +# Don't forget that in developement mode this file will get reloaded +# everytime it changes, so if you say want to turn adaptor debugging +# on in the middle of the app simply set the below category to debug. +# Very handy. +# Base Category +log4j.logger.er=INFO + +# ERExtensions +# Transaction - Switching this to debug will start the sql ouputting. +log4j.logger.er.transaction.adaptor.EOAdaptorDebugEnabled=DEBUG + +# Fixes - Turning this on will show all the models that are loaded +log4j.logger.er.extensions.fixes.ERSharedEOLoader=INFO + +er.extensions.ERXNSLogLog4jBridge=INFO +#log4j.logger.er.eo.ERXGenericRecord=DEBUG +#log4j.logger.er.validation.ERXEntityClassDescription=DEBUG +#log4j.logger.er.default.ERXEntityClassDescription=DEBUG +log4j.logger.er.extensions.ERXDatabaseContextDelegate=WARN +log4j.logger.er.extensions.ERXConfigurationManager=INFO +#log4j.logger.er.extensions.ERXApplication.RequestHandling=DEBUG diff --git a/Sources/com/ashardalon/pagic/Application.java b/Sources/com/ashardalon/pagic/Application.java new file mode 100644 index 0000000..374d2dd --- /dev/null +++ b/Sources/com/ashardalon/pagic/Application.java @@ -0,0 +1,24 @@ +package com.ashardalon.pagic; + +import er.extensions.appserver.ERXApplication; +import er.rest.routes.ERXRoute; +import er.rest.routes.ERXRouteRequestHandler; +import com.ashardalon.pagic.components.Main; +import com.ashardalon.pagic.rest.controllers.PagesController; + +public class Application extends ERXApplication { + public static void main(String[] argv) { + ERXApplication.main(argv, Application.class); + } + + public Application() { + ERXApplication.log.info("Welcome to " + name() + " !"); + /* ** put your initialization code in here ** */ + setAllowsConcurrentRequestHandling(true); + + ERXRouteRequestHandler restRequestHandler = new ERXRouteRequestHandler(); + restRequestHandler.insertRoute(new ERXRoute("Pages", "", ERXRoute.Method.Get, PagesController.class, "mainPage")); + ERXRouteRequestHandler.register(restRequestHandler); + setDefaultRequestHandler(restRequestHandler); + } +} \ No newline at end of file diff --git a/Sources/com/ashardalon/pagic/DirectAction.java b/Sources/com/ashardalon/pagic/DirectAction.java new file mode 100644 index 0000000..616afcb --- /dev/null +++ b/Sources/com/ashardalon/pagic/DirectAction.java @@ -0,0 +1,19 @@ +package com.ashardalon.pagic; + +import com.webobjects.appserver.WOActionResults; +import com.webobjects.appserver.WORequest; + +import er.extensions.appserver.ERXDirectAction; + +import com.ashardalon.pagic.components.Main; + +public class DirectAction extends ERXDirectAction { + public DirectAction(WORequest request) { + super(request); + } + + @Override + public WOActionResults defaultAction() { + return pageWithName(Main.class.getName()); + } +} diff --git a/Sources/com/ashardalon/pagic/Session.java b/Sources/com/ashardalon/pagic/Session.java new file mode 100644 index 0000000..c4ebc04 --- /dev/null +++ b/Sources/com/ashardalon/pagic/Session.java @@ -0,0 +1,10 @@ +package com.ashardalon.pagic; + +import er.extensions.appserver.ERXSession; + +public class Session extends ERXSession { + private static final long serialVersionUID = 1L; + + public Session() { + } +} diff --git a/Sources/com/ashardalon/pagic/components/Main.java b/Sources/com/ashardalon/pagic/components/Main.java new file mode 100644 index 0000000..f64be1d --- /dev/null +++ b/Sources/com/ashardalon/pagic/components/Main.java @@ -0,0 +1,11 @@ +package com.ashardalon.pagic.components; + +import com.webobjects.appserver.WOContext; + +import er.extensions.components.ERXComponent; + +public class Main extends ERXComponent { + public Main(WOContext context) { + super(context); + } +} diff --git a/Sources/com/ashardalon/pagic/rest/controllers/BaseRestController.java b/Sources/com/ashardalon/pagic/rest/controllers/BaseRestController.java new file mode 100644 index 0000000..a69d784 --- /dev/null +++ b/Sources/com/ashardalon/pagic/rest/controllers/BaseRestController.java @@ -0,0 +1,43 @@ +package com.ashardalon.pagic.rest.controllers; + +import com.webobjects.appserver.WOActionResults; +import com.webobjects.appserver.WORequest; + +import er.extensions.appserver.ERXHttpStatusCodes; +import er.rest.routes.ERXDefaultRouteController; + +public class BaseRestController extends ERXDefaultRouteController { + + public BaseRestController(WORequest request) { + super(request); + } + + public WOActionResults updateAction() throws Throwable { + return errorResponse(ERXHttpStatusCodes.METHOD_NOT_ALLOWED); + } + + public WOActionResults createAction() throws Throwable { + return errorResponse(ERXHttpStatusCodes.METHOD_NOT_ALLOWED); + } + + @Override + public WOActionResults newAction() throws Throwable { + return errorResponse(ERXHttpStatusCodes.METHOD_NOT_ALLOWED); + } + + @Override + public WOActionResults destroyAction() throws Throwable { + return errorResponse(ERXHttpStatusCodes.METHOD_NOT_ALLOWED); + } + + @Override + public WOActionResults showAction() throws Throwable { + return errorResponse(ERXHttpStatusCodes.METHOD_NOT_ALLOWED); + } + + @Override + public WOActionResults indexAction() throws Throwable { + return errorResponse(ERXHttpStatusCodes.METHOD_NOT_ALLOWED); + } + +} diff --git a/Sources/com/ashardalon/pagic/rest/controllers/PagesController.java b/Sources/com/ashardalon/pagic/rest/controllers/PagesController.java new file mode 100644 index 0000000..29ccc5f --- /dev/null +++ b/Sources/com/ashardalon/pagic/rest/controllers/PagesController.java @@ -0,0 +1,28 @@ +package com.ashardalon.pagic.rest.controllers; + +import com.ashardalon.pagic.components.Main; + +import com.webobjects.appserver.WOActionResults; +import com.webobjects.appserver.WORequest; + +import er.rest.format.ERXRestFormat; + +/** + * This controller is for content that is not EO entities driven, e.g. "static pages" +*/ +public class PagesController extends BaseRestController { + + public PagesController(WORequest request) { + super(request); + } + + public WOActionResults mainPageAction() { + return pageWithName(Main.class); + } + + @Override + protected ERXRestFormat defaultFormat() { + return ERXRestFormat.html(); + } + +} diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..c6bc97a --- /dev/null +++ b/build.xml @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/.version b/build/.version new file mode 100644 index 0000000..a8a927b --- /dev/null +++ b/build/.version @@ -0,0 +1 @@ +1705539646371 \ No newline at end of file diff --git a/build/Pagic.woa/Contents/Info.plist b/build/Pagic.woa/Contents/Info.plist new file mode 100644 index 0000000..d3e8801 --- /dev/null +++ b/build/Pagic.woa/Contents/Info.plist @@ -0,0 +1,37 @@ + + + + NOTE + autogenerated + CFBundleDevelopmentRegion + English + CFBundleExecutable + Pagic + CFBundleIconFile + WOAfile.icns + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + webo + CFBundleShortVersionString + 0.0 + CFBundleVersion + + NSExecutable + Pagic + NSJavaNeeded + + NSJavaPath + + Pagic.jar + + NSJavaPathClient + $basename.jar + NSJavaRoot + Contents/Resources/Java + NSJavaRootClient + Contents/WebServerResources/Java + + \ No newline at end of file diff --git a/build/Pagic.woa/Contents/Resources/Main.api b/build/Pagic.woa/Contents/Resources/Main.api new file mode 100644 index 0000000..12535ad --- /dev/null +++ b/build/Pagic.woa/Contents/Resources/Main.api @@ -0,0 +1,5 @@ + + + + + diff --git a/build/Pagic.woa/Contents/Resources/Main.wo/Main.html b/build/Pagic.woa/Contents/Resources/Main.wo/Main.html new file mode 100644 index 0000000..7f43a90 --- /dev/null +++ b/build/Pagic.woa/Contents/Resources/Main.wo/Main.html @@ -0,0 +1,9 @@ + + + + Untitled + + +Hello World + + diff --git a/build/Pagic.woa/Contents/Resources/Main.wo/Main.wod b/build/Pagic.woa/Contents/Resources/Main.wo/Main.wod new file mode 100644 index 0000000..e69de29 diff --git a/build/Pagic.woa/Contents/Resources/Main.wo/Main.woo b/build/Pagic.woa/Contents/Resources/Main.wo/Main.woo new file mode 100644 index 0000000..1f6e847 --- /dev/null +++ b/build/Pagic.woa/Contents/Resources/Main.wo/Main.woo @@ -0,0 +1,4 @@ +{ + "WebObjects Release" = "WebObjects 5.0"; + encoding = "UTF-8"; +} \ No newline at end of file diff --git a/build/Pagic.woa/Contents/Resources/Properties b/build/Pagic.woa/Contents/Resources/Properties new file mode 100644 index 0000000..7fac881 --- /dev/null +++ b/build/Pagic.woa/Contents/Resources/Properties @@ -0,0 +1,68 @@ +# OGNL +ognl.helperFunctions=true +ognl.inlineBindings=true + +# Misc +er.extensions.stackTrace.cleanup=true + +# EOF +er.extensions.ERXEC.safeLocking=true +er.extensions.ERXEC.useSharedEditingContext=false +er.extensions.ERXEnterpriseObject.applyRestrictingQualifierOnInsert=true +er.extensions.ERXEnterpriseObject.updateInverseRelationships=true +#dbConnectURLGLOBAL= +#dbConnectUserGLOBAL= +#dbConnectPasswordGLOBAL= + +# Migrations +#er.migration.migrateAtStartup=true +#er.migration.createTablesIfNecessary=true +#er.migration.modelNames=YourModel + +# Misc Components +#er.extensions.ERXWOForm.multipleSubmitDefault=true +#er.extensions.ERXWORepetition.checkHashCodes=true +#er.extensions.ERXWORepetition.raiseOnUnmatchedObject=true +#er.extensions.ERXWORepetition.eoSupport=true +#er.component.clickToOpen=true +#wolips.password=wo + +# ERJavaMail +er.javamail.centralize=true +er.javamail.adminEmail=admin@yourhost.com +er.javamail.debugEnabled=false +er.javamail.smtpHost=your.smtpserver.com +er.javamail.smtpAuth=false +er.javamail.smtpUser= +er.javamail.smtpPassword= + +# Log4j Configuration +log4j.loggerFactory=er.extensions.logging.ERXLogger$Factory +log4j.rootCategory=INFO,A1 +log4j.appender.A1=er.extensions.logging.ERXConsoleAppender +log4j.appender.A1.layout=er.extensions.logging.ERXPatternLayout +log4j.appender.A1.layout.ConversionPattern=%d{MMM dd HH:mm:ss} %$[%#] %-5p %c %x - %m%n + +# Log4j Categories +# Here are a few log4j sub-categories that are interesting. +# Don't forget that in developement mode this file will get reloaded +# everytime it changes, so if you say want to turn adaptor debugging +# on in the middle of the app simply set the below category to debug. +# Very handy. +# Base Category +log4j.logger.er=INFO + +# ERExtensions +# Transaction - Switching this to debug will start the sql ouputting. +log4j.logger.er.transaction.adaptor.EOAdaptorDebugEnabled=DEBUG + +# Fixes - Turning this on will show all the models that are loaded +log4j.logger.er.extensions.fixes.ERSharedEOLoader=INFO + +er.extensions.ERXNSLogLog4jBridge=INFO +#log4j.logger.er.eo.ERXGenericRecord=DEBUG +#log4j.logger.er.validation.ERXEntityClassDescription=DEBUG +#log4j.logger.er.default.ERXEntityClassDescription=DEBUG +log4j.logger.er.extensions.ERXDatabaseContextDelegate=WARN +log4j.logger.er.extensions.ERXConfigurationManager=INFO +#log4j.logger.er.extensions.ERXApplication.RequestHandling=DEBUG diff --git a/woproject/classes.exclude.patternset b/woproject/classes.exclude.patternset new file mode 100644 index 0000000..56fb545 --- /dev/null +++ b/woproject/classes.exclude.patternset @@ -0,0 +1 @@ +build.properties diff --git a/woproject/classes.include.patternset b/woproject/classes.include.patternset new file mode 100644 index 0000000..3179091 --- /dev/null +++ b/woproject/classes.include.patternset @@ -0,0 +1,2 @@ +**/*.class +*.properties diff --git a/woproject/resources.exclude.patternset b/woproject/resources.exclude.patternset new file mode 100644 index 0000000..905050d --- /dev/null +++ b/woproject/resources.exclude.patternset @@ -0,0 +1,3 @@ +**/*.eomodeld~/ +**/*.woa/** +**/*.framework/** diff --git a/woproject/resources.include.patternset b/woproject/resources.include.patternset new file mode 100644 index 0000000..6119787 --- /dev/null +++ b/woproject/resources.include.patternset @@ -0,0 +1,3 @@ +Components/**/*.wo/**/* +Components/**/*.api +Resources/**/* \ No newline at end of file diff --git a/woproject/wsresources.exclude.patternset b/woproject/wsresources.exclude.patternset new file mode 100644 index 0000000..9435a51 --- /dev/null +++ b/woproject/wsresources.exclude.patternset @@ -0,0 +1,3 @@ +**/*.woa/** +**/*.framework/** +**/*.eomodeld~/** diff --git a/woproject/wsresources.include.patternset b/woproject/wsresources.include.patternset new file mode 100644 index 0000000..234cdc8 --- /dev/null +++ b/woproject/wsresources.include.patternset @@ -0,0 +1 @@ +WebServerResources/**/* -- cgit v1.2.3