You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2015/03/30 14:56:51 UTC
[22/22] isis git commit: ISIS-720: mothballing scimpi
ISIS-720: mothballing scimpi
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/2c7cfbfe
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/2c7cfbfe
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/2c7cfbfe
Branch: refs/heads/master
Commit: 2c7cfbfecb1d58f4a05ecd6814064baa1ebb20b4
Parents: afc5cad
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sat Mar 28 13:06:13 2015 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Mar 30 13:43:58 2015 +0100
----------------------------------------------------------------------
component/viewer/scimpi/NOTICE | 7 -
component/viewer/scimpi/dispatcher/pom.xml | 92 --
.../dispatcher/AbstractElementProcessor.java | 55 --
.../dispatcher/AbstractObjectProcessor.java | 53 --
.../isis/viewer/scimpi/dispatcher/Action.java | 37 -
.../viewer/scimpi/dispatcher/BlockContent.java | 23 -
.../scimpi/dispatcher/DispatchException.java | 40 -
.../viewer/scimpi/dispatcher/Dispatcher.java | 484 -----------
.../dispatcher/ElementContentProcessor.java | 24 -
.../scimpi/dispatcher/ElementProcessor.java | 30 -
.../viewer/scimpi/dispatcher/ErrorCollator.java | 148 ----
.../scimpi/dispatcher/ForbiddenException.java | 68 --
.../isis/viewer/scimpi/dispatcher/Names.java | 91 --
.../scimpi/dispatcher/NotLoggedInException.java | 31 -
.../scimpi/dispatcher/ResolveFieldUtil.java | 71 --
.../scimpi/dispatcher/ScimpiException.java | 44 -
.../dispatcher/ScimpiNotFoundException.java | 41 -
.../scimpi/dispatcher/TagOrderException.java | 31 -
.../viewer/scimpi/dispatcher/UserManager.java | 91 --
.../isis/viewer/scimpi/dispatcher/Util.java | 105 ---
.../scimpi/dispatcher/action/ActionAction.java | 268 ------
.../scimpi/dispatcher/action/Attributes.java | 131 ---
.../dispatcher/action/PropertyException.java | 44 -
.../action/RequiredPropertyException.java | 43 -
.../context/DefaultOidObjectMapping.java | 511 -----------
.../context/DefaultVersionMapping.java | 40 -
.../context/IndirectObjectMapping.java | 204 -----
.../scimpi/dispatcher/context/Mapping.java | 205 -----
.../dispatcher/context/ObjectMapping.java | 42 -
.../dispatcher/context/RequestContext.java | 857 -------------------
.../dispatcher/context/VersionMapping.java | 30 -
.../scimpi/dispatcher/debug/DebugAction.java | 257 ------
.../dispatcher/debug/DebugHtmlWriter.java | 45 -
.../dispatcher/debug/DebugUserAction.java | 71 --
.../scimpi/dispatcher/debug/DebugUsers.java | 98 ---
.../scimpi/dispatcher/debug/DebugUsersView.java | 50 --
.../scimpi/dispatcher/debug/ErrorDetails.java | 35 -
.../scimpi/dispatcher/debug/ErrorMessage.java | 35 -
.../scimpi/dispatcher/debug/ErrorReference.java | 35 -
.../scimpi/dispatcher/debug/LogAction.java | 75 --
.../scimpi/dispatcher/edit/EditAction.java | 266 ------
.../scimpi/dispatcher/edit/FieldEditState.java | 57 --
.../scimpi/dispatcher/edit/FormState.java | 67 --
.../scimpi/dispatcher/edit/RemoveAction.java | 114 ---
.../scimpi/dispatcher/logon/DomainSession.java | 42 -
.../scimpi/dispatcher/logon/LogonAction.java | 175 ----
.../scimpi/dispatcher/logon/LogoutAction.java | 70 --
.../scimpi/dispatcher/processor/Encoder.java | 26 -
.../dispatcher/processor/HtmlFileParser.java | 205 -----
.../scimpi/dispatcher/processor/PageWriter.java | 28 -
.../dispatcher/processor/ProcessorLookup.java | 256 ------
.../scimpi/dispatcher/processor/Request.java | 324 -------
.../dispatcher/processor/SimpleEncoder.java | 32 -
.../processor/TagProcessingException.java | 59 --
.../scimpi/dispatcher/util/MethodsUtils.java | 154 ----
.../viewer/scimpi/dispatcher/view/HelpLink.java | 72 --
.../viewer/scimpi/dispatcher/view/History.java | 150 ----
.../scimpi/dispatcher/view/HtmlSnippet.java | 51 --
.../viewer/scimpi/dispatcher/view/Snippet.java | 27 -
.../viewer/scimpi/dispatcher/view/SwfTag.java | 90 --
.../scimpi/dispatcher/view/VersionNumber.java | 70 --
.../dispatcher/view/action/ActionButton.java | 237 -----
.../dispatcher/view/action/ActionContent.java | 77 --
.../dispatcher/view/action/ActionForm.java | 262 ------
.../dispatcher/view/action/ActionLink.java | 179 ----
.../view/action/CreateFormParameter.java | 43 -
.../scimpi/dispatcher/view/action/Methods.java | 192 -----
.../dispatcher/view/action/Parameter.java | 47 -
.../dispatcher/view/action/RunAction.java | 87 --
.../scimpi/dispatcher/view/action/Services.java | 67 --
.../dispatcher/view/collection/Collection.java | 93 --
.../scimpi/dispatcher/view/debug/Debug.java | 479 -----------
.../dispatcher/view/debug/DebugAccessCheck.java | 40 -
.../view/debug/DebugCollectionView.java | 110 ---
.../dispatcher/view/debug/DebugObjectView.java | 136 ---
.../dispatcher/view/debug/DebuggerLink.java | 53 --
.../dispatcher/view/debug/Diagnostics.java | 81 --
.../scimpi/dispatcher/view/debug/Log.java | 46 -
.../scimpi/dispatcher/view/debug/LogLevel.java | 55 --
.../scimpi/dispatcher/view/debug/Members.java | 109 ---
.../scimpi/dispatcher/view/debug/ShowDebug.java | 41 -
.../dispatcher/view/debug/Specification.java | 119 ---
.../dispatcher/view/debug/ThrowException.java | 43 -
.../view/display/AbstractFormView.java | 142 ---
.../view/display/AbstractTableView.java | 149 ----
.../dispatcher/view/display/AddMessage.java | 44 -
.../dispatcher/view/display/AddWarning.java | 44 -
.../scimpi/dispatcher/view/display/Errors.java | 65 --
.../dispatcher/view/display/Feedback.java | 46 -
.../dispatcher/view/display/FieldLabel.java | 77 --
.../dispatcher/view/display/FieldValue.java | 118 ---
.../dispatcher/view/display/GetField.java | 103 ---
.../dispatcher/view/display/IncludeObject.java | 107 ---
.../dispatcher/view/display/ListView.java | 94 --
.../dispatcher/view/display/LongFormView.java | 84 --
.../dispatcher/view/display/Messages.java | 59 --
.../dispatcher/view/display/SelectedObject.java | 55 --
.../dispatcher/view/display/ShortFormView.java | 36 -
.../dispatcher/view/display/TableBlock.java | 86 --
.../dispatcher/view/display/TableBuilder.java | 92 --
.../dispatcher/view/display/TableCell.java | 94 --
.../view/display/TableContentWriter.java | 39 -
.../dispatcher/view/display/TableEmpty.java | 53 --
.../dispatcher/view/display/TableHeader.java | 39 -
.../dispatcher/view/display/TableRow.java | 49 --
.../dispatcher/view/display/TableView.java | 329 -------
.../scimpi/dispatcher/view/display/Title.java | 68 --
.../dispatcher/view/display/Warnings.java | 58 --
.../scimpi/dispatcher/view/edit/EditObject.java | 319 -------
.../dispatcher/view/edit/FieldFactory.java | 105 ---
.../scimpi/dispatcher/view/edit/FormEntry.java | 44 -
.../scimpi/dispatcher/view/edit/FormField.java | 44 -
.../dispatcher/view/edit/FormFieldBlock.java | 68 --
.../dispatcher/view/edit/HiddenField.java | 48 --
.../dispatcher/view/edit/RadioListField.java | 70 --
.../scimpi/dispatcher/view/edit/Selector.java | 158 ----
.../dispatcher/view/field/ExcludeField.java | 39 -
.../dispatcher/view/field/IncludeField.java | 39 -
.../dispatcher/view/field/InclusionList.java | 89 --
.../scimpi/dispatcher/view/field/LinkField.java | 45 -
.../view/field/LinkedFieldsBlock.java | 47 -
.../dispatcher/view/field/LinkedObject.java | 58 --
.../dispatcher/view/form/HiddenInputField.java | 41 -
.../dispatcher/view/form/HtmlFormBuilder.java | 214 -----
.../scimpi/dispatcher/view/form/InputField.java | 224 -----
.../scimpi/dispatcher/view/logon/Logoff.java | 38 -
.../scimpi/dispatcher/view/logon/Logon.java | 126 ---
.../dispatcher/view/logon/RestrictAccess.java | 41 -
.../scimpi/dispatcher/view/logon/Secure.java | 45 -
.../scimpi/dispatcher/view/logon/User.java | 77 --
.../view/simple/AbstractConditionalBlock.java | 565 ------------
.../dispatcher/view/simple/AbstractLink.java | 121 ---
.../dispatcher/view/simple/BlockDefine.java | 42 -
.../scimpi/dispatcher/view/simple/BlockUse.java | 46 -
.../scimpi/dispatcher/view/simple/Commit.java | 45 -
.../dispatcher/view/simple/ContentTag.java | 36 -
.../dispatcher/view/simple/CookieValue.java | 46 -
.../dispatcher/view/simple/DefaultValue.java | 52 --
.../scimpi/dispatcher/view/simple/EditLink.java | 71 --
.../dispatcher/view/simple/EndSession.java | 36 -
.../scimpi/dispatcher/view/simple/Forward.java | 37 -
.../dispatcher/view/simple/GetCookie.java | 39 -
.../scimpi/dispatcher/view/simple/Import.java | 37 -
.../view/simple/InitializeFromCookie.java | 80 --
.../view/simple/InitializeFromResult.java | 77 --
.../dispatcher/view/simple/Localization.java | 64 --
.../scimpi/dispatcher/view/simple/Mark.java | 43 -
.../dispatcher/view/simple/NewActionLink.java | 62 --
.../dispatcher/view/simple/ObjectLink.java | 68 --
.../dispatcher/view/simple/PageTitle.java | 35 -
.../scimpi/dispatcher/view/simple/Redirect.java | 37 -
.../dispatcher/view/simple/RemoveElement.java | 140 ---
.../scimpi/dispatcher/view/simple/ScopeTag.java | 51 --
.../dispatcher/view/simple/SetCookie.java | 53 --
.../view/simple/SetCookieFromField.java | 55 --
.../view/simple/SetFieldFromCookie.java | 52 --
.../dispatcher/view/simple/SetLocalization.java | 61 --
.../dispatcher/view/simple/SimpleButton.java | 39 -
.../dispatcher/view/simple/StartSession.java | 36 -
.../dispatcher/view/simple/TemplateTag.java | 40 -
.../scimpi/dispatcher/view/simple/Unless.java | 41 -
.../scimpi/dispatcher/view/simple/Variable.java | 64 --
.../scimpi/dispatcher/view/simple/When.java | 41 -
.../dispatcher/view/value/ActionName.java | 47 -
.../dispatcher/view/value/CountElements.java | 54 --
.../dispatcher/view/value/ElementType.java | 61 --
.../scimpi/dispatcher/view/value/FieldName.java | 65 --
.../dispatcher/view/value/ParameterName.java | 62 --
.../dispatcher/view/value/TitleString.java | 68 --
.../scimpi/dispatcher/view/value/Type.java | 57 --
component/viewer/scimpi/pom.xml | 131 ---
component/viewer/scimpi/servlet/pom.xml | 77 --
.../scimpi/servlet/DispatchException.java | 42 -
.../scimpi/servlet/DispatcherServlet.java | 89 --
.../isis/viewer/scimpi/servlet/ImageLookup.java | 174 ----
.../scimpi/servlet/ServletRequestContext.java | 373 --------
.../appended-resources/supplemental-models.xml | 106 ---
component/viewer/scimpi/tck/pom.xml | 98 ---
.../tck/src/main/resources/images/Default.png | Bin 3016 -> 0 bytes
.../main/webapp/ToDoItem/edit-selector.shtml | 29 -
.../src/main/webapp/ToDoItem/object-link.shtml | 32 -
.../src/main/webapp/ToDoItem/object-orig.shtml | 31 -
.../tck/src/main/webapp/ToDoItem/object.shtml | 34 -
.../tck/src/main/webapp/ToDoItem/object2.shtml | 31 -
.../tck/src/main/webapp/WEB-INF/isis.properties | 54 --
.../src/main/webapp/WEB-INF/logging.properties | 30 -
.../src/main/webapp/WEB-INF/security_file.allow | 16 -
.../main/webapp/WEB-INF/security_file.passwords | 20 -
.../scimpi/tck/src/main/webapp/WEB-INF/web.xml | 55 --
.../scimpi/tck/src/main/webapp/debug.shtml | 23 -
.../tck/src/main/webapp/generic/action.shtml | 27 -
.../src/main/webapp/generic/collection.shtml | 26 -
.../tck/src/main/webapp/generic/edit.shtml | 26 -
.../tck/src/main/webapp/generic/object.shtml | 28 -
.../scimpi/tck/src/main/webapp/images/Claim.png | Bin 2708 -> 0 bytes
.../tck/src/main/webapp/images/ClaimItem.png | Bin 2316 -> 0 bytes
.../tck/src/main/webapp/images/Employee.png | Bin 1986 -> 0 bytes
.../tck/src/main/webapp/images/banner-bg.png | Bin 384 -> 0 bytes
.../tck/src/main/webapp/images/banner.png | Bin 18951 -> 0 bytes
.../scimpi/tck/src/main/webapp/images/logo.png | Bin 7183 -> 0 bytes
.../scimpi/tck/src/main/webapp/index.shtml | 25 -
.../scimpi/tck/src/main/webapp/login.shtml | 23 -
.../scimpi/tck/src/main/webapp/style/screen.css | 394 ---------
.../tck/src/main/webapp/style/template.shtml | 47 -
mothballed/component/viewer/scimpi/NOTICE | 7 +
.../component/viewer/scimpi/dispatcher/pom.xml | 92 ++
.../dispatcher/AbstractElementProcessor.java | 55 ++
.../dispatcher/AbstractObjectProcessor.java | 53 ++
.../isis/viewer/scimpi/dispatcher/Action.java | 37 +
.../viewer/scimpi/dispatcher/BlockContent.java | 23 +
.../scimpi/dispatcher/DispatchException.java | 40 +
.../viewer/scimpi/dispatcher/Dispatcher.java | 484 +++++++++++
.../dispatcher/ElementContentProcessor.java | 24 +
.../scimpi/dispatcher/ElementProcessor.java | 30 +
.../viewer/scimpi/dispatcher/ErrorCollator.java | 148 ++++
.../scimpi/dispatcher/ForbiddenException.java | 68 ++
.../isis/viewer/scimpi/dispatcher/Names.java | 91 ++
.../scimpi/dispatcher/NotLoggedInException.java | 31 +
.../scimpi/dispatcher/ResolveFieldUtil.java | 71 ++
.../scimpi/dispatcher/ScimpiException.java | 44 +
.../dispatcher/ScimpiNotFoundException.java | 41 +
.../scimpi/dispatcher/TagOrderException.java | 31 +
.../viewer/scimpi/dispatcher/UserManager.java | 91 ++
.../isis/viewer/scimpi/dispatcher/Util.java | 105 +++
.../scimpi/dispatcher/action/ActionAction.java | 268 ++++++
.../scimpi/dispatcher/action/Attributes.java | 131 +++
.../dispatcher/action/PropertyException.java | 44 +
.../action/RequiredPropertyException.java | 43 +
.../context/DefaultOidObjectMapping.java | 511 +++++++++++
.../context/DefaultVersionMapping.java | 40 +
.../context/IndirectObjectMapping.java | 204 +++++
.../scimpi/dispatcher/context/Mapping.java | 205 +++++
.../dispatcher/context/ObjectMapping.java | 42 +
.../dispatcher/context/RequestContext.java | 857 +++++++++++++++++++
.../dispatcher/context/VersionMapping.java | 30 +
.../scimpi/dispatcher/debug/DebugAction.java | 257 ++++++
.../dispatcher/debug/DebugHtmlWriter.java | 45 +
.../dispatcher/debug/DebugUserAction.java | 71 ++
.../scimpi/dispatcher/debug/DebugUsers.java | 98 +++
.../scimpi/dispatcher/debug/DebugUsersView.java | 50 ++
.../scimpi/dispatcher/debug/ErrorDetails.java | 35 +
.../scimpi/dispatcher/debug/ErrorMessage.java | 35 +
.../scimpi/dispatcher/debug/ErrorReference.java | 35 +
.../scimpi/dispatcher/debug/LogAction.java | 75 ++
.../scimpi/dispatcher/edit/EditAction.java | 266 ++++++
.../scimpi/dispatcher/edit/FieldEditState.java | 57 ++
.../scimpi/dispatcher/edit/FormState.java | 67 ++
.../scimpi/dispatcher/edit/RemoveAction.java | 114 +++
.../scimpi/dispatcher/logon/DomainSession.java | 42 +
.../scimpi/dispatcher/logon/LogonAction.java | 175 ++++
.../scimpi/dispatcher/logon/LogoutAction.java | 70 ++
.../scimpi/dispatcher/processor/Encoder.java | 26 +
.../dispatcher/processor/HtmlFileParser.java | 205 +++++
.../scimpi/dispatcher/processor/PageWriter.java | 28 +
.../dispatcher/processor/ProcessorLookup.java | 256 ++++++
.../scimpi/dispatcher/processor/Request.java | 324 +++++++
.../dispatcher/processor/SimpleEncoder.java | 32 +
.../processor/TagProcessingException.java | 59 ++
.../scimpi/dispatcher/util/MethodsUtils.java | 154 ++++
.../viewer/scimpi/dispatcher/view/HelpLink.java | 72 ++
.../viewer/scimpi/dispatcher/view/History.java | 150 ++++
.../scimpi/dispatcher/view/HtmlSnippet.java | 51 ++
.../viewer/scimpi/dispatcher/view/Snippet.java | 27 +
.../viewer/scimpi/dispatcher/view/SwfTag.java | 90 ++
.../scimpi/dispatcher/view/VersionNumber.java | 70 ++
.../dispatcher/view/action/ActionButton.java | 237 +++++
.../dispatcher/view/action/ActionContent.java | 77 ++
.../dispatcher/view/action/ActionForm.java | 262 ++++++
.../dispatcher/view/action/ActionLink.java | 179 ++++
.../view/action/CreateFormParameter.java | 43 +
.../scimpi/dispatcher/view/action/Methods.java | 192 +++++
.../dispatcher/view/action/Parameter.java | 47 +
.../dispatcher/view/action/RunAction.java | 87 ++
.../scimpi/dispatcher/view/action/Services.java | 67 ++
.../dispatcher/view/collection/Collection.java | 93 ++
.../scimpi/dispatcher/view/debug/Debug.java | 479 +++++++++++
.../dispatcher/view/debug/DebugAccessCheck.java | 40 +
.../view/debug/DebugCollectionView.java | 110 +++
.../dispatcher/view/debug/DebugObjectView.java | 136 +++
.../dispatcher/view/debug/DebuggerLink.java | 53 ++
.../dispatcher/view/debug/Diagnostics.java | 81 ++
.../scimpi/dispatcher/view/debug/Log.java | 46 +
.../scimpi/dispatcher/view/debug/LogLevel.java | 55 ++
.../scimpi/dispatcher/view/debug/Members.java | 109 +++
.../scimpi/dispatcher/view/debug/ShowDebug.java | 41 +
.../dispatcher/view/debug/Specification.java | 119 +++
.../dispatcher/view/debug/ThrowException.java | 43 +
.../view/display/AbstractFormView.java | 142 +++
.../view/display/AbstractTableView.java | 149 ++++
.../dispatcher/view/display/AddMessage.java | 44 +
.../dispatcher/view/display/AddWarning.java | 44 +
.../scimpi/dispatcher/view/display/Errors.java | 65 ++
.../dispatcher/view/display/Feedback.java | 46 +
.../dispatcher/view/display/FieldLabel.java | 77 ++
.../dispatcher/view/display/FieldValue.java | 118 +++
.../dispatcher/view/display/GetField.java | 103 +++
.../dispatcher/view/display/IncludeObject.java | 107 +++
.../dispatcher/view/display/ListView.java | 94 ++
.../dispatcher/view/display/LongFormView.java | 84 ++
.../dispatcher/view/display/Messages.java | 59 ++
.../dispatcher/view/display/SelectedObject.java | 55 ++
.../dispatcher/view/display/ShortFormView.java | 36 +
.../dispatcher/view/display/TableBlock.java | 86 ++
.../dispatcher/view/display/TableBuilder.java | 92 ++
.../dispatcher/view/display/TableCell.java | 94 ++
.../view/display/TableContentWriter.java | 39 +
.../dispatcher/view/display/TableEmpty.java | 53 ++
.../dispatcher/view/display/TableHeader.java | 39 +
.../dispatcher/view/display/TableRow.java | 49 ++
.../dispatcher/view/display/TableView.java | 329 +++++++
.../scimpi/dispatcher/view/display/Title.java | 68 ++
.../dispatcher/view/display/Warnings.java | 58 ++
.../scimpi/dispatcher/view/edit/EditObject.java | 319 +++++++
.../dispatcher/view/edit/FieldFactory.java | 105 +++
.../scimpi/dispatcher/view/edit/FormEntry.java | 44 +
.../scimpi/dispatcher/view/edit/FormField.java | 44 +
.../dispatcher/view/edit/FormFieldBlock.java | 68 ++
.../dispatcher/view/edit/HiddenField.java | 48 ++
.../dispatcher/view/edit/RadioListField.java | 70 ++
.../scimpi/dispatcher/view/edit/Selector.java | 158 ++++
.../dispatcher/view/field/ExcludeField.java | 39 +
.../dispatcher/view/field/IncludeField.java | 39 +
.../dispatcher/view/field/InclusionList.java | 89 ++
.../scimpi/dispatcher/view/field/LinkField.java | 45 +
.../view/field/LinkedFieldsBlock.java | 47 +
.../dispatcher/view/field/LinkedObject.java | 58 ++
.../dispatcher/view/form/HiddenInputField.java | 41 +
.../dispatcher/view/form/HtmlFormBuilder.java | 214 +++++
.../scimpi/dispatcher/view/form/InputField.java | 224 +++++
.../scimpi/dispatcher/view/logon/Logoff.java | 38 +
.../scimpi/dispatcher/view/logon/Logon.java | 126 +++
.../dispatcher/view/logon/RestrictAccess.java | 41 +
.../scimpi/dispatcher/view/logon/Secure.java | 45 +
.../scimpi/dispatcher/view/logon/User.java | 77 ++
.../view/simple/AbstractConditionalBlock.java | 565 ++++++++++++
.../dispatcher/view/simple/AbstractLink.java | 121 +++
.../dispatcher/view/simple/BlockDefine.java | 42 +
.../scimpi/dispatcher/view/simple/BlockUse.java | 46 +
.../scimpi/dispatcher/view/simple/Commit.java | 45 +
.../dispatcher/view/simple/ContentTag.java | 36 +
.../dispatcher/view/simple/CookieValue.java | 46 +
.../dispatcher/view/simple/DefaultValue.java | 52 ++
.../scimpi/dispatcher/view/simple/EditLink.java | 71 ++
.../dispatcher/view/simple/EndSession.java | 36 +
.../scimpi/dispatcher/view/simple/Forward.java | 37 +
.../dispatcher/view/simple/GetCookie.java | 39 +
.../scimpi/dispatcher/view/simple/Import.java | 37 +
.../view/simple/InitializeFromCookie.java | 80 ++
.../view/simple/InitializeFromResult.java | 77 ++
.../dispatcher/view/simple/Localization.java | 64 ++
.../scimpi/dispatcher/view/simple/Mark.java | 43 +
.../dispatcher/view/simple/NewActionLink.java | 62 ++
.../dispatcher/view/simple/ObjectLink.java | 68 ++
.../dispatcher/view/simple/PageTitle.java | 35 +
.../scimpi/dispatcher/view/simple/Redirect.java | 37 +
.../dispatcher/view/simple/RemoveElement.java | 140 +++
.../scimpi/dispatcher/view/simple/ScopeTag.java | 51 ++
.../dispatcher/view/simple/SetCookie.java | 53 ++
.../view/simple/SetCookieFromField.java | 55 ++
.../view/simple/SetFieldFromCookie.java | 52 ++
.../dispatcher/view/simple/SetLocalization.java | 61 ++
.../dispatcher/view/simple/SimpleButton.java | 39 +
.../dispatcher/view/simple/StartSession.java | 36 +
.../dispatcher/view/simple/TemplateTag.java | 40 +
.../scimpi/dispatcher/view/simple/Unless.java | 41 +
.../scimpi/dispatcher/view/simple/Variable.java | 64 ++
.../scimpi/dispatcher/view/simple/When.java | 41 +
.../dispatcher/view/value/ActionName.java | 47 +
.../dispatcher/view/value/CountElements.java | 54 ++
.../dispatcher/view/value/ElementType.java | 61 ++
.../scimpi/dispatcher/view/value/FieldName.java | 65 ++
.../dispatcher/view/value/ParameterName.java | 62 ++
.../dispatcher/view/value/TitleString.java | 68 ++
.../scimpi/dispatcher/view/value/Type.java | 57 ++
mothballed/component/viewer/scimpi/pom.xml | 131 +++
.../component/viewer/scimpi/servlet/pom.xml | 77 ++
.../scimpi/servlet/DispatchException.java | 42 +
.../scimpi/servlet/DispatcherServlet.java | 89 ++
.../isis/viewer/scimpi/servlet/ImageLookup.java | 174 ++++
.../scimpi/servlet/ServletRequestContext.java | 373 ++++++++
.../appended-resources/supplemental-models.xml | 106 +++
mothballed/component/viewer/scimpi/tck/pom.xml | 98 +++
.../tck/src/main/resources/images/Default.png | Bin 0 -> 3016 bytes
.../main/webapp/ToDoItem/edit-selector.shtml | 29 +
.../src/main/webapp/ToDoItem/object-link.shtml | 32 +
.../src/main/webapp/ToDoItem/object-orig.shtml | 31 +
.../tck/src/main/webapp/ToDoItem/object.shtml | 34 +
.../tck/src/main/webapp/ToDoItem/object2.shtml | 31 +
.../tck/src/main/webapp/WEB-INF/isis.properties | 54 ++
.../src/main/webapp/WEB-INF/logging.properties | 30 +
.../src/main/webapp/WEB-INF/security_file.allow | 16 +
.../main/webapp/WEB-INF/security_file.passwords | 20 +
.../scimpi/tck/src/main/webapp/WEB-INF/web.xml | 55 ++
.../scimpi/tck/src/main/webapp/debug.shtml | 23 +
.../tck/src/main/webapp/generic/action.shtml | 27 +
.../src/main/webapp/generic/collection.shtml | 26 +
.../tck/src/main/webapp/generic/edit.shtml | 26 +
.../tck/src/main/webapp/generic/object.shtml | 28 +
.../scimpi/tck/src/main/webapp/images/Claim.png | Bin 0 -> 2708 bytes
.../tck/src/main/webapp/images/ClaimItem.png | Bin 0 -> 2316 bytes
.../tck/src/main/webapp/images/Employee.png | Bin 0 -> 1986 bytes
.../tck/src/main/webapp/images/banner-bg.png | Bin 0 -> 384 bytes
.../tck/src/main/webapp/images/banner.png | Bin 0 -> 18951 bytes
.../scimpi/tck/src/main/webapp/images/logo.png | Bin 0 -> 7183 bytes
.../scimpi/tck/src/main/webapp/index.shtml | 25 +
.../scimpi/tck/src/main/webapp/login.shtml | 23 +
.../scimpi/tck/src/main/webapp/style/screen.css | 394 +++++++++
.../tck/src/main/webapp/style/template.shtml | 47 +
pom.xml | 2 -
409 files changed, 18449 insertions(+), 18451 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/NOTICE
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/NOTICE b/component/viewer/scimpi/NOTICE
deleted file mode 100644
index ba21d0c..0000000
--- a/component/viewer/scimpi/NOTICE
+++ /dev/null
@@ -1,7 +0,0 @@
-Apache Isis
-Copyright 2010-2013 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/pom.xml
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/pom.xml b/component/viewer/scimpi/dispatcher/pom.xml
deleted file mode 100644
index 3805c10..0000000
--- a/component/viewer/scimpi/dispatcher/pom.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.isis.viewer</groupId>
- <artifactId>isis-viewer-scimpi</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>isis-viewer-scimpi-dispatcher</artifactId>
-
- <name>Isis Scimpi Viewer Dispatcher</name>
-
- <properties>
- <siteBaseDir>..</siteBaseDir>
- <relativeUrl>dispatcher/</relativeUrl>
- </properties>
-
- <!-- used in Site generation for relative references. -->
- <url>http://isis.apache.org/${relativeUrl}</url>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <inherited>false</inherited>
- <configuration>
- <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
- </configuration>
- <reportSets>
- <reportSet>
- <inherited>false</inherited>
- <reports>
- <report>dependencies</report>
- <report>dependency-convergence</report>
- <report>plugins</report>
- <report>summary</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- </plugins>
- </reporting>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-runtime</artifactId>
- </dependency>
-
- <dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.json</groupId>
- <artifactId>json</artifactId>
- </dependency>
-
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.htmlparser</groupId>
- <artifactId>htmlparser</artifactId>
- </dependency>
-
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/AbstractElementProcessor.java
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/AbstractElementProcessor.java b/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/AbstractElementProcessor.java
deleted file mode 100644
index 4869cc4..0000000
--- a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/AbstractElementProcessor.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.scimpi.dispatcher;
-
-import org.apache.isis.core.commons.config.ConfigurationConstants;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
-
-public abstract class AbstractElementProcessor implements ElementProcessor, Names {
-
- private static final String SHOW_ICONS_BY_DEFAULT = ConfigurationConstants.ROOT + "scimpi.show-icons";
-
- private final boolean showIconByDefault;
-
- public AbstractElementProcessor() {
- showIconByDefault = IsisContext.getConfiguration().getBoolean(SHOW_ICONS_BY_DEFAULT, false);
- }
-
- /**
- * Return the Class for the class specified in the type attribute.
- */
- protected Class<?> forClass(final Request request) {
- Class<?> cls = null;
- final String className = request.getOptionalProperty(TYPE);
- if (className != null) {
- try {
- cls = Class.forName(className);
- } catch (final ClassNotFoundException e) {
- throw new ScimpiException("No class for " + className, e);
- }
- }
- return cls;
- }
-
- protected boolean showIconByDefault() {
- return showIconByDefault;
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/AbstractObjectProcessor.java
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/AbstractObjectProcessor.java b/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/AbstractObjectProcessor.java
deleted file mode 100644
index 97dd1ed..0000000
--- a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/AbstractObjectProcessor.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.scimpi.dispatcher;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
-import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
-
-public abstract class AbstractObjectProcessor extends AbstractElementProcessor {
-
- @Override
- public void process(final Request request) {
- final String id = request.getOptionalProperty(OBJECT);
- ObjectAdapter object = request.getContext().getMappedObjectOrResult(id);
-
- final String field = request.getOptionalProperty(FIELD);
- if (field != null) {
- final ObjectAssociation objectField = object.getSpecification().getAssociation(field);
- final String error = checkFieldType(objectField);
- if (error != null) {
- throw new ScimpiException("Field " + objectField.getId() + " " + error);
- }
- ResolveFieldUtil.resolveField(object, objectField);
- object = objectField.get(object);
- }
-
- process(request, object);
- }
-
- protected String checkFieldType(final ObjectAssociation objectField) {
- return null;
- }
-
- protected abstract void process(Request request, ObjectAdapter object);
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Action.java
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Action.java b/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Action.java
deleted file mode 100644
index 7bd6b26..0000000
--- a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Action.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.scimpi.dispatcher;
-
-import java.io.IOException;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext;
-
-public interface Action extends Names {
-
- void process(RequestContext context) throws IOException;
-
- String getName();
-
- void init();
-
- void debug(DebugBuilder debug);
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/BlockContent.java
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/BlockContent.java b/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/BlockContent.java
deleted file mode 100644
index 836ae60..0000000
--- a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/BlockContent.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.scimpi.dispatcher;
-
-public interface BlockContent {
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/DispatchException.java
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/DispatchException.java b/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/DispatchException.java
deleted file mode 100644
index cc679ae..0000000
--- a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/DispatchException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.scimpi.dispatcher;
-
-public class DispatchException extends ScimpiException {
- private static final long serialVersionUID = 1L;
-
- public DispatchException() {
- }
-
- public DispatchException(final String message) {
- super(message);
- }
-
- public DispatchException(final Throwable cause) {
- super(cause);
- }
-
- public DispatchException(final String message, final Throwable cause) {
- super(message, cause);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java b/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
deleted file mode 100644
index 82c67c1..0000000
--- a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
+++ /dev/null
@@ -1,484 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.scimpi.dispatcher;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import java.util.Stack;
-import java.util.TimeZone;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.commons.config.ConfigurationConstants;
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.commons.exceptions.IsisException;
-import org.apache.isis.core.commons.factory.InstanceUtil;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
-import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacet;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
-import org.apache.isis.core.runtime.system.transaction.IsisTransactionManager;
-import org.apache.isis.viewer.scimpi.dispatcher.action.ActionAction;
-import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext;
-import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.Debug;
-import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.Scope;
-import org.apache.isis.viewer.scimpi.dispatcher.debug.DebugAction;
-import org.apache.isis.viewer.scimpi.dispatcher.debug.DebugHtmlWriter;
-import org.apache.isis.viewer.scimpi.dispatcher.debug.DebugUserAction;
-import org.apache.isis.viewer.scimpi.dispatcher.debug.DebugUsers;
-import org.apache.isis.viewer.scimpi.dispatcher.debug.LogAction;
-import org.apache.isis.viewer.scimpi.dispatcher.edit.EditAction;
-import org.apache.isis.viewer.scimpi.dispatcher.edit.RemoveAction;
-import org.apache.isis.viewer.scimpi.dispatcher.logon.LogonAction;
-import org.apache.isis.viewer.scimpi.dispatcher.logon.LogoutAction;
-import org.apache.isis.viewer.scimpi.dispatcher.processor.Encoder;
-import org.apache.isis.viewer.scimpi.dispatcher.processor.HtmlFileParser;
-import org.apache.isis.viewer.scimpi.dispatcher.processor.ProcessorLookup;
-import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
-import org.apache.isis.viewer.scimpi.dispatcher.processor.SimpleEncoder;
-import org.apache.isis.viewer.scimpi.dispatcher.processor.TagProcessingException;
-import org.apache.isis.viewer.scimpi.dispatcher.util.MethodsUtils;
-import org.apache.isis.viewer.scimpi.dispatcher.view.Snippet;
-
-public class Dispatcher {
- private static final String SHOW_UNSHOWN_MESSAGES = ConfigurationConstants.ROOT + "scimpi.show-unshown-messages";
- public static final String ACTION = "_action";
- public static final String EDIT = "_edit";
- public static final String REMOVE = "_remove";
- public static final String GENERIC = "_generic";
- public static final String EXTENSION = "shtml";
- private static final Logger LOG = LoggerFactory.getLogger(Dispatcher.class);
- public static final String COMMAND_ROOT = ".app";
- private final Map<String, Action> actions = new HashMap<String, Action>();
- private final Map<String, String> parameters = new HashMap<String, String>();
- private final ProcessorLookup processors = new ProcessorLookup();
- private final HtmlFileParser parser = new HtmlFileParser(processors);
- private final Encoder encoder = new SimpleEncoder();
- private boolean showUnshownMessages;
-
- public void process(final RequestContext context, final String servletPath) {
- LOG.debug("processing request " + servletPath);
- final AuthenticationSession session = UserManager.startRequest(context);
- LOG.debug("exsiting session: " + session);
-
- String language = (String) context.getVariable("user-language");
- if (language != null) {
- Locale locale = Util.locale(language);
- TimeZone timeZone = Util.timeZone((String) context.getVariable("user-time-zone"));
- // IsisContext.getUserProfile().setLocalization(new UserLocalization(locale, timeZone));
- }
-
- IsisContext.getPersistenceSession().getTransactionManager().startTransaction();
- context.setRequestPath(servletPath);
- context.startRequest();
-
- try {
- processActions(context, false, servletPath);
- processTheView(context);
- } catch (final ScimpiNotFoundException e) {
- if (context.isInternalRequest()) {
- LOG.error("invalid page request (from within application): " + e.getMessage());
- ErrorCollator error = new ErrorCollator();
- error.missingFile("Failed to find page " + servletPath + ".");
- show500ErrorPage(context, e, error);
- } else {
- LOG.info("invalid page request (from outside application): " + e.getMessage());
- show404ErrorPage(context, servletPath);
- }
- } catch (final NotLoggedInException e) {
- redirectToLoginPage(context);
- } catch (final Throwable e) {
- ErrorCollator error = new ErrorCollator();
- final PersistenceSession checkSession = IsisContext.getPersistenceSession();
- final IsisTransactionManager transactionManager = checkSession.getTransactionManager();
- if (transactionManager.getTransaction() != null && transactionManager.getTransaction().getState().canAbort()) {
- transactionManager.abortTransaction();
- transactionManager.startTransaction();
- }
-
- final Throwable ex = e instanceof TagProcessingException ? e.getCause() : e;
- if (ex instanceof ForbiddenException) {
- LOG.error("invalid access to " + servletPath, e);
- show403ErrorPage(context, error, e, ex);
- } else {
- LOG.error("error procesing " + servletPath, e);
- if (context.getErrorMessage() != null) {
- fallbackToSimpleErrorPage(context, e);
- } else {
- show500ErrorPage(context, e, error);
- }
- }
- } finally {
- try {
- UserManager.endRequest(context.getSession());
- } catch (final Exception e1) {
- LOG.error("endRequest call failed", e1);
- }
- }
- }
-
- private void redirectToLoginPage(final RequestContext context) {
- IsisContext.getMessageBroker().addWarning(
- "You are not currently logged in! Please log in so you can continue.");
- context.setRequestPath("/login.shtml");
- try {
- processTheView(context);
- } catch (final IOException e1) {
- throw new ScimpiException(e1);
- }
- }
-
- private void show404ErrorPage(final RequestContext context, final String servletPath) {
- ErrorCollator error = new ErrorCollator();
- error.missingFile("Failed to find page " + servletPath + ".");
- context.raiseError(404, error);
- }
-
- private void show403ErrorPage(final RequestContext context, ErrorCollator error, final Throwable e, final Throwable ex) {
- DebugBuilder debug = error.getDebug();
- error.message(e);
- error.message(ex);
-
- final List<String> roles = ((ForbiddenException) ex).getRoles();
- final StringBuffer roleList = new StringBuffer();
- for (final String role : roles) {
- if (roleList.length() > 0) {
- roleList.append("|");
- }
- roleList.append(role);
- }
- final Identifier identifier = ((ForbiddenException) ex).getIdentifier();
- if (identifier != null) {
- debug.appendln("Class", identifier.toClassIdentityString() + ":" + roleList);
- debug.appendln("Member",identifier.toClassAndNameIdentityString() + ":" + roleList);
- debug.appendln("Other",identifier.toFullIdentityString() + ":" + roleList);
- }
-
- error.compileError(context);
- context.raiseError(403, error);
- }
-
- private void show500ErrorPage(final RequestContext context, final Throwable e, ErrorCollator error) {
- error.exception(e);
- error.compileError(context);
- context.raiseError(500, error);
- }
-
- private void fallbackToSimpleErrorPage(final RequestContext context, final Throwable e) {
- context.setContentType("text/html");
- final PrintWriter writer = context.getWriter();
- writer.write("<html><head><title>Error</title></head>");
- writer.write("<body><h1>Error</h1>");
- writer.write("<p>Error while processing error</p><pre>");
- e.printStackTrace(writer);
- writer.write("</pre></body></html>");
- writer.close();
- LOG.error("Error while processing error", e);
- }
-
- protected void processTheView(final RequestContext context) throws IOException {
- IsisTransactionManager transactionManager = IsisContext.getPersistenceSession().getTransactionManager();
- if (transactionManager.getTransaction().getState().canFlush()) {
- transactionManager.flushTransaction();
- }
- processView(context);
- // Note - the session will have changed since the earlier call if a user
- // has logged in or out in the action
- // processing above.
- transactionManager = IsisContext.getPersistenceSession().getTransactionManager();
- if (transactionManager.getTransaction().getState().canCommit()) {
- IsisContext.getPersistenceSession().getTransactionManager().endTransaction();
- }
-
- context.endRequest();
- UserManager.endRequest(context.getSession());
- }
-
- public void addParameter(final String name, final String value) {
- parameters.put(name, value);
- }
-
- private String getParameter(final String name) {
- return parameters.get(name);
- }
-
- private void processActions(final RequestContext context, final boolean userLoggedIn, final String actionName) throws IOException {
- if (actionName.endsWith(COMMAND_ROOT)) {
- final int pos = actionName.lastIndexOf('/');
- final Action action = actions.get(actionName.substring(pos, actionName.length() - COMMAND_ROOT.length()));
- if (action == null) {
- throw new ScimpiException("No logic for " + actionName);
- }
-
- LOG.debug("processing action: " + action);
- action.process(context);
- final String fowardTo = context.forwardTo();
- if (fowardTo != null) {
- processActions(context, true, fowardTo);
- }
- }
- }
-
- private void processView(final RequestContext context) throws IOException {
- String file = context.getRequestedFile();
- if (file == null) {
- LOG.warn("No view specified to process");
- return;
- }
- if (file.endsWith(COMMAND_ROOT)) {
- return;
- }
- file = determineFile(context, file);
- final String fullPath = context.requestedFilePath(file);
- LOG.debug("processing file " + fullPath);
- context.setResourcePath(fullPath);
-
- context.setContentType("text/html");
-
- context.addVariable("title", "Untitled Page", Scope.REQUEST);
- final Stack<Snippet> tags = loadPageTemplate(context, fullPath);
- final Request request = new Request(file, context, encoder, tags, processors);
- request.appendDebug("processing " + fullPath);
- try {
- request.processNextTag();
- noteIfMessagesHaveNotBeenDisplay(context);
- } catch (final RuntimeException e) {
- IsisContext.getMessageBroker().getMessages();
- IsisContext.getMessageBroker().getWarnings();
- throw e;
- }
- final String page = request.popBuffer();
- final PrintWriter writer = context.getWriter();
- writer.write(page);
- if (context.getDebug() == Debug.PAGE) {
- final DebugHtmlWriter view = new DebugHtmlWriter(writer, false);
- context.append(view);
- }
- }
-
- public void noteIfMessagesHaveNotBeenDisplay(final RequestContext context) {
- final List<String> messages = IsisContext.getMessageBroker().getMessages();
- if (showUnshownMessages) {
- if (messages.size() > 0) {
- context.getWriter().println("<ol class=\"messages forced\">");
- for (String message : messages) {
- context.getWriter().println("<li>" + message + "</li>");
- }
- context.getWriter().println("</ol>");
- }
- final List<String> warnings = IsisContext.getMessageBroker().getWarnings();
- if (warnings.size() > 0) {
- context.getWriter().println("<ol class=\"warnings forced\">");
- for (String message : warnings) {
- context.getWriter().println("<li>" + message + "</li>");
- }
- context.getWriter().println("</ol>");
- }
- }
- }
-
- private String determineFile(final RequestContext context, String file) {
- final String fileName = file.trim();
- if (fileName.startsWith(GENERIC)) {
- final Object result = context.getVariable(RequestContext.RESULT);
- final ObjectAdapter mappedObject = MethodsUtils.findObject(context, (String) result);
- if (mappedObject == null) {
- throw new ScimpiException("No object mapping for " + result);
- }
- if (fileName.equals(GENERIC + "." + EXTENSION)) {
- final Facet facet = mappedObject.getSpecification().getFacet(CollectionFacet.class);
- if (facet != null) {
- final ObjectSpecification specification = mappedObject.getSpecification();
- final TypeOfFacet facet2 = specification.getFacet(TypeOfFacet.class);
- file = findFileForSpecification(context, facet2.valueSpec(), "collection", EXTENSION);
- } else {
- final ObjectAdapter mappedObject2 = mappedObject;
- if (mappedObject2.isTransient()) {
- file = findFileForSpecification(context, mappedObject.getSpecification(), "edit", EXTENSION);
- } else {
- file = findFileForSpecification(context, mappedObject.getSpecification(), "object", EXTENSION);
- }
- }
- } else if (fileName.equals(GENERIC + EDIT + "." + EXTENSION)) {
- file = findFileForSpecification(context, mappedObject.getSpecification(), "edit", EXTENSION);
- } else if (fileName.equals(GENERIC + ACTION + "." + EXTENSION)) {
- final String method = context.getParameter("method");
- file = findFileForSpecification(context, mappedObject.getSpecification(), method, "action", EXTENSION);
- }
- }
- return file;
- }
-
- private String findFileForSpecification(final RequestContext context, final ObjectSpecification specification, final String name, final String extension) {
- return findFileForSpecification(context, specification, name, name, extension);
- }
-
- private String findFileForSpecification(final RequestContext context, final ObjectSpecification specification, final String name, final String defaultName, final String extension) {
-
- String find = findFile(context, specification, name, extension);
- if (find == null) {
- find = "/generic/" + defaultName + "." + extension;
- }
- return find;
- }
-
- private String findFile(final RequestContext context, final ObjectSpecification specification, final String name, final String extension) {
- final String className = specification.getShortIdentifier();
- String fileName = context.findFile("/" + className + "/" + name + "." + extension);
- if (fileName == null) {
- final List<ObjectSpecification> interfaces = specification.interfaces();
- for (int i = 0; i < interfaces.size(); i++) {
- fileName = findFile(context, interfaces.get(i), name, extension);
- if (fileName != null) {
- return fileName;
- }
- }
- if (specification.superclass() != null) {
- fileName = findFile(context, specification.superclass(), name, extension);
- }
- }
- return fileName;
- }
-
- private Stack<Snippet> loadPageTemplate(final RequestContext context, final String path) throws IOException, FileNotFoundException {
- // TODO cache stacks and check for them first
- copyParametersToVariableList(context);
- LOG.debug("parsing source " + path);
- return parser.parseHtmlFile(path, context);
- }
-
- private void copyParametersToVariableList(final RequestContext context) {
- /*
- * Enumeration parameterNames = context.getParameterNames(); while
- * (parameterNames.hasMoreElements()) { String name = (String)
- * parameterNames.nextElement(); if (!name.equals("view")) {
- * context.addVariable(name, context.getParameter(name), Scope.REQUEST);
- * } }
- */
- }
-
- public void init(final String dir, final DebugUsers debugUsers) {
- addAction(new ActionAction());
-
- // TODO remove
- addAction(new DebugAction(this));
- addAction(new DebugUserAction(debugUsers));
- addAction(new EditAction());
- addAction(new RemoveAction());
- addAction(new LogonAction());
- addAction(new LogoutAction());
- addAction(new LogAction());
-
- final String configFile = getParameter("config");
- if (configFile != null) {
- final File file = new File(dir, configFile);
- if (file.exists()) {
- loadConfigFile(file);
- } else {
- throw new ScimpiException("Configuration file not found: " + configFile);
- }
- }
-
- processors.init();
- processors.addElementProcessor(new org.apache.isis.viewer.scimpi.dispatcher.view.debug.Debug(this));
-
- showUnshownMessages = IsisContext.getConfiguration().getBoolean(SHOW_UNSHOWN_MESSAGES, true);
- }
-
- private void loadConfigFile(final File file) {
- try {
- Document document;
- final SAXReader reader = new SAXReader();
- document = reader.read(file);
- final Element root = document.getRootElement();
- for (final Iterator i = root.elementIterator(); i.hasNext();) {
- final Element element = (Element) i.next();
-
- if (element.getName().equals("actions")) {
- for (final Iterator actions = element.elementIterator("action"); actions.hasNext();) {
- final Element action = (Element) actions.next();
- final String className = action.getText();
- final Action instance = (Action) InstanceUtil.createInstance(className);
- addAction(instance);
- }
- }
-
- if (element.getName().equals("processors")) {
- for (final Iterator processors = element.elementIterator("processor"); processors.hasNext();) {
- final Element processor = (Element) processors.next();
- final String className = processor.getText();
- final ElementProcessor instance = (ElementProcessor) InstanceUtil.createInstance(className);
- this.processors.addElementProcessor(instance);
- }
- }
-
- }
- } catch (final DocumentException e) {
- throw new IsisException(e);
- }
-
- }
-
- private void addAction(final Action action) {
- actions.put("/" + action.getName(), action);
- action.init();
- }
-
- public void debug(final DebugBuilder debug) {
- debug.startSection("Actions");
- final Set<String> keySet = actions.keySet();
- final ArrayList<String> list = new ArrayList<String>(keySet);
- Collections.sort(list);
- for (final String name : list) {
- debug.appendln(name, actions.get(name));
- }
- /*
- * new ArrayList<E>(actions.keySet().iterator()) Iterator<String> names
- * = Collections.sort().iterator(); while (names.hasNext()) { String
- * name = names.next(); view.appendRow(name, actions.get(name)); }
- */
- final Iterator<Action> iterator = actions.values().iterator();
- while (iterator.hasNext()) {
- iterator.next().debug(debug);
- }
-
- processors.debug(debug);
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ElementContentProcessor.java
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ElementContentProcessor.java b/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ElementContentProcessor.java
deleted file mode 100644
index eaae2ac..0000000
--- a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ElementContentProcessor.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.scimpi.dispatcher;
-
-public interface ElementContentProcessor extends ElementProcessor {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ElementProcessor.java
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ElementProcessor.java b/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ElementProcessor.java
deleted file mode 100644
index 471ac00..0000000
--- a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ElementProcessor.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.scimpi.dispatcher;
-
-import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
-
-public interface ElementProcessor {
-
- String getName();
-
- void process(Request request);
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ErrorCollator.java
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ErrorCollator.java b/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ErrorCollator.java
deleted file mode 100644
index 97e297e..0000000
--- a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ErrorCollator.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.scimpi.dispatcher;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.PrintWriter;
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.core.commons.config.ConfigurationConstants;
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.commons.debug.DebugHtmlString;
-import org.apache.isis.core.commons.debug.DebugString;
-import org.apache.isis.core.commons.debug.DebugTee;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext;
-import org.apache.isis.viewer.scimpi.dispatcher.debug.DebugHtmlWriter;
-
-public class ErrorCollator {
- private static final Logger LOG = LoggerFactory.getLogger(ErrorCollator.class);
-
- private String errorRef;
- private String message;
- private final DebugString debugText = new DebugString();
- private final DebugHtmlString debugHtml = new DebugHtmlString();
- private final DebugBuilder debug = new DebugTee(debugText, debugHtml);
-
- public void missingFile(String message) {
- this.message = message;
- }
-
- public void message(final Throwable exception) {
- LOG.debug(exception.getMessage(), exception);
- message = exception.getMessage();
- debug.appendPreformatted(message);
- }
-
- public void exception(final Throwable exception) {
- String messageText = exception.getMessage();
- LOG.debug(messageText, exception);
- try {
- debug.startSection("Exception");
- debug.appendException(exception);
- debug.endSection();
- } catch (final RuntimeException e) {
- debug.appendln("NOTE - an exception occurred while dumping an exception!");
- debug.appendException(e);
- }
- message = messageText == null ? exception.getClass().getName() : messageText;
- }
-
- public DebugBuilder getDebug() {
- return debug;
- }
-
- public void compileError(final RequestContext requestContext) {
- errorRef = Long.toString(System.currentTimeMillis(), 36).toUpperCase();
- LOG.info("error " + errorRef);
-
- captureWarningsAndMessages();
- dumpDebugDetails(requestContext);
- writeErrorFile();
- }
-
- private void captureWarningsAndMessages() {
- // Capture warnings/messages
- if (IsisContext.getCurrentTransaction() != null) {
- final List<String> messages = IsisContext.getMessageBroker().getMessages();
- final List<String> warnings = IsisContext.getMessageBroker().getWarnings();
- if (messages.size() > 0 || messages.size() > 0) {
- debug.startSection("Warnings/Messages");
- for (final String message : messages) {
- debug.appendln("message", message);
- }
- for (final String message : warnings) {
- debug.appendln("warning", message);
- }
- }
- }
- }
-
- private void dumpDebugDetails(final RequestContext requestContext) {
- // Dump page debug details
- requestContext.append(debug);
-
- debug.startSection("Processing Trace");
- debug.appendPreformatted(requestContext.getDebugTrace());
- debug.endSection();
- debug.close();
- }
-
- private void writeErrorFile() {
- LOG.error(message + "\n" + debugText.toString());
-
-
- PrintWriter writer;
- try {
- final String directory =
- IsisContext.getConfiguration().getString(ConfigurationConstants.ROOT + "scimpi.error-snapshots", ".");
- File dir = new File(directory);
- if (!dir.exists()) {
- dir.mkdirs();
- }
- writer = new PrintWriter(new File(dir, "error_" + errorRef + ".html"));
- final DebugHtmlWriter writer2 = new DebugHtmlWriter(writer, true);
- writer2.concat(debugHtml);
- writer2.close();
- writer.close();
- } catch (final FileNotFoundException e) {
- LOG.error("Failed to archive error page", e);
- }
- }
-
- public String getReference() {
- return errorRef;
- }
-
- public String getDetails() {
- return debugHtml.toString();
- }
-
- public String getMessage() {
- return message;
- }
-
-
-}
-
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ForbiddenException.java
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ForbiddenException.java b/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ForbiddenException.java
deleted file mode 100644
index 32d0c0c..0000000
--- a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ForbiddenException.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.scimpi.dispatcher;
-
-import java.util.List;
-
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.metamodel.facetapi.IdentifiedHolder;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-
-/**
- * Indicates that request could not complete as it could not access (for
- * security reasons) some of the content.
- */
-public class ForbiddenException extends ScimpiException {
- private static final long serialVersionUID = 1L;
- public static final boolean VISIBLE_AND_USABLE = true;
- public static final boolean VISIBLE = false;
- private final Identifier identifier;
- private final AuthenticationSession session;
-
- public ForbiddenException(final String message) {
- this(IsisContext.getAuthenticationSession(), message);
- }
-
- private ForbiddenException(final AuthenticationSession session, final String message) {
- super(message + " for " + session.getUserName() + " " + session.getRoles());
- this.session = session;
- identifier = null;
- }
-
- public ForbiddenException(final IdentifiedHolder target, final boolean isVisibleAndUsabable) {
- this(target.getIdentifier(), IsisContext.getAuthenticationSession(), isVisibleAndUsabable);
- }
-
- private ForbiddenException(final Identifier identifier, final AuthenticationSession session, final boolean isVisibleAndUsabable) {
- super((identifier.getType() == Identifier.Type.PROPERTY_OR_COLLECTION ? "Field" : "Action") + " '" + identifier.getMemberName() + "' in " + identifier.getClassName() + " is not " + (isVisibleAndUsabable ? "visible/usable " : "visible") + " for " + session.getUserName() + " "
- + session.getRoles());
- this.identifier = identifier;
- this.session = session;
- }
-
- public Identifier getIdentifier() {
- return identifier;
- }
-
- public List<String> getRoles() {
- return session.getRoles();
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Names.java
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Names.java b/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Names.java
deleted file mode 100644
index 29b15e5..0000000
--- a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Names.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.scimpi.dispatcher;
-
-public interface Names {
- static final String PREFIX = "_logon-";
-
- static final String BUTTON_TITLE = "button-title";
- static final String CANCEL_TO = "cancel-to";
- static final String COLLECTION = "collection";
- static final String CONFIRM = "confirm";
- static final String CLASS = "class";
- static final String CONTAINER_CLASS = "container-" + CLASS;
- static final String DEFAULT = "default";
- static final String ELEMENT_NAME = "element-name";
- static final String ELEMENT = "element";
- static final String EVEN_ROW_CLASS = "even-row";
- static final String FALSE = "false";
- static final String ERROR = "error";
- static final String FIELD = "field";
- static final String FIELD_NAME = "field-name";
- static final String FOOTER = "footer";
- static final String FORM_ID = "form-id";
- static final String FORM_TITLE = "title";
- static final String FORMS = "show-forms";
- static final String HEADER = "header";
- static final String ICON_CLASS = "icon";
- static final String HIDDEN = "hidden";
- static final String HIDE_UNEDITABLE = "hide-uneditable";
- static final String HEADER_LEVEL = "header";
- static final String ID = "id";
- static final String LABEL_DELIMITER = "label";
- static final String LINK_VIEW = "link-view";
- static final String LINK_NAME = "link-name";
- static final String LINK_OBJECT = "link-object";
- static final String METHOD = "method";
- static final String MESSAGE = "message";
- static final String NAME = "name";
- static final String ODD_ROW_CLASS = "odd-row";
- static final String OBJECT = "object";
- static final String PARAMETER = "param";
- static final String PARAMETER_NUMBER = "number";
- static final String PLURAL = "plural";
- static final String REFERENCE_NAME = "reference-name";
- static final String RESULT_NAME = "result-name";
- static final String RESULT_OVERRIDE = "result-override";
- static final String ROW_CLASSES = "row-classes";
- static final String SCOPE = "scope";
- static final String SHOW_ICON = "icon";
- static final String SHOW_SELECT = "select";
- static final String SHOW_EDIT = "edit";
- static final String SHOW_DELETE = "delete";
- static final String SHOW_MESSAGE = "show-message";
- static final String SHOW_TITLE = "show-title";
- static final String TRUNCATE = "truncate";
- static final String TABLE_TITLE = "title";
- static final String TYPE = "type";
- static final String VIEW = "view";
- static final String VALUE = "value";
- static final String VERSION = "version";
- static final String USER = "user";
- static final String VOID = "void";
- static final String WHEN = "when";
- static final String ENTRY_FIELDS = "entry-fields";
-
-
- static final String LOGON_OBJECT = PREFIX + OBJECT;
- static final String LOGON_METHOD = PREFIX + METHOD;
- static final String LOGON_SCOPE = PREFIX + SCOPE;
- static final String LOGON_RESULT_NAME = PREFIX + RESULT_NAME;
- static final String LOGON_FORM_ID = PREFIX + "form-id";
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/NotLoggedInException.java
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/NotLoggedInException.java b/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/NotLoggedInException.java
deleted file mode 100644
index 9cd54a3..0000000
--- a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/NotLoggedInException.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.scimpi.dispatcher;
-
-/**
- * Indicates that request could not complete as a user was not logged in.
- */
-public class NotLoggedInException extends ScimpiException {
- private static final long serialVersionUID = 1L;
-
- public NotLoggedInException() {
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ResolveFieldUtil.java
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ResolveFieldUtil.java b/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ResolveFieldUtil.java
deleted file mode 100644
index a0ae5cf..0000000
--- a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ResolveFieldUtil.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.scimpi.dispatcher;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
-
-import static org.apache.isis.core.commons.ensure.Ensure.ensureThatState;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.notNullValue;
-
-public final class ResolveFieldUtil {
-
- private ResolveFieldUtil(){}
-
- /**
- * Walking the graph.
- *
- * <p>
- * This combines the implementations of both the DN Objectstore
- * and also the in-memory objectstore.
- * </p>
- */
- public static void resolveField(final ObjectAdapter object, final ObjectAssociation association) {
-
-
- // DN impl.
- {
- final ObjectAdapter referencedCollectionAdapter = association.get(object);
-
- // this code originally brought in from the JPA impl, but seems reasonable.
- if (association.isOneToManyAssociation()) {
- ensureThatState(referencedCollectionAdapter, is(notNullValue()));
-
- final Object referencedCollection = referencedCollectionAdapter.getObject();
- ensureThatState(referencedCollection, is(notNullValue()));
-
- // if a proxy collection, then force it to initialize. just 'touching' the object is sufficient.
- // REVIEW: I wonder if this is actually needed; does JDO use proxy collections?
- referencedCollection.hashCode();
- }
-
- // the JPA impl used to also call its lifecycle listener on the referenced collection object, eg List,
- // itself. I don't think this makes sense to do for JDO (the collection is not a PersistenceCapable).
- }
-
- // In-memory objectstore impl
- {
- final ObjectAdapter referenceAdapter = association.get(object);
- referenceAdapter.markAsResolvedIfPossible();
- }
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2c7cfbfe/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ScimpiException.java
----------------------------------------------------------------------
diff --git a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ScimpiException.java b/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ScimpiException.java
deleted file mode 100644
index 18e7646..0000000
--- a/component/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ScimpiException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.scimpi.dispatcher;
-
-public class ScimpiException extends RuntimeException {
- private static final long serialVersionUID = 1L;
-
- public ScimpiException() {
- }
-
- public ScimpiException(final String message) {
- super(message);
- }
-
- public ScimpiException(final Throwable cause) {
- super(cause);
- }
-
- public ScimpiException(final String message, final Throwable cause) {
- super(message, cause);
- }
-
- public String getHtmlMessage() {
- return getMessage();
- }
-
-}