From fb72230bbd65eb2a2afcc0a87a6c459cb0db8407 Mon Sep 17 00:00:00 2001 From: GedMarc Date: Sat, 2 Mar 2024 06:21:21 +0200 Subject: [PATCH] Split of Core and Client --- pom.xml | 103 +- src/jre11/java/.gitignore | 20 - src/jre11/resources/.gitignore | 20 - src/jre8/java/.gitignore | 20 - src/jre8/resources/.gitignore | 20 - .../java/com/jwebmp/core/CSSComponent.java | 2 +- src/main/java/com/jwebmp/core/Component.java | 180 +- src/main/java/com/jwebmp/core/Event.java | 8 +- src/main/java/com/jwebmp/core/Page.java | 1218 ++++---- .../java/com/jwebmp/core/SessionHelper.java | 12 +- .../core/base/ComponentDataBindingBase.java | 12 +- .../jwebmp/core/base/ComponentEventBase.java | 15 +- .../core/base/ComponentHierarchyBase.java | 2483 ++++++++--------- .../jwebmp/core/base/ComponentStyleBase.java | 441 ++- .../com/jwebmp/core/base/ajax/AjaxCall.java | 541 ---- .../base/ajax/AjaxComponentInsertType.java | 69 - .../core/base/ajax/AjaxComponentUpdates.java | 130 - .../jwebmp/core/base/ajax/AjaxResponse.java | 240 -- .../core/base/ajax/AjaxResponseReaction.java | 326 --- .../core/base/ajax/AjaxResponseType.java | 56 - .../core/base/ajax/AlwaysEmptySerializer.java | 45 - .../com/jwebmp/core/base/ajax/HeadersDTO.java | 69 - .../com/jwebmp/core/base/ajax/IAjaxCall.java | 130 - .../jwebmp/core/base/ajax/JsonVariable.java | 323 --- .../base/ajax/ObjectToStringDeserialize.java | 50 - .../jwebmp/core/base/ajax/ReactionType.java | 55 - .../core/base/client/BrowserGroups.java | 53 - .../com/jwebmp/core/base/client/Browsers.java | 291 -- .../jwebmp/core/base/client/CSSVersions.java | 91 - .../jwebmp/core/base/client/HTMLVersions.java | 90 - .../core/base/client/HttpMethodTypes.java | 37 - .../InternetExplorerCompatibilityMode.java | 136 - .../java/com/jwebmp/core/base/html/Body.java | 120 +- .../java/com/jwebmp/core/base/html/Head.java | 24 +- .../java/com/jwebmp/core/base/html/Html.java | 368 +-- .../com/jwebmp/core/base/html/Script.java | 333 +-- .../base/html/attributes/ALinkAttributes.java | 237 -- .../attributes/AbbreviationAttributes.java | 44 - .../html/attributes/AppletAttributes.java | 82 - .../base/html/attributes/AreaAttributes.java | 77 - .../base/html/attributes/AudioAttributes.java | 71 - .../base/html/attributes/BaseAttributes.java | 47 - .../attributes/BiDirectionalDirection.java | 50 - .../BiDirectionalOverrideAttributes.java | 44 - .../html/attributes/BlockQuoteAttributes.java | 49 - .../base/html/attributes/BodyAttributes.java | 40 - .../html/attributes/ButtonAttributes.java | 103 - .../html/attributes/CSSLinkAttributes.java | 84 - .../html/attributes/CanvasAttributes.java | 47 - .../base/html/attributes/CodeAttributes.java | 36 - .../html/attributes/DeletedAttributes.java | 50 - .../attributes/DirectoryListAttributes.java | 47 - .../base/html/attributes/EmbedAttributes.java | 59 - .../base/html/attributes/FormAttributes.java | 87 - .../base/html/attributes/FormMethods.java | 41 - .../html/attributes/GlobalAttributes.java | 141 - .../base/html/attributes/HeaderTypes.java | 96 - .../html/attributes/IFrameAttributes.java | 141 - .../base/html/attributes/ImageAttributes.java | 77 - .../html/attributes/ImageMapAttributes.java | 44 - .../base/html/attributes/InputAttributes.java | 80 - .../attributes/InputButtonTypeAttributes.java | 68 - .../InputCheckBoxTypeAttributes.java | 95 - .../attributes/InputFileTypeAttributes.java | 102 - .../attributes/InputHiddenTypeAttributes.java | 73 - .../attributes/InputImageTypeAttributes.java | 80 - .../InputPasswordTypeAttributes.java | 88 - .../attributes/InputRadioTypeAttributes.java | 90 - .../html/attributes/InputRangeAttributes.java | 53 - .../attributes/InputResetTypeAttributes.java | 81 - .../attributes/InputSearchTypeAttributes.java | 102 - .../attributes/InputSubmitTypeAttributes.java | 92 - .../html/attributes/InputTextAttributes.java | 104 - .../core/base/html/attributes/InputTypes.java | 166 -- .../html/attributes/KeyGenAttributes.java | 80 - .../base/html/attributes/LabelAttributes.java | 53 - .../base/html/attributes/LinkAttributes.java | 167 -- .../base/html/attributes/MetaAttributes.java | 56 - .../base/html/attributes/NoAttributes.java | 40 - .../html/attributes/ObjectAttributes.java | 70 - .../html/attributes/OptionAttributes.java | 47 - .../attributes/OptionGroupAttributes.java | 46 - .../html/attributes/ParagraphAttributes.java | 56 - .../html/attributes/ParameterAttributes.java | 71 - .../attributes/ProgressBarAttributes.java | 49 - .../html/attributes/QuotationAttributes.java | 47 - .../html/attributes/ScriptAttributes.java | 60 - .../html/attributes/SourceAttributes.java | 54 - .../base/html/attributes/StyleAttributes.java | 54 - .../base/html/attributes/TableAttributes.java | 45 - .../html/attributes/TableCellAttributes.java | 45 - .../attributes/TableColumnAttributes.java | 86 - .../html/attributes/TextAreaAttributes.java | 98 - .../base/html/attributes/TimeAttributes.java | 46 - .../base/html/attributes/TrackAttributes.java | 70 - .../base/html/attributes/VideoAttributes.java | 82 - .../html/interfaces/AttributeDefinitions.java | 47 - .../base/html/interfaces/ContainerType.java | 31 - .../core/base/html/interfaces/CssClass.java | 37 - .../html/interfaces/DisplayObjectType.java | 28 - .../base/html/interfaces/DisplayObjects.java | 28 - .../base/html/interfaces/EasingAnimation.java | 30 - .../base/html/interfaces/FeatureEvents.java | 33 - .../base/html/interfaces/GlobalChildren.java | 159 -- .../base/html/interfaces/GlobalFeatures.java | 59 - .../base/html/interfaces/HTMLFeatures.java | 28 - .../base/html/interfaces/InputChoiceType.java | 31 - .../base/html/interfaces/LayoutHandler.java | 30 - .../core/base/html/interfaces/LifeCycle.java | 37 - .../core/base/html/interfaces/NamedPair.java | 46 - .../html/interfaces/NoClassAttribute.java | 29 - .../html/interfaces/NoClosingBracket.java | 28 - .../base/html/interfaces/NoClosingTag.java | 30 - .../core/base/html/interfaces/NoFeatures.java | 30 - .../core/base/html/interfaces/NoIDTag.java | 28 - .../interfaces/NoNewLineBeforeChildren.java | 28 - .../interfaces/NoNewLineBeforeClosingTag.java | 28 - .../html/interfaces/NoNewLineForRawText.java | 30 - .../base/html/interfaces/OneValidTag.java | 30 - .../base/html/interfaces/ResizableEvents.java | 32 - .../children/AbbreviationChildren.java | 30 - .../interfaces/children/AddressChildren.java | 30 - .../interfaces/children/AreaChildren.java | 29 - .../interfaces/children/AudioChildren.java | 28 - .../BiDirectionalOverrideChildren.java | 29 - .../interfaces/children/BodyChildren.java | 33 - .../interfaces/children/BodyFeatures.java | 32 - .../interfaces/children/CodeChildren.java | 27 - .../interfaces/children/DataListChildren.java | 28 - .../children/DefinitionListChildren.java | 27 - .../children/DescriptionListChildren.java | 28 - .../interfaces/children/DetailsChildren.java | 28 - .../children/DirectoryListChildren.java | 28 - .../interfaces/children/FieldSetChildren.java | 28 - .../interfaces/children/FigureChildren.java | 28 - .../interfaces/children/FormChildren.java | 28 - .../interfaces/children/HeadChildren.java | 32 - .../interfaces/children/HeaderChildren.java | 28 - .../children/HeaderGroupChildren.java | 28 - .../interfaces/children/HtmlChildren.java | 32 - .../interfaces/children/ImageMapChildren.java | 32 - .../interfaces/children/ImageMapFeatures.java | 32 - .../interfaces/children/ListChildren.java | 32 - .../interfaces/children/ListItemChildren.java | 32 - .../html/interfaces/children/MapChildren.java | 32 - .../html/interfaces/children/NoChildren.java | 28 - .../children/ObjectTagChildren.java | 28 - .../interfaces/children/PageChildren.java | 31 - .../interfaces/children/PhraseChildren.java | 30 - .../interfaces/children/RubyChildren.java | 29 - .../interfaces/children/SelectChildren.java | 29 - .../children/TableBodyGroupChildren.java | 29 - .../interfaces/children/TableChildren.java | 33 - .../children/TableColumnGroupChildren.java | 29 - .../children/TableFooterGroupChildren.java | 29 - .../children/TableHeaderGroupChildren.java | 34 - .../interfaces/children/TableRowChildren.java | 27 - .../interfaces/children/VideoChildren.java | 29 - .../children/generics/ParagraphChildren.java | 30 - .../html/interfaces/events/BodyEvents.java | 34 - .../html/interfaces/events/GlobalEvents.java | 36 - .../base/html/interfaces/events/NoEvents.java | 33 - .../interfaces/events/ParagraphEvents.java | 29 - .../core/base/interfaces/IComponentBase.java | 196 -- .../interfaces/IComponentDataBindingBase.java | 126 - .../interfaces/IComponentDependencyBase.java | 130 - .../base/interfaces/IComponentEventBase.java | 132 - .../interfaces/IComponentFeatureBase.java | 178 -- .../IComponentHTMLAttributeBase.java | 292 -- .../base/interfaces/IComponentHTMLBase.java | 195 -- .../interfaces/IComponentHTMLOptionsBase.java | 136 - .../interfaces/IComponentHierarchyBase.java | 361 --- .../base/interfaces/IComponentStyleBase.java | 215 -- .../base/interfaces/IComponentThemeBase.java | 115 - .../interfaces/IContentSecurityPolicy.java | 36 - .../core/base/interfaces/ICssClassName.java | 28 - .../core/base/interfaces/ICssStructure.java | 134 - .../jwebmp/core/base/interfaces/IIcon.java | 38 - .../page/CSSLinksInsertPageConfigurator.java | 15 +- .../page/ScriptsDynamicPageConfigurator.java | 35 +- .../page/ScriptsInsertPageConfigurator.java | 17 +- ...TopShelfScriptsInsertPageConfigurator.java | 4 +- .../core/base/references/CSSReference.java | 102 - .../base/references/JavascriptReference.java | 232 -- .../base/servlets/AjaxReceiverServlet.java | 2 +- .../jwebmp/core/base/servlets/CSSServlet.java | 5 +- .../core/base/servlets/DataServlet.java | 2 +- .../core/base/servlets/JWDefaultServlet.java | 13 +- .../core/base/servlets/JWScriptServlet.java | 8 +- .../core/base/servlets/JWebMPServlet.java | 7 +- .../core/base/servlets/JavaScriptServlet.java | 7 +- .../servlets/enumarations/ComponentTypes.java | 580 ---- .../enumarations/DevelopmentEnvironments.java | 102 - .../servlets/enumarations/Orientation.java | 37 - .../enumarations/RequirementsPriority.java | 73 - .../base/servlets/interfaces/IComponent.java | 27 - .../servlets/interfaces/IDataComponent.java | 34 - .../base/servlets/interfaces/IFeature.java | 35 - .../servlets/interfaces/IReferencePool.java | 64 - .../core/base/servlets/interfaces/Loader.java | 27 - .../servlets/interfaces/ReferencePool.java | 28 - .../core/events/activate/ActivateAdapter.java | 10 +- .../beforeactivate/BeforeActivateAdapter.java | 10 +- .../beforeclose/BeforeCloseAdapter.java | 10 +- .../events/beforeload/BeforeLoadAdapter.java | 10 +- .../events/beforestop/BeforeStopAdapter.java | 10 +- .../jwebmp/core/events/blur/BlurAdapter.java | 10 +- .../buttonclick/ButtonClickAdapter.java | 10 +- .../core/events/cancel/CancelAdapter.java | 10 +- .../core/events/change/ChangeAdapter.java | 10 +- .../core/events/checked/CheckedAdapter.java | 10 +- .../core/events/click/ClickAdapter.java | 10 +- .../core/events/close/CloseAdapter.java | 10 +- .../core/events/complete/CompleteAdapter.java | 10 +- .../core/events/create/CreateAdapter.java | 10 +- .../events/deactivate/DeactivateAdapter.java | 10 +- .../jwebmp/core/events/drag/DragAdapter.java | 10 +- .../events/dragstart/DragStartAdapter.java | 10 +- .../core/events/dragstop/DragStopAdapter.java | 10 +- .../jwebmp/core/events/drop/DropAdapter.java | 10 +- .../core/events/dropout/DropOutAdapter.java | 10 +- .../core/events/dropover/DropOverAdapter.java | 10 +- .../core/events/focus/FocusAdapter.java | 10 +- .../core/events/keydown/KeyDownAdapter.java | 10 +- .../events/keypressed/KeyPressedAdapter.java | 10 +- .../core/events/keyup/KeyUpAdapter.java | 10 +- .../jwebmp/core/events/load/LoadAdapter.java | 10 +- .../events/mousedown/MouseDownAdapter.java | 10 +- .../events/mouseenter/MouseEnterAdapter.java | 10 +- .../events/mousemove/MouseMoveAdapter.java | 10 +- .../core/events/mouseout/MouseOutAdapter.java | 10 +- .../events/mouseover/MouseOverAdapter.java | 10 +- .../core/events/mouseup/MouseUpAdapter.java | 10 +- .../jwebmp/core/events/open/OpenAdapter.java | 10 +- .../core/events/receive/ReceiveAdapter.java | 10 +- .../core/events/remove/RemoveAdapter.java | 10 +- .../core/events/resize/ResizeAdapter.java | 10 +- .../resizestart/ResizeStartAdapter.java | 10 +- .../events/resizestop/ResizeStopAdapter.java | 10 +- .../core/events/response/ResponseAdapter.java | 10 +- .../events/rightclick/RightClickAdapter.java | 10 +- .../core/events/search/SearchAdapter.java | 10 +- .../core/events/select/SelectAdapter.java | 10 +- .../core/events/selected/SelectedAdapter.java | 10 +- .../events/selecting/SelectingAdapter.java | 10 +- .../core/events/slide/SlideAdapter.java | 10 +- .../jwebmp/core/events/sort/SortAdapter.java | 10 +- .../jwebmp/core/events/spin/SpinAdapter.java | 10 +- .../core/events/start/StartAdapter.java | 10 +- .../jwebmp/core/events/stop/StopAdapter.java | 10 +- .../core/events/submit/SubmitAdapter.java | 10 +- .../events/unselected/UnselectedAdapter.java | 10 +- .../core/events/update/UpdateAdapter.java | 10 +- .../jwebmp/core/generics/CompassPoints.java | 79 - .../com/jwebmp/core/generics/Direction.java | 47 - .../core/generics/HorizontalOrVertical.java | 13 - .../core/generics/LatitudeLongitueArray.java | 50 - .../com/jwebmp/core/generics/LeftOrRight.java | 59 - .../java/com/jwebmp/core/generics/Pair.java | 157 -- .../com/jwebmp/core/generics/Positions.java | 61 - .../com/jwebmp/core/generics/TopOrBottom.java | 59 - .../jwebmp/core/generics/WebReference.java | 728 ----- .../com/jwebmp/core/generics/XYObject.java | 141 - .../com/jwebmp/core/htmlbuilder/css/CSS.java | 2 +- .../core/htmlbuilder/css/CSSDetail.java | 2 +- .../core/htmlbuilder/css/CSSEnumeration.java | 70 - .../jwebmp/core/htmlbuilder/css/CSSImpl.java | 3 +- .../htmlbuilder/css/CSSPropertiesFactory.java | 4 +- .../css/animatable/AnimateCSS.java | 2 +- .../css/annotations/CSSAnnotationType.java | 34 - .../annotations/CSSImplementationAdapter.java | 14 +- .../css/annotations/CustomCSS.java | 3 +- .../css/backgrounds/Background.java | 2 +- .../backgrounds/BackgroundAttachments.java | 2 +- .../css/backgrounds/BackgroundBlendMode.java | 2 +- .../css/backgrounds/BackgroundCSS.java | 2 +- .../css/backgrounds/BackgroundClip.java | 2 +- .../css/backgrounds/BackgroundOrigins.java | 2 +- .../css/backgrounds/BackgroundPositions.java | 4 +- .../css/backgrounds/BackgroundSizes.java | 2 +- .../core/htmlbuilder/css/borders/Border.java | 2 +- .../css/borders/BorderBottomCSS.java | 2 +- .../htmlbuilder/css/borders/BorderCSS.java | 2 +- .../css/borders/BorderLeftCSS.java | 2 +- .../css/borders/BorderRightCSS.java | 2 +- .../htmlbuilder/css/borders/BorderTopCSS.java | 2 +- .../htmlbuilder/css/colours/ColourCSS.java | 2 +- .../htmlbuilder/css/colours/ColourNames.java | 2 +- .../htmlbuilder/css/colours/ColourRGB.java | 2 +- .../htmlbuilder/css/colours/ColourRGBA.java | 2 +- .../htmlbuilder/css/colours/CssColour.java | 4 +- .../htmlbuilder/css/displays/Cursors.java | 4 +- .../htmlbuilder/css/displays/DisplayCSS.java | 2 +- .../htmlbuilder/css/displays/Displays.java | 4 +- .../core/htmlbuilder/css/displays/Floats.java | 2 +- .../htmlbuilder/css/displays/Overflows.java | 4 +- .../htmlbuilder/css/displays/Positions.java | 4 +- .../css/enumarations/BorderStyles.java | 91 - .../css/enumarations/CSSTypePosition.java | 35 - .../css/enumarations/CSSTypes.java | 154 - .../enumarations/CssSelectorChainItem.java | 100 - .../css/enumarations/MarginSetting.java | 52 - .../htmlbuilder/css/enumarations/Repeats.java | 120 - .../htmlbuilder/css/fonts/FontFamilies.java | 2 +- .../htmlbuilder/css/fonts/FontStyles.java | 2 +- .../htmlbuilder/css/fonts/FontVariants.java | 2 +- .../htmlbuilder/css/fonts/FontWeights.java | 2 +- .../core/htmlbuilder/css/fonts/FontsCSS.java | 2 +- .../css/heightwidth/HeightSetting.java | 2 +- .../css/heightwidth/HeightWidthCSS.java | 2 +- .../css/heightwidth/WidthSetting.java | 2 +- .../core/htmlbuilder/css/image/ImageCSS.java | 2 +- .../core/htmlbuilder/css/image/ImagesCSS.java | 2 +- .../core/htmlbuilder/css/interfaces/ICss.java | 2 +- .../htmlbuilder/css/interfaces/LinkCSS.java | 2 +- .../css/interfaces/NameValuePairCSS.java | 2 +- .../core/htmlbuilder/css/lists/ListCSS.java | 2 +- .../css/lists/ListStylePosition.java | 2 +- .../htmlbuilder/css/lists/ListStyleType.java | 2 +- .../core/htmlbuilder/css/margins/Margin.java | 2 +- .../htmlbuilder/css/margins/MarginsCSS.java | 2 +- .../css/measurement/MeasurementCSS.java | 2 +- .../css/measurement/MeasurementTypes.java | 2 +- .../htmlbuilder/css/outline/OutlineCSS.java | 2 +- .../core/htmlbuilder/css/padding/Padding.java | 2 +- .../htmlbuilder/css/padding/PaddingCSS.java | 2 +- .../css/padding/PaddingSetting.java | 2 +- .../css/tables/TableBorderCollapse.java | 4 +- .../core/htmlbuilder/css/tables/TableCSS.java | 2 +- .../css/tables/TableCaptionSides.java | 4 +- .../css/tables/TableEmptyCells.java | 4 +- .../htmlbuilder/css/tables/TableLayouts.java | 4 +- .../htmlbuilder/css/text/TextAlignments.java | 2 +- .../core/htmlbuilder/css/text/TextCSS.java | 2 +- .../htmlbuilder/css/text/TextDecorations.java | 2 +- .../htmlbuilder/css/text/TextDirections.java | 2 +- .../htmlbuilder/css/text/TextShadows.java | 2 +- .../htmlbuilder/css/text/TextTransforms.java | 2 +- .../htmlbuilder/css/text/UnicodeBidis.java | 2 +- .../css/text/VerticalAlignments.java | 2 +- .../htmlbuilder/css/text/WhiteSpacing.java | 2 +- .../core/htmlbuilder/css/themes/ITheme.java | 66 - .../core/htmlbuilder/css/themes/Theme.java | 237 -- .../htmlbuilder/javascript/FunctionPart.java | 45 - .../core/htmlbuilder/javascript/JSONPart.java | 48 - .../javascript/JavaScriptPart.java | 436 --- .../javascript/JavascriptFunction.java | 60 - .../javascript/JavascriptLiteralFunction.java | 163 -- .../javascript/JavascriptPartType.java | 42 - .../javascript/JavascriptTypes.java | 12 - .../events/enumerations/EventTypes.java | 12 +- .../javascript/events/interfaces/IEvent.java | 43 - .../JWebMPDynamicScriptRenderer.java | 126 +- ...JWebMPJavaScriptDynamicScriptRenderer.java | 33 +- .../JWebMPServicesBindings.java | 23 +- .../implementations/JWebMPSiteBinder.java | 10 +- .../core/implementations/PageProvider.java | 39 +- .../ReadableUserAgentProvider.java | 8 +- .../jwebmp/core/services/DefaultRenderer.java | 24 - .../services/IDynamicRenderingServlet.java | 45 - .../com/jwebmp/core/services/IErrorPage.java | 20 - .../java/com/jwebmp/core/services/IPage.java | 75 - .../core/services/IPageConfigurator.java | 25 - .../core/services/IRegularExpressions.java | 21 - .../services/RenderAfterDynamicScripts.java | 29 - .../core/services/RenderAfterLinks.java | 27 - .../core/services/RenderAfterScripts.java | 29 - .../services/RenderBeforeDynamicScripts.java | 28 - .../core/services/RenderBeforeLinks.java | 27 - .../core/services/RenderBeforeScripts.java | 28 - .../regex/RegularExpressionsDTO.java | 8 +- .../JWebMPInterceptionBinder.java | 12 +- src/main/java/module-info.java | 59 +- ...edinjection.interfaces.IGuiceDefaultBinder | 2 +- ...ee.guicedinjection.interfaces.IGuiceModule | 2 +- src/test/java/com/jwebmp/BaseTestClass.java | 54 +- src/test/java/com/jwebmp/PlaceHolderTest.java | 16 +- .../jwebmp/core/base/ajax/AjaxCallTest.java | 41 - .../core/base/ajax/AjaxResponseTest.java | 59 - .../references/JavascriptReferenceTest.java | 26 - .../javascript/JavaScriptPartImpl.java | 22 - .../javascript/JavaScriptPartTest.java | 44 - .../core/htmlbuilder/javascript/Tutorial.java | 57 - .../InstanceManagementPageTest.java | 61 +- 384 files changed, 3238 insertions(+), 20346 deletions(-) delete mode 100644 src/jre11/java/.gitignore delete mode 100644 src/jre11/resources/.gitignore delete mode 100644 src/jre8/java/.gitignore delete mode 100644 src/jre8/resources/.gitignore delete mode 100644 src/main/java/com/jwebmp/core/base/ajax/AjaxCall.java delete mode 100644 src/main/java/com/jwebmp/core/base/ajax/AjaxComponentInsertType.java delete mode 100644 src/main/java/com/jwebmp/core/base/ajax/AjaxComponentUpdates.java delete mode 100644 src/main/java/com/jwebmp/core/base/ajax/AjaxResponse.java delete mode 100644 src/main/java/com/jwebmp/core/base/ajax/AjaxResponseReaction.java delete mode 100644 src/main/java/com/jwebmp/core/base/ajax/AjaxResponseType.java delete mode 100644 src/main/java/com/jwebmp/core/base/ajax/AlwaysEmptySerializer.java delete mode 100644 src/main/java/com/jwebmp/core/base/ajax/HeadersDTO.java delete mode 100644 src/main/java/com/jwebmp/core/base/ajax/IAjaxCall.java delete mode 100644 src/main/java/com/jwebmp/core/base/ajax/JsonVariable.java delete mode 100644 src/main/java/com/jwebmp/core/base/ajax/ObjectToStringDeserialize.java delete mode 100644 src/main/java/com/jwebmp/core/base/ajax/ReactionType.java delete mode 100644 src/main/java/com/jwebmp/core/base/client/BrowserGroups.java delete mode 100644 src/main/java/com/jwebmp/core/base/client/Browsers.java delete mode 100644 src/main/java/com/jwebmp/core/base/client/CSSVersions.java delete mode 100644 src/main/java/com/jwebmp/core/base/client/HTMLVersions.java delete mode 100644 src/main/java/com/jwebmp/core/base/client/HttpMethodTypes.java delete mode 100644 src/main/java/com/jwebmp/core/base/client/InternetExplorerCompatibilityMode.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/ALinkAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/AbbreviationAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/AppletAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/AreaAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/AudioAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/BaseAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/BiDirectionalDirection.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/BiDirectionalOverrideAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/BlockQuoteAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/BodyAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/ButtonAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/CSSLinkAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/CanvasAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/CodeAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/DeletedAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/DirectoryListAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/EmbedAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/FormAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/FormMethods.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/GlobalAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/HeaderTypes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/IFrameAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/ImageAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/ImageMapAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/InputAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/InputButtonTypeAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/InputCheckBoxTypeAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/InputFileTypeAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/InputHiddenTypeAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/InputImageTypeAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/InputPasswordTypeAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/InputRadioTypeAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/InputRangeAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/InputResetTypeAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/InputSearchTypeAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/InputSubmitTypeAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/InputTextAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/InputTypes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/KeyGenAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/LabelAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/LinkAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/MetaAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/NoAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/ObjectAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/OptionAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/OptionGroupAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/ParagraphAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/ParameterAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/ProgressBarAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/QuotationAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/ScriptAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/SourceAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/StyleAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/TableAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/TableCellAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/TableColumnAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/TextAreaAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/TimeAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/TrackAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/attributes/VideoAttributes.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/AttributeDefinitions.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/ContainerType.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/CssClass.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/DisplayObjectType.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/DisplayObjects.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/EasingAnimation.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/FeatureEvents.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/GlobalChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/GlobalFeatures.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/HTMLFeatures.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/InputChoiceType.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/LayoutHandler.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/LifeCycle.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/NamedPair.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/NoClassAttribute.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/NoClosingBracket.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/NoClosingTag.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/NoFeatures.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/NoIDTag.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/NoNewLineBeforeChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/NoNewLineBeforeClosingTag.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/NoNewLineForRawText.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/OneValidTag.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/ResizableEvents.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/AbbreviationChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/AddressChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/AreaChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/AudioChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/BiDirectionalOverrideChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/BodyChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/BodyFeatures.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/CodeChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/DataListChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/DefinitionListChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/DescriptionListChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/DetailsChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/DirectoryListChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/FieldSetChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/FigureChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/FormChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/HeadChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/HeaderChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/HeaderGroupChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/HtmlChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/ImageMapChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/ImageMapFeatures.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/ListChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/ListItemChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/MapChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/NoChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/ObjectTagChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/PageChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/PhraseChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/RubyChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/SelectChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/TableBodyGroupChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/TableChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/TableColumnGroupChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/TableFooterGroupChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/TableHeaderGroupChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/TableRowChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/VideoChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/children/generics/ParagraphChildren.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/events/BodyEvents.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/events/GlobalEvents.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/events/NoEvents.java delete mode 100644 src/main/java/com/jwebmp/core/base/html/interfaces/events/ParagraphEvents.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/IComponentBase.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/IComponentDataBindingBase.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/IComponentDependencyBase.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/IComponentEventBase.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/IComponentFeatureBase.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/IComponentHTMLAttributeBase.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/IComponentHTMLBase.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/IComponentHTMLOptionsBase.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/IComponentHierarchyBase.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/IComponentStyleBase.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/IComponentThemeBase.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/IContentSecurityPolicy.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/ICssClassName.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/ICssStructure.java delete mode 100644 src/main/java/com/jwebmp/core/base/interfaces/IIcon.java delete mode 100644 src/main/java/com/jwebmp/core/base/references/CSSReference.java delete mode 100644 src/main/java/com/jwebmp/core/base/references/JavascriptReference.java delete mode 100644 src/main/java/com/jwebmp/core/base/servlets/enumarations/ComponentTypes.java delete mode 100644 src/main/java/com/jwebmp/core/base/servlets/enumarations/DevelopmentEnvironments.java delete mode 100644 src/main/java/com/jwebmp/core/base/servlets/enumarations/Orientation.java delete mode 100644 src/main/java/com/jwebmp/core/base/servlets/enumarations/RequirementsPriority.java delete mode 100644 src/main/java/com/jwebmp/core/base/servlets/interfaces/IComponent.java delete mode 100644 src/main/java/com/jwebmp/core/base/servlets/interfaces/IDataComponent.java delete mode 100644 src/main/java/com/jwebmp/core/base/servlets/interfaces/IFeature.java delete mode 100644 src/main/java/com/jwebmp/core/base/servlets/interfaces/IReferencePool.java delete mode 100644 src/main/java/com/jwebmp/core/base/servlets/interfaces/Loader.java delete mode 100644 src/main/java/com/jwebmp/core/base/servlets/interfaces/ReferencePool.java delete mode 100644 src/main/java/com/jwebmp/core/generics/CompassPoints.java delete mode 100644 src/main/java/com/jwebmp/core/generics/Direction.java delete mode 100644 src/main/java/com/jwebmp/core/generics/HorizontalOrVertical.java delete mode 100644 src/main/java/com/jwebmp/core/generics/LatitudeLongitueArray.java delete mode 100644 src/main/java/com/jwebmp/core/generics/LeftOrRight.java delete mode 100644 src/main/java/com/jwebmp/core/generics/Pair.java delete mode 100644 src/main/java/com/jwebmp/core/generics/Positions.java delete mode 100644 src/main/java/com/jwebmp/core/generics/TopOrBottom.java delete mode 100644 src/main/java/com/jwebmp/core/generics/WebReference.java delete mode 100644 src/main/java/com/jwebmp/core/generics/XYObject.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/css/CSSEnumeration.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/css/annotations/CSSAnnotationType.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/BorderStyles.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/CSSTypePosition.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/CSSTypes.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/CssSelectorChainItem.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/MarginSetting.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/Repeats.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/css/themes/ITheme.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/css/themes/Theme.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/javascript/FunctionPart.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/javascript/JSONPart.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavaScriptPart.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptFunction.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptLiteralFunction.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptPartType.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptTypes.java delete mode 100644 src/main/java/com/jwebmp/core/htmlbuilder/javascript/events/interfaces/IEvent.java rename src/main/java/com/jwebmp/core/{services => implementations}/JWebMPServicesBindings.java (82%) delete mode 100644 src/main/java/com/jwebmp/core/services/DefaultRenderer.java delete mode 100644 src/main/java/com/jwebmp/core/services/IDynamicRenderingServlet.java delete mode 100644 src/main/java/com/jwebmp/core/services/IErrorPage.java delete mode 100644 src/main/java/com/jwebmp/core/services/IPage.java delete mode 100644 src/main/java/com/jwebmp/core/services/IPageConfigurator.java delete mode 100644 src/main/java/com/jwebmp/core/services/IRegularExpressions.java delete mode 100644 src/main/java/com/jwebmp/core/services/RenderAfterDynamicScripts.java delete mode 100644 src/main/java/com/jwebmp/core/services/RenderAfterLinks.java delete mode 100644 src/main/java/com/jwebmp/core/services/RenderAfterScripts.java delete mode 100644 src/main/java/com/jwebmp/core/services/RenderBeforeDynamicScripts.java delete mode 100644 src/main/java/com/jwebmp/core/services/RenderBeforeLinks.java delete mode 100644 src/main/java/com/jwebmp/core/services/RenderBeforeScripts.java delete mode 100644 src/test/java/com/jwebmp/core/base/ajax/AjaxCallTest.java delete mode 100644 src/test/java/com/jwebmp/core/base/ajax/AjaxResponseTest.java delete mode 100644 src/test/java/com/jwebmp/core/base/references/JavascriptReferenceTest.java delete mode 100644 src/test/java/com/jwebmp/core/htmlbuilder/javascript/JavaScriptPartImpl.java delete mode 100644 src/test/java/com/jwebmp/core/htmlbuilder/javascript/JavaScriptPartTest.java delete mode 100644 src/test/java/com/jwebmp/core/htmlbuilder/javascript/Tutorial.java diff --git a/pom.xml b/pom.xml index 3679c4f1f..352efa16b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.jwebmp - jwebmp-parent + parent 2.0.0-SNAPSHOT @@ -21,11 +21,15 @@ /JWebMP/Core true - false + + com.jwebmp.client + jwebmp-client + + com.jwebmp.core jwebmp-testlib @@ -45,6 +49,7 @@ com.guicedee guice-injection + test @@ -133,82 +138,26 @@ - - - src/main/webapp - - **/*.js - **/*.json - **/*.css - **/*.min - **/*.html - **/*.htm - **/*.txt - **/*.sql - - - - src/main/java - - **/*.js - **/*.json - **/*.css - **/*.min - **/*.html - **/*.htm - **/*.txt - **/*.sql - - - - src/main/resources - - **/*.gzip - **/*.map - **/*.md - **/*.md - **/package.json - **/bower.json - **/.bower.json - **/.gitignore - **/.jshint - **/.jshint - **/Gruntfile.js - **/*.sh - - - - src/main/java - - **/*.java - **/*.xml - **/*.txt - - - jar-resources - ${project.build.outputDirectory}/META-INF/resources/ - - **/*.gzip - **/*.md - **/*.md - **/package.json - **/bower.json - **/.bower.json - **/.gitignore - **/.jshint - **/.jshint - **/Gruntfile.js - **/*.sh - - - - - + - diff --git a/src/jre11/java/.gitignore b/src/jre11/java/.gitignore deleted file mode 100644 index 64dbbd5db..000000000 --- a/src/jre11/java/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -/build/ -/dist/ -Thumbs.db -/javadoc/ -/.jacocoverage/ -/build -/target/ -/out/ -/**/.sonar/ -**.jacocoverage/ -**/*.iml -*.iml -**/*.tloh -**/*.tlog -**/*.db -**/*.project -**/*.factorypath -**/*.flattened-pom.xml -**/flatter.pom -flatter.pom**/*.classpath \ No newline at end of file diff --git a/src/jre11/resources/.gitignore b/src/jre11/resources/.gitignore deleted file mode 100644 index 64dbbd5db..000000000 --- a/src/jre11/resources/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -/build/ -/dist/ -Thumbs.db -/javadoc/ -/.jacocoverage/ -/build -/target/ -/out/ -/**/.sonar/ -**.jacocoverage/ -**/*.iml -*.iml -**/*.tloh -**/*.tlog -**/*.db -**/*.project -**/*.factorypath -**/*.flattened-pom.xml -**/flatter.pom -flatter.pom**/*.classpath \ No newline at end of file diff --git a/src/jre8/java/.gitignore b/src/jre8/java/.gitignore deleted file mode 100644 index 64dbbd5db..000000000 --- a/src/jre8/java/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -/build/ -/dist/ -Thumbs.db -/javadoc/ -/.jacocoverage/ -/build -/target/ -/out/ -/**/.sonar/ -**.jacocoverage/ -**/*.iml -*.iml -**/*.tloh -**/*.tlog -**/*.db -**/*.project -**/*.factorypath -**/*.flattened-pom.xml -**/flatter.pom -flatter.pom**/*.classpath \ No newline at end of file diff --git a/src/jre8/resources/.gitignore b/src/jre8/resources/.gitignore deleted file mode 100644 index 64dbbd5db..000000000 --- a/src/jre8/resources/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -/build/ -/dist/ -Thumbs.db -/javadoc/ -/.jacocoverage/ -/build -/target/ -/out/ -/**/.sonar/ -**.jacocoverage/ -**/*.iml -*.iml -**/*.tloh -**/*.tlog -**/*.db -**/*.project -**/*.factorypath -**/*.flattened-pom.xml -**/flatter.pom -flatter.pom**/*.classpath \ No newline at end of file diff --git a/src/main/java/com/jwebmp/core/CSSComponent.java b/src/main/java/com/jwebmp/core/CSSComponent.java index 9140e868e..f401a507f 100644 --- a/src/main/java/com/jwebmp/core/CSSComponent.java +++ b/src/main/java/com/jwebmp/core/CSSComponent.java @@ -36,7 +36,7 @@ * @since 2015/04/24 */ public class CSSComponent> - extends Component, NoAttributes, GlobalFeatures, GlobalEvents, J> + extends Component implements GlobalChildren { /** diff --git a/src/main/java/com/jwebmp/core/Component.java b/src/main/java/com/jwebmp/core/Component.java index f32a014ec..5f09fcbd5 100644 --- a/src/main/java/com/jwebmp/core/Component.java +++ b/src/main/java/com/jwebmp/core/Component.java @@ -23,10 +23,12 @@ import com.jwebmp.core.base.html.interfaces.GlobalChildren; import com.jwebmp.core.base.html.interfaces.GlobalFeatures; import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; +import com.jwebmp.core.base.interfaces.CastableComponent; import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; import com.jwebmp.core.base.interfaces.ICssStructure; import com.jwebmp.core.base.servlets.enumarations.ComponentTypes; +import com.jwebmp.core.base.servlets.interfaces.*; import jakarta.validation.constraints.NotNull; /** @@ -46,97 +48,89 @@ */ @SuppressWarnings("MissingClassJavaDoc") public class Component & AttributeDefinitions, - F extends GlobalFeatures, - E extends GlobalEvents, - J extends Component> - extends ComponentStyleBase - implements ICssStructure -{ - /** - * Don't setup anything constructor - dangerous - */ - public Component() - { - this("notspecified", ComponentTypes.Span); - } - - /** - * Construct a new Component with a custom tag - *

- * - * @param tagName The tag to apply - * @param myComponent The HTML component rendering for - */ - public Component(String tagName, ComponentTypes myComponent) - { - this(tagName, myComponent, false); - } - - /** - * Constructs a component with the tag name, it's associated base HTML component, and whether it closes in line or not - *

- * - * @param tagName The tag name to apply - * @param myComponent The component enumeration applied with this component - * @param inlineTagClose Whether or not to close the tag InLine or not - */ - public Component(String tagName, ComponentTypes myComponent, boolean inlineTagClose) - { - super(myComponent); - setTag(tagName); - setInlineClosingTag(inlineTagClose); - } - - /** - * Construct a new Component with a custom tag - *

- * - * @param myComponent The HTML component rendering for - */ - public Component(ComponentTypes myComponent) - { - this(myComponent.getComponentTag(), myComponent, false); - } - - /** - * Adds a paragraph component with the attached text - *

- * - * @param textToAdd The text to add - *

- * @return The new paragraph component - */ - @Override - @SuppressWarnings("unchecked") - @NotNull - public J add(@NotNull String textToAdd) - { - Paragraph p = new Paragraph<>(); - p.setText(textToAdd); - add((C) p); - return (J) this; - } - - @SuppressWarnings({"unused", "unchecked"}) - @NotNull - public J add(String textToAdd, boolean inline) - { - Span p = new Span<>(); - p.setText(textToAdd); - add((C) p); - return (J) this; - } - - /** - * Returns this component with all the shortcuts for CSS - * - * @return The CSS Set of a component - */ - @SuppressWarnings("unused") - @NotNull - public ICssStructure asCSS() - { - return this; - } - + F extends GlobalFeatures, + E extends GlobalEvents, + J extends Component> + extends ComponentStyleBase + implements ICssStructure, IComponent { + /** + * Don't setup anything constructor - dangerous + */ + public Component() { + this("notspecified", ComponentTypes.Span); + } + + /** + * Construct a new Component with a custom tag + *

+ * + * @param tagName The tag to apply + * @param myComponent The HTML component rendering for + */ + public Component(String tagName, ComponentTypes myComponent) { + this(tagName, myComponent, false); + } + + /** + * Constructs a component with the tag name, it's associated base HTML component, and whether it closes in line or not + *

+ * + * @param tagName The tag name to apply + * @param myComponent The component enumeration applied with this component + * @param inlineTagClose Whether or not to close the tag InLine or not + */ + public Component(String tagName, ComponentTypes myComponent, boolean inlineTagClose) { + super(myComponent); + setTag(tagName); + setInlineClosingTag(inlineTagClose); + } + + /** + * Construct a new Component with a custom tag + *

+ * + * @param myComponent The HTML component rendering for + */ + public Component(ComponentTypes myComponent) { + this(myComponent.getComponentTag(), myComponent, false); + } + + /** + * Adds a paragraph component with the attached text + *

+ * + * @param textToAdd The text to add + *

+ * @return The new paragraph component + */ + @Override + @SuppressWarnings("unchecked") + @NotNull + public J add(@NotNull String textToAdd) { + Paragraph p = new Paragraph<>(); + p.setText(textToAdd); + add((C) p); + return (J) this; + } + + @SuppressWarnings({"unused", "unchecked"}) + @NotNull + public J add(String textToAdd, boolean inline) { + Span p = new Span<>(); + p.setText(textToAdd); + add((C) p); + return (J) this; + } + + /** + * Returns this component with all the shortcuts for CSS + * + * @return The CSS Set of a component + */ + @SuppressWarnings("unused") + @NotNull + public ICssStructure asCSS() { + return this; + } + } diff --git a/src/main/java/com/jwebmp/core/Event.java b/src/main/java/com/jwebmp/core/Event.java index 1d3feb48c..bdb43b666 100644 --- a/src/main/java/com/jwebmp/core/Event.java +++ b/src/main/java/com/jwebmp/core/Event.java @@ -17,7 +17,8 @@ package com.jwebmp.core; import com.fasterxml.jackson.annotation.JsonInclude; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.guicedee.services.jsonrepresentation.json.StaticStrings; import com.jwebmp.core.base.ComponentEventBase; import com.jwebmp.core.base.ajax.AjaxCall; @@ -106,8 +107,9 @@ public Event(String name, EventTypes eventType, IComponentHierarchyBase com setEventType(eventType); @SuppressWarnings("rawtypes") - Set eventConfiguratorSet = GuiceContext.instance() - .getLoader(IEventConfigurator.class, ServiceLoader.load(IEventConfigurator.class)); + Set eventConfiguratorSet = IGuiceContext + .instance() + .getLoader(IEventConfigurator.class, ServiceLoader.load(IEventConfigurator.class)); for (IEventConfigurator iEventConfigurator : eventConfiguratorSet) { diff --git a/src/main/java/com/jwebmp/core/Page.java b/src/main/java/com/jwebmp/core/Page.java index 7bef227c6..7aa00180c 100644 --- a/src/main/java/com/jwebmp/core/Page.java +++ b/src/main/java/com/jwebmp/core/Page.java @@ -18,17 +18,20 @@ import com.google.inject.OutOfScopeException; import com.google.inject.ProvisionException; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.annotations.PageConfiguration; import com.jwebmp.core.base.ComponentDependencyBase; import com.jwebmp.core.base.ContentSecurityPolicy; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; +import com.jwebmp.core.base.client.Browsers; import com.jwebmp.core.base.client.InternetExplorerCompatibilityMode; import com.jwebmp.core.base.html.*; import com.jwebmp.core.base.html.attributes.ScriptAttributes; import com.jwebmp.core.base.html.interfaces.children.BodyChildren; import com.jwebmp.core.base.html.interfaces.children.HtmlChildren; +import com.jwebmp.core.base.html.interfaces.children.PageChildren; import com.jwebmp.core.base.interfaces.IComponentFeatureBase; import com.jwebmp.core.base.references.CSSReference; import com.jwebmp.core.base.references.JavascriptReference; @@ -47,7 +50,7 @@ import static com.guicedee.services.jsonrepresentation.json.StaticStrings.STRING_SEMICOLON; import static com.jwebmp.core.implementations.ReadableUserAgentProvider.defaultAgent; -import static com.jwebmp.core.services.JWebMPServicesBindings.IPageConfiguratorsKey; +import static com.jwebmp.core.implementations.JWebMPServicesBindings.IPageConfiguratorsKey; /** * Top level of any HTML page. @@ -66,610 +69,611 @@ @PageConfiguration @Log public class Page> - extends Html - implements IPage + extends Html + implements IPage { - /** - * The options available - */ - private PageOptions options; - - private ContentSecurityPolicy contentSecurityPolicy; - - private ReadableUserAgent readableUserAgent; - - /** - * If this page has already gone through initialization - */ - private boolean pageInitialized; - - /** - * @param title Sets the title of the page - * @param compatibilityMode Sets the Internet explorer mode to work on - */ - public Page(Title title, InternetExplorerCompatibilityMode compatibilityMode) - { - this(title, compatibilityMode, null); - } - - /** - * Populates all my components. Excludes this page - * - * @param title Sets the title of the page - * @param compatibilityMode Sets the Internet explorer mode to work on - * @param base Sets the base tag for the page. Convenience Parameter - */ - public Page(Title title, InternetExplorerCompatibilityMode compatibilityMode, Base base) - { - this.getOptions() - .setTitle(title); - this.getOptions() - .setCompatibilityMode(compatibilityMode); - this.getOptions() - .setBase(base); - setID("jwPage"); - } - - /** - * @param title Sets the title of the page - */ - public Page(Title title) - { - this(title, null, null); - } - - /** - * @param title Sets the title of the page - */ - public Page(String title) - { - this(new Title<>(title), null, null); - } - - /** - * Constructs an empty page object - */ - public Page() - { - this(null, null, null); - } - - /** - * Adds the text as a given paragraph - * - * @param addText The text to add to the body - * @return This - * @see Component#add(String) - */ - @Override - @SuppressWarnings("unchecked") - @NotNull - public J add(@NotNull String addText) - { - getBody().add(addText); - return (J) this; - } - - /** - * Initializes the page - */ - public void initialize() - { - //Interception Marker - } - - /** - * Gets called when the client makes a valid request. - *

- * Local Storage, Modernizr and Session Storage are available at the time of this call - * - * @param call The retrieved ajax call request scoped - * @param response The response ajax call request scoped - * @return Not null - */ - @SuppressWarnings("unused") - @NotNull - @Override - public AjaxResponse onConnect(AjaxCall call, AjaxResponse response) - { - return response; - } - - /** - * Adds a css reference to the body - * - * @param cssReference the reference to add - * @return Always this - * @see ComponentDependencyBase#addCssReference(CSSReference) - */ - @Override - @SuppressWarnings("unchecked") - @NotNull - public J addCssReference(CSSReference cssReference) - { - getBody().addCssReference(cssReference); - return (J) this; - } - - /** - * Adds a java script reference to the body - * - * @param jsReference Adds a javascript reference to the body - * @return This page - * @see ComponentDependencyBase#addJavaScriptReference(JavascriptReference) - */ - @Override - @SuppressWarnings("unchecked") - @NotNull - public J addJavaScriptReference(JavascriptReference jsReference) - { - getBody().addJavaScriptReference(jsReference); - return (J) this; - } - - /** - * Returns the CSS references from the bdoy - * - * @return A set of references - * @see ComponentDependencyBase#getCssReferences() - */ - @Override - public Set getCssReferences() - { - return getBody().getCssReferences(); - } - - /** - * Gets the java script references from the body object - * - * @return A set of javascript references - * @see ComponentDependencyBase#getJavascriptReferences() - */ - @Override - public Set getJavascriptReferences() - { - return getBody().getJavascriptReferences(); - } - - /** - * Adds a feature to the collection - * - * @param feature - * @return - */ - @Override - @SuppressWarnings("unchecked") - @NotNull - public J addFeature(@NotNull IComponentFeatureBase feature) - { - getBody().addFeature(feature); - return (J) this; - } - - /** - * Adds a variable to the collection - * - * @param variable - */ - @Override - @SuppressWarnings("unchecked") - @NotNull - public J addVariable(@NotNull String variable) - { - getBody().addVariable(variable); - return (J) this; - } - - /** - * Returns all the dynamic options for a page - * - * @return The options with the page - * @see com.jwebmp.core.base.ComponentFeatureBase#getOptions() - */ - @Override - @NotNull - public PageOptions getOptions() - { - if (options == null) - { - options = new PageOptions<>(this); - } - return options; - } - - /** - * Returns the JavaScript render for the body - * - * @return A single string builder containing all the java scripts applicable - * @see com.jwebmp.core.base.ComponentFeatureBase#renderJavascript() - */ - @NotNull - @Override - public StringBuilder renderJavascript() - { - return getBody().renderJavascriptAll(); - } - - /** - * Returns the queries - * - * @return The bodies direct queries - */ - @NotNull - @Override - public Set getQueries() - { - return getBody().getQueries(); - } - - /** - * Method destroy ... - */ - @Override - public void destroy() - { - if (getHead() != null) - { - getHead().destroy(); - } - if (getBody() != null) - { - getBody().destroy(); - } - options = null; - super.destroy(); - } - - /** - * Returns the component with only it's methods - * - * @return Returns a trimmed out version of this page - */ - public IPage asMe() - { - return this; - } - - /** - * Whether or not the page is initialized - * - * @return If initialized or not - */ - public boolean isPageInitialized() - { - return pageInitialized; - } - - /** - * Sets if the page is initialized - * - * @param pageInitialized If this page is initialized - */ - public void setPageInitialized(boolean pageInitialized) - { - this.pageInitialized = pageInitialized; - } - - /** - * Method hashCode ... - * - * @return int - */ - @Override - public int hashCode() - { - return super.hashCode(); - } - - /** - * Method equals ... - * - * @param o of type Object - * @return boolean - */ - @Override - public boolean equals(Object o) - { - return super.equals(o); - } - - /** - * Returns the document type that will be rendered with this HTML page real-time - *

- * - * @return Document Type - */ - @Override - @NotNull - public DocumentType getDocumentType() - { - return new DocumentType<>(getBrowser().getHtmlVersion()); - } - - - /** - * Returns if the user agent string registered the device as mobile - * - * @return If the header agent reads as smartphone smart tv or tablet - * @see com.jwebmp.core.services.IPage#isMobileOrSmartTablet() - */ - @Override - public boolean isMobileOrSmartTablet() - { - Set mobiles = EnumSet.of(ReadableDeviceCategory.Category.SMARTPHONE, - ReadableDeviceCategory.Category.SMART_TV, - ReadableDeviceCategory.Category.TABLET); - return mobiles.contains(getUserAgent().getDeviceCategory() - .getCategory()); - } - - /** - * Returns a readable user agent, or null if just a basic render - * - * @return The user agent, or an empty identifiable - */ - @NotNull - public ReadableUserAgent getUserAgent() - { - try - { - readableUserAgent = GuiceContext.get(ReadableUserAgent.class); - } - catch (ProvisionException | OutOfScopeException e) - { - if (readableUserAgent == null) - { - readableUserAgent = defaultAgent(); - } - } - return readableUserAgent; - } - - /** - * Sets all component in the head and body to tiny - * - * @param tiny Sets this object, the head, and the body to tiny - * @return Always this - * @see com.jwebmp.core.base.ComponentHierarchyBase#setTiny(boolean) - */ - @Override - @SuppressWarnings("unchecked") - @NotNull - public J setTiny(boolean tiny) - { - super.setTiny(tiny); - getHead().setTiny(tiny); - getBody().setTiny(tiny); - return (J) this; - } - - /** - * Method adds to the body - * - * @param child of type IComponentHierarchyBase - * @return J - */ - @SuppressWarnings("unchecked") - public J add(@NotNull BodyChildren child) - { - getBody().add(child); - return (J) this; - } - - /** - * Overidden method to return this, beware circular joins - * - * @return Hard override to this page - * @see com.jwebmp.core.base.ComponentHierarchyBase#getPage() - */ - @Override - @NotNull - public Page getPage() - { - return this; - } - - - /** - * Initialize all children - */ - @Override - public void init() - { - if (!isInitialized()) - { - configurePageHeader(); - addVariablesScriptToPage(); - - if (!getHead().getChildren() - .isEmpty()) - { - add(getHead()); - getHead().init(); - } - getBody().init(); - if (!getBody().getChildren() - .isEmpty()) - { - add(getBody()); - } - configurePage(); - pageInitialized = true; - } - super.init(); - } - - /** - * Returns all the feature queries associated to this component and all its children - * - * @return The bodies list of queries - */ - @NotNull - @Override - public Set getQueriesAll() - { - return getBody().getQueriesAll(); - } - - /** - * Returns if the body object is empty - * - * @return if the body is empty - */ - private boolean isBodyEmpty() - { - return getBody().getChildren() - .isEmpty(); - } - - /** - * Returns if the head object is empty - * - * @return if the head is empty - */ - private boolean isHeadEmpty() - { - return getHead().getChildren() - .isEmpty(); - } - - /** - * Method configurePage ... - */ - private void configurePage() - { - @SuppressWarnings("rawtypes") - Set sortedConfigurators = new LinkedHashSet<>(GuiceContext.get(IPageConfiguratorsKey)); - sortedConfigurators.removeIf(a -> !a.enabled()); - for (IPageConfigurator sortedConfigurator : sortedConfigurators) - { - Page.log.log(Level.FINEST, "Loading IPageConfigurator - " + - sortedConfigurator.getClass() - .getSimpleName()); - sortedConfigurator.configure(this); - } - } - - /** - * Builds up the Header Tag - */ - private void configurePageHeader() - { - if (this.getOptions() - .getTitle() != null) - { - getHead().add(this.getOptions() - .getTitle()); - } - if (this.getOptions() - .getBase() != null) - { - getHead().add(this.getOptions() - .getBase()); - } - if (this.getOptions() - .getHttpEquivMeta() != null) - { - getHead().add(this.getOptions() - .getHttpEquivMeta()); - } - if (this.getOptions() - .getCacheControl() != null) - { - getHead().add(this.getOptions() - .getCacheControl()); - } - if (this.getOptions() - .getAuthor() != null) - { - getHead().add(this.getOptions() - .getAuthor()); - } - if (this.getOptions() - .getApplicationName() != null) - { - getHead().add(this.getOptions() - .getApplicationName()); - } - if (this.getOptions() - .getGenerator() != null) - { - getHead().add(this.getOptions() - .getGenerator()); - } - if (this.getOptions() - .getDescription() != null) - { - getHead().add(this.getOptions() - .getDescription()); - } - if (this.getOptions() - .getKeywords() != null) - { - getHead().add(this.getOptions() - .getKeywords()); - } - if (this.getOptions() - .getFavIconLink() != null) - { - getHead().add(this.getOptions() - .getFavIconLink()); - } - } - - public ContentSecurityPolicy getContentSecurityPolicy() - { - try - { - contentSecurityPolicy = GuiceContext.get(ContentSecurityPolicy.class); - } - catch (ProvisionException | OutOfScopeException e) - { - if (contentSecurityPolicy == null) - { - contentSecurityPolicy = new ContentSecurityPolicy(); - } - } - return contentSecurityPolicy; - } - - /** - * Adds the variables in the application to the collection - */ - private void addVariablesScriptToPage() - { - StringBuilder variablesScriptBuilder = new StringBuilder(); - for (Object o : getBody().getVariablesAll()) - { - String var = (String) o; - variablesScriptBuilder.append("var ") - .append(var) - .append(STRING_SEMICOLON); - } - if (variablesScriptBuilder.length() > 0) - { - Script variablesScript = new Script<>(); - variablesScript.setID("variables"); - variablesScript.setNewLineForRawText(true); - variablesScript.addAttribute(ScriptAttributes.Type, StaticStrings.HTML_HEADER_JAVASCRIPT); - variablesScript.setText(variablesScriptBuilder.toString()); - if (!getHead().getChildren() - .contains(variablesScript)) - { - getHead().add(variablesScript); - } - } - } - - public J setOptions(PageOptions options) - { - this.options = options; - return (J) this; - } - - public J setContentSecurityPolicy(ContentSecurityPolicy contentSecurityPolicy) - { - this.contentSecurityPolicy = contentSecurityPolicy; - return (J) this; - } + /** + * The options available + */ + private PageOptions options; + + private ContentSecurityPolicy contentSecurityPolicy; + + private ReadableUserAgent readableUserAgent; + + /** + * If this page has already gone through initialization + */ + private boolean pageInitialized; + + /** + * @param title Sets the title of the page + * @param compatibilityMode Sets the Internet explorer mode to work on + */ + public Page(Title title, InternetExplorerCompatibilityMode compatibilityMode) + { + this(title, compatibilityMode, null); + } + + /** + * Populates all my components. Excludes this page + * + * @param title Sets the title of the page + * @param compatibilityMode Sets the Internet explorer mode to work on + * @param base Sets the base tag for the page. Convenience Parameter + */ + public Page(Title title, InternetExplorerCompatibilityMode compatibilityMode, Base base) + { + this.getOptions() + .setTitle(title); + this.getOptions() + .setCompatibilityMode(compatibilityMode); + this.getOptions() + .setBase(base); + setID("jwPage"); + } + + /** + * @param title Sets the title of the page + */ + public Page(Title title) + { + this(title, null, null); + } + + /** + * @param title Sets the title of the page + */ + public Page(String title) + { + this(new Title<>(title), null, null); + } + + /** + * Constructs an empty page object + */ + public Page() + { + this(null, null, null); + } + + /** + * Adds the text as a given paragraph + * + * @param addText The text to add to the body + * @return This + * @see Component#add(String) + */ + @Override + @SuppressWarnings("unchecked") + @NotNull + public J add(@NotNull String addText) + { + getBody().add(addText); + return (J) this; + } + + /** + * Initializes the page + */ + public void initialize() + { + //Interception Marker + } + + /** + * Gets called when the client makes a valid request. + *

+ * Local Storage, Modernizr and Session Storage are available at the time of this call + * + * @param call The retrieved ajax call request scoped + * @param response The response ajax call request scoped + * @return Not null + */ + @SuppressWarnings("unused") + @NotNull + @Override + public AjaxResponse onConnect(AjaxCall call, AjaxResponse response) + { + return response; + } + + /** + * Adds a css reference to the body + * + * @param cssReference the reference to add + * @return Always this + * @see ComponentDependencyBase#addCssReference(CSSReference) + */ + @Override + @SuppressWarnings("unchecked") + @NotNull + public J addCssReference(CSSReference cssReference) + { + getBody().addCssReference(cssReference); + return (J) this; + } + + /** + * Adds a java script reference to the body + * + * @param jsReference Adds a javascript reference to the body + * @return This page + * @see ComponentDependencyBase#addJavaScriptReference(JavascriptReference) + */ + @Override + @SuppressWarnings("unchecked") + @NotNull + public J addJavaScriptReference(JavascriptReference jsReference) + { + getBody().addJavaScriptReference(jsReference); + return (J) this; + } + + /** + * Returns the CSS references from the bdoy + * + * @return A set of references + * @see ComponentDependencyBase#getCssReferences() + */ + @Override + public Set getCssReferences() + { + return getBody().getCssReferences(); + } + + /** + * Gets the java script references from the body object + * + * @return A set of javascript references + * @see ComponentDependencyBase#getJavascriptReferences() + */ + @Override + public Set getJavascriptReferences() + { + return getBody().getJavascriptReferences(); + } + + /** + * Adds a feature to the collection + * + * @param feature + * @return + */ + @Override + @SuppressWarnings("unchecked") + @NotNull + public J addFeature(@NotNull IComponentFeatureBase feature) + { + getBody().addFeature(feature); + return (J) this; + } + + /** + * Adds a variable to the collection + * + * @param variable + */ + @Override + @SuppressWarnings("unchecked") + @NotNull + public J addVariable(@NotNull String variable) + { + getBody().addVariable(variable); + return (J) this; + } + + /** + * Returns all the dynamic options for a page + * + * @return The options with the page + * @see com.jwebmp.core.base.ComponentFeatureBase#getOptions() + */ + @Override + @NotNull + public PageOptions getOptions() + { + if (options == null) + { + options = new PageOptions<>(this); + } + return options; + } + + /** + * Returns the JavaScript render for the body + * + * @return A single string builder containing all the java scripts applicable + * @see com.jwebmp.core.base.ComponentFeatureBase#renderJavascript() + */ + @NotNull + @Override + public StringBuilder renderJavascript() + { + return getBody().renderJavascriptAll(); + } + + /** + * Returns the queries + * + * @return The bodies direct queries + */ + @NotNull + @Override + public Set getQueries() + { + return getBody().getQueries(); + } + + /** + * Method destroy ... + */ + @Override + public void destroy() + { + if (getHead() != null) + { + getHead().destroy(); + } + if (getBody() != null) + { + getBody().destroy(); + } + options = null; + super.destroy(); + } + + /** + * Returns the component with only it's methods + * + * @return Returns a trimmed out version of this page + */ + public IPage asMe() + { + return this; + } + + /** + * Whether or not the page is initialized + * + * @return If initialized or not + */ + public boolean isPageInitialized() + { + return pageInitialized; + } + + /** + * Sets if the page is initialized + * + * @param pageInitialized If this page is initialized + */ + public void setPageInitialized(boolean pageInitialized) + { + this.pageInitialized = pageInitialized; + } + + /** + * Method hashCode ... + * + * @return int + */ + @Override + public int hashCode() + { + return super.hashCode(); + } + + /** + * Method equals ... + * + * @param o of type Object + * @return boolean + */ + @Override + public boolean equals(Object o) + { + return super.equals(o); + } + + /** + * Returns the document type that will be rendered with this HTML page real-time + *

+ * + * @return Document Type + */ + @Override + @NotNull + public DocumentType getDocumentType() + { + return new DocumentType<>(getBrowser().getHtmlVersion()); + } + + + /** + * Returns if the user agent string registered the device as mobile + * + * @return If the header agent reads as smartphone smart tv or tablet + * @see com.jwebmp.core.services.IPage#isMobileOrSmartTablet() + */ + @Override + public boolean isMobileOrSmartTablet() + { + Set mobiles = EnumSet.of(ReadableDeviceCategory.Category.SMARTPHONE, + ReadableDeviceCategory.Category.SMART_TV, + ReadableDeviceCategory.Category.TABLET); + return mobiles.contains(getUserAgent().getDeviceCategory() + .getCategory()); + } + + /** + * Returns a readable user agent, or null if just a basic render + * + * @return The user agent, or an empty identifiable + */ + @NotNull + public ReadableUserAgent getUserAgent() + { + try + { + readableUserAgent = IGuiceContext.get(ReadableUserAgent.class); + } + catch (ProvisionException | OutOfScopeException e) + { + if (readableUserAgent == null) + { + readableUserAgent = defaultAgent(); + } + } + return readableUserAgent; + } + + /** + * Sets all component in the head and body to tiny + * + * @param tiny Sets this object, the head, and the body to tiny + * @return Always this + * @see com.jwebmp.core.base.ComponentHierarchyBase#setTiny(boolean) + */ + @Override + @SuppressWarnings("unchecked") + @NotNull + public J setTiny(boolean tiny) + { + super.setTiny(tiny); + getHead().setTiny(tiny); + getBody().setTiny(tiny); + return (J) this; + } + + /** + * Method adds to the body + * + * @param child of type IComponentHierarchyBase + * @return J + */ + @SuppressWarnings("unchecked") + public J add(@NotNull BodyChildren child) + { + getBody().add(child); + return (J) this; + } + + /** + * Overidden method to return this, beware circular joins + * + * @return Hard override to this page + * @see com.jwebmp.core.base.ComponentHierarchyBase#getPage() + */ + @Override + @NotNull + public Page getPage() + { + return this; + } + + + /** + * Initialize all children + */ + @Override + public void init() + { + if (!isInitialized()) + { + configurePageHeader(); + addVariablesScriptToPage(); + + if (!getHead().getChildren() + .isEmpty()) + { + add(getHead()); + getHead().init(); + } + getBody().init(); + if (!getBody().getChildren() + .isEmpty()) + { + add(getBody()); + } + configurePage(); + pageInitialized = true; + } + super.init(); + } + + /** + * Returns all the feature queries associated to this component and all its children + * + * @return The bodies list of queries + */ + @NotNull + @Override + public Set getQueriesAll() + { + return getBody().getQueriesAll(); + } + + /** + * Returns if the body object is empty + * + * @return if the body is empty + */ + private boolean isBodyEmpty() + { + return getBody().getChildren() + .isEmpty(); + } + + /** + * Returns if the head object is empty + * + * @return if the head is empty + */ + private boolean isHeadEmpty() + { + return getHead().getChildren() + .isEmpty(); + } + + /** + * Method configurePage ... + */ + private void configurePage() + { + @SuppressWarnings("rawtypes") + Set sortedConfigurators = new LinkedHashSet<>(IGuiceContext.get(IPageConfiguratorsKey)); + sortedConfigurators.removeIf(a -> !a.enabled()); + for (IPageConfigurator sortedConfigurator : sortedConfigurators) + { + Page.log.log(Level.FINEST, "Loading IPageConfigurator - " + + sortedConfigurator.getClass() + .getSimpleName()); + sortedConfigurator.configure(this); + } + } + + /** + * Builds up the Header Tag + */ + private void configurePageHeader() + { + if (this.getOptions() + .getTitle() != null) + { + getHead().add(this.getOptions() + .getTitle()); + } + if (this.getOptions() + .getBase() != null) + { + getHead().add(this.getOptions() + .getBase()); + } + if (this.getOptions() + .getHttpEquivMeta() != null) + { + getHead().add(this.getOptions() + .getHttpEquivMeta()); + } + if (this.getOptions() + .getCacheControl() != null) + { + getHead().add(this.getOptions() + .getCacheControl()); + } + if (this.getOptions() + .getAuthor() != null) + { + getHead().add(this.getOptions() + .getAuthor()); + } + if (this.getOptions() + .getApplicationName() != null) + { + getHead().add(this.getOptions() + .getApplicationName()); + } + if (this.getOptions() + .getGenerator() != null) + { + getHead().add(this.getOptions() + .getGenerator()); + } + if (this.getOptions() + .getDescription() != null) + { + getHead().add(this.getOptions() + .getDescription()); + } + if (this.getOptions() + .getKeywords() != null) + { + getHead().add(this.getOptions() + .getKeywords()); + } + if (this.getOptions() + .getFavIconLink() != null) + { + getHead().add(this.getOptions() + .getFavIconLink()); + } + } + + public ContentSecurityPolicy getContentSecurityPolicy() + { + try + { + contentSecurityPolicy = IGuiceContext.get(ContentSecurityPolicy.class); + } + catch (ProvisionException | OutOfScopeException e) + { + if (contentSecurityPolicy == null) + { + contentSecurityPolicy = new ContentSecurityPolicy(); + } + } + return contentSecurityPolicy; + } + + /** + * Adds the variables in the application to the collection + */ + private void addVariablesScriptToPage() + { + StringBuilder variablesScriptBuilder = new StringBuilder(); + for (Object o : getBody().getVariablesAll()) + { + String var = (String) o; + variablesScriptBuilder.append("var ") + .append(var) + .append(STRING_SEMICOLON); + } + if (variablesScriptBuilder.length() > 0) + { + Script variablesScript = new Script<>(); + variablesScript.setID("variables"); + variablesScript.setNewLineForRawText(true); + variablesScript.addAttribute(ScriptAttributes.Type, StaticStrings.HTML_HEADER_JAVASCRIPT); + variablesScript.setText(variablesScriptBuilder.toString()); + if (!getHead().getChildren() + .contains(variablesScript)) + { + getHead().add(variablesScript); + } + } + } + + public J setOptions(PageOptions options) + { + this.options = options; + return (J) this; + } + + public J setContentSecurityPolicy(ContentSecurityPolicy contentSecurityPolicy) + { + this.contentSecurityPolicy = contentSecurityPolicy; + return (J) this; + } + } diff --git a/src/main/java/com/jwebmp/core/SessionHelper.java b/src/main/java/com/jwebmp/core/SessionHelper.java index bbe02eef3..6ebd86484 100644 --- a/src/main/java/com/jwebmp/core/SessionHelper.java +++ b/src/main/java/com/jwebmp/core/SessionHelper.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.utilities.StaticStrings; import jakarta.servlet.http.HttpServletRequest; import lombok.extern.java.Log; @@ -67,7 +68,7 @@ public static String getServerPath() } try { - HttpServletRequest request = GuiceContext.get(HttpServletRequest.class); + HttpServletRequest request = IGuiceContext.get(HttpServletRequest.class); StringBuffer buff = request.getRequestURL(); if (request.getHeader(StaticStrings.REQUEST_SITE_HEADER_NAME) != null && !request.getHeader(StaticStrings.REQUEST_SITE_HEADER_NAME).isEmpty()) @@ -101,7 +102,7 @@ public static String getServerRootPath() } try { - HttpServletRequest request = GuiceContext.get(HttpServletRequest.class); + HttpServletRequest request = IGuiceContext.get(HttpServletRequest.class); StringBuffer buff = request.getRequestURL(); if (request.getHeader(StaticStrings.REQUEST_SITE_HEADER_NAME) != null && !request.getHeader(StaticStrings.REQUEST_SITE_HEADER_NAME).isEmpty()) @@ -183,8 +184,9 @@ public static String getServletUrl() { try { - HttpServletRequest request = GuiceContext.inject() - .getInstance(HttpServletRequest.class); + HttpServletRequest request = IGuiceContext.getContext() + .inject() + .getInstance(HttpServletRequest.class); String buff = request.getServletPath(); return buff.isEmpty() ? STRING_FORWARD_SLASH : buff; } diff --git a/src/main/java/com/jwebmp/core/base/ComponentDataBindingBase.java b/src/main/java/com/jwebmp/core/base/ComponentDataBindingBase.java index a5f608d7d..eaeecdad9 100644 --- a/src/main/java/com/jwebmp/core/base/ComponentDataBindingBase.java +++ b/src/main/java/com/jwebmp/core/base/ComponentDataBindingBase.java @@ -17,6 +17,7 @@ package com.jwebmp.core.base; import com.fasterxml.jackson.annotation.JsonInclude; +import com.guicedee.client.*; import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; import com.jwebmp.core.base.html.interfaces.GlobalFeatures; import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; @@ -25,7 +26,7 @@ import com.jwebmp.core.databind.IOnDataBind; import com.jwebmp.core.databind.IOnDataBindCloak; import com.jwebmp.core.htmlbuilder.javascript.JavaScriptPart; -import com.guicedee.guicedinjection.GuiceContext; + import jakarta.validation.constraints.NotNull; @@ -114,8 +115,9 @@ public void destroy() public J bind(@NotNull String variableName) { @SuppressWarnings("rawtypes") - Set services = GuiceContext.instance() - .getLoader(IOnDataBind.class, ServiceLoader.load(IOnDataBind.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnDataBind.class, ServiceLoader.load(IOnDataBind.class)); services.forEach(a -> a.onBind(this, variableName)); return (J) this; } @@ -186,8 +188,8 @@ public T getDto(@NotNull String name, @NotNull Class classType) @SuppressWarnings("unchecked") public J cloak() { - Set services = GuiceContext.instance() - .getLoader(IOnDataBindCloak.class, ServiceLoader.load(IOnDataBindCloak.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnDataBindCloak.class, ServiceLoader.load(IOnDataBindCloak.class)); services.forEach(a -> a.onCloak(this)); return (J) this; } diff --git a/src/main/java/com/jwebmp/core/base/ComponentEventBase.java b/src/main/java/com/jwebmp/core/base/ComponentEventBase.java index a64d14c2e..5627b343c 100644 --- a/src/main/java/com/jwebmp/core/base/ComponentEventBase.java +++ b/src/main/java/com/jwebmp/core/base/ComponentEventBase.java @@ -29,6 +29,7 @@ import com.jwebmp.core.base.references.JavascriptReference; import com.jwebmp.core.base.servlets.enumarations.ComponentTypes; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; +import com.jwebmp.core.services.*; import jakarta.validation.constraints.NotNull; import lombok.extern.java.Log; @@ -62,7 +63,7 @@ public class ComponentEventBase eventType; /** * Constructs a new event for the given component type @@ -150,7 +151,7 @@ public J addEvent(@NotNull E event) @Override @NotNull @JsonIgnore - public EventTypes getEventTypes() + public IEventTypes getEventTypes() { if (eventType == EventTypes.undefined) { @@ -183,13 +184,13 @@ public Set getEvents() * Returns all the events associated with the given type * * @param eventType All child events on this component with the given event type + * * @return An in order list of all the events of the given type for this component */ @Override - @NotNull - public Set> getEventsFor(@NotNull EventTypes eventType) + public Set> getEventsFor(@NotNull IEventTypes eventType) { - Set> output = new LinkedHashSet<>(); + Set> output = new LinkedHashSet<>(); for (E e : getEvents()) { ComponentEventBase next = (ComponentEventBase) e; @@ -229,7 +230,7 @@ public J removeEvent(E event) @Override @NotNull @SuppressWarnings("unchecked") - public J setEventType(@NotNull EventTypes eventType) + public J setEventType(@NotNull IEventTypes eventType) { this.eventType = eventType; return (J) this; @@ -264,7 +265,7 @@ public J setEventType(@NotNull EventTypes eventType) @JsonProperty("eventType") @JsonInclude(value = JsonInclude.Include.NON_NULL) @SuppressWarnings("unused") - private EventTypes getEventTypesJSON() + private IEventTypes getEventTypesJSON() { if (eventType == EventTypes.undefined) { diff --git a/src/main/java/com/jwebmp/core/base/ComponentHierarchyBase.java b/src/main/java/com/jwebmp/core/base/ComponentHierarchyBase.java index a93b72446..37dd71e54 100644 --- a/src/main/java/com/jwebmp/core/base/ComponentHierarchyBase.java +++ b/src/main/java/com/jwebmp/core/base/ComponentHierarchyBase.java @@ -20,7 +20,8 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Strings; -import com.guicedee.guicedinjection.GuiceContext; +import com.guicedee.client.*; + import com.guicedee.services.jsonrepresentation.json.StaticStrings; import com.jwebmp.core.CSSComponent; import com.jwebmp.core.Event; @@ -30,18 +31,21 @@ import com.jwebmp.core.base.html.interfaces.GlobalChildren; import com.jwebmp.core.base.html.interfaces.GlobalFeatures; import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; +import com.jwebmp.core.base.interfaces.CastableComponent; import com.jwebmp.core.base.interfaces.IComponentFeatureBase; import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; import com.jwebmp.core.base.interfaces.ICssClassName; import com.jwebmp.core.base.references.CSSReference; import com.jwebmp.core.base.references.JavascriptReference; import com.jwebmp.core.base.servlets.enumarations.ComponentTypes; +import com.jwebmp.core.base.servlets.interfaces.*; import com.jwebmp.core.databind.IConfiguration; import com.jwebmp.core.databind.IOnComponentAdded; import com.jwebmp.core.databind.IOnComponentHtmlRender; import com.jwebmp.core.htmlbuilder.css.themes.Theme; import com.jwebmp.core.htmlbuilder.javascript.events.interfaces.IEvent; import com.jwebmp.core.implementations.JWebMPSiteBinder; +import com.jwebmp.core.services.*; import jakarta.validation.constraints.NotNull; import lombok.extern.java.Log; @@ -67,1320 +71,1165 @@ @Log @SuppressWarnings({"unchecked", "MissingClassJavaDoc"}) public class ComponentHierarchyBase & AttributeDefinitions, - F extends GlobalFeatures, - E extends GlobalEvents, - J extends ComponentHierarchyBase> - extends ComponentThemeBase - implements IComponentHierarchyBase, - GlobalChildren -{ - - /** - * The list of children of this component - */ - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private Set children; - - /** - * My Parent - */ - @JsonIgnore - private IComponentHierarchyBase parent; - - /** - * The list of class names for this object - */ - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private Set classes; - - /** - * My Page - */ - @JsonIgnore - private Page page; - - /** - * if children should be rendered - */ - private boolean renderChildren = true; - - - /** - * Constructs a new component that can be part of a tree - * - * @param componentType The component type of the class - */ - public ComponentHierarchyBase(@NotNull ComponentTypes componentType) - { - super(componentType); - } - - /** - * Returns a Hierarchy Base interface of this component - * - * @return The smaller neater version as a child hierarchy - */ - @NotNull - @SuppressWarnings("unused") - public IComponentHierarchyBase asHierarchyBase() - { - return this; - } - - /** - * Finds the event in all this components and child components - * - * @param eventId - * @return - * @see ComponentEventBase#findEvent(String) - */ - @Override - public ComponentEventBase findEvent(@NotNull String eventId) - { - for (C child : getChildren()) - { - for (Object jScript : child.asHierarchyBase() - .getEventsAll()) - { - if (jScript == null) - { - continue; - } - if (((Event) jScript) - .getID() - .equals(eventId)) - { - return (ComponentEventBase) jScript; - } - } - } - return null; - } - - /** - * Overrides this and all below components to set tiny false - * - * @param tiny - * @return super.tiny - * @see ComponentEventBase#setTiny(boolean) - */ - @Override - @NotNull - public J setTiny(boolean tiny) - { - getChildren().stream() - .filter(a -> a != null) - .parallel() - .forEach(child -> child.asBase() - .setTiny(tiny)); - return super.setTiny(tiny); - } - - /** - * Returns the parent id for the parent property so JSON doesn't go circular - * - * @return - */ - @JsonProperty("parent") - private String getParentJSON() - { - if (getParent() != null) - { - return getParent().asBase() - .getID(); - } - return null; - } - - /** - * Adds in the JavaScript References for all the children - * - * @return - * @see ComponentThemeBase#getCssReferencesAll() - */ - @Override - @NotNull - public Set getCssReferencesAll() - { - Set allCss = super.getCssReferencesAll(); - getChildren().forEach(child -> - { - if (child != null) - { - for (Object jScript : child.asDependencyBase() - .getCssReferencesAll()) - { - allCss.add((CSSReference) jScript); - } - } - }); - return allCss; - } - - /** - * Adds in the JavaScript References for all the children - * - * @return - * @see ComponentThemeBase#getJavascriptReferencesAll() - */ - @Override - @NotNull - public Set getJavascriptReferencesAll() - { - Set allJs = super.getJavascriptReferencesAll(); - getChildren().forEach(child -> - { - if (child != null) - { - for (Object jScript : child.asDependencyBase() - .getJavascriptReferencesAll()) - { - if (jScript != null) - { - allJs.add((JavascriptReference) jScript); - } - } - } - }); - return allJs; - } - - /** - * Method hashCode ... - * - * @return int - */ - @Override - public int hashCode() - { - return super.hashCode(); - } - - /** - * Method equals ... - * - * @param o of type Object - * @return boolean - */ - @Override - public boolean equals(Object o) - { - return super.equals(o); - } - - /** - * Method destroy ... - */ - @Override - public void destroy() - { - if (children != null) - { - for (C next : children) - { - try - { - next.destroy(); - } - catch (Exception e) - { - ComponentHierarchyBase.log.log(Level.SEVERE, "UUnable to destroy", e); - } - } - } - if (children != null) - { - children.clear(); - children = null; - } - if (classes != null) - { - classes.clear(); - classes = null; - } - super.destroy(); - } - - /** - * Returns a complete list of events - * - * @return - */ - @NotNull - @SuppressWarnings("unused") - public Set> getFeaturesAll() - { - Set> allFeatures = new LinkedHashSet<>(); - getChildrenHierarchy().forEach(child -> { - if (child != null) - { - for (Object event : child.asFeatureBase() - .getFeatures()) - { - if (event != null) - { - allFeatures.add((Feature) event); - } - } - } - }); - return allFeatures; - } - - /** - * Takes an instance and wraps around the component - *

- * e.g. BSRow.wrap(div) = iv class="row"myComponent//div - * - * @param component - * @return - */ - @NotNull - @SuppressWarnings("unchecked") - @Override - public > T wrap(@NotNull T component) - { - IComponentHierarchyBase existingParent = (IComponentHierarchyBase) component.getParent(); - if (existingParent != null) - { - existingParent.remove(component); - existingParent.add((T) this); - } - getChildren().add((C) component); - return component; - } - - /** - * Takes all children and embeds them into the current children hierarchy - * None of the details for the transient container is kept - *

- * e.g. myComponent.embed(div) - * - * @param component - * @return - */ - @NotNull - @SuppressWarnings("unchecked") - @Override - public > T embed(@NotNull T component) - { - component.getChildren() - .stream() - .filter(Objects::nonNull) - .forEach(a -> add((C) a)); - return component; - } - - /** - * Add a new child to this component - *

- * - * @param newChild The child to be added - *

- * @return The new child added - */ - @Override - @SuppressWarnings("unchecked") - @NotNull - public J add(@NotNull C newChild) - { - if (newChild == null) - { - return (J) this; - } - newChild.asHierarchyBase() - .setParent(this); - newChild.asHierarchyBase() - .setTiny(isTiny()); - newChild.asHierarchyBase() - .setPage(getPage()); - IComponentHierarchyBase c = (IComponentHierarchyBase) newChild; - c.setTiny(isTiny()); - boolean added = getChildren().add(newChild); - if (added) - { - Set components = GuiceContext.instance().loaderToSet(ServiceLoader.load(IOnComponentAdded.class)); - for (IOnComponentAdded component : components) - { - component.onComponentAdded(this, (ComponentHierarchyBase) newChild); - } - } - - return (J) this; - } - - /** - * Add a new child to this component - *

- * - * @param newChild The child to be added - *

- * @return The new child added - */ - @Override - @SuppressWarnings("unchecked") - @NotNull - public J add(@NotNull Integer position, @NotNull C newChild) - { - if (newChild == null) - { - return (J) this; - } - newChild.asHierarchyBase() - .setParent(this); - newChild.asHierarchyBase() - .setTiny(isTiny()); - newChild.asHierarchyBase() - .setPage(getPage()); - ArrayList componentHierarchyBases = new ArrayList<>(getChildren()); - componentHierarchyBases.add(position, newChild); - setChildren(new LinkedHashSet<>(componentHierarchyBases)); - return (J) this; - } - - /** - * Returns null sets the text - * - * @param text Sets this tags raw text, does not add a component - * @return J Always this class - * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#add(String) - */ - @Override - @SuppressWarnings("unchecked") - @NotNull - public J add(@NotNull String text) - { - setText(text); - return (J) this; - } - - /** - * Adds the given CSS Class Name with the given references - *

- * - * @param classComponent Adds a class as a component to this object - * @return This class - * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#addClass(CSSComponent) - */ - @Override - @SuppressWarnings("unchecked") - public J addClass(@NotNull CSSComponent classComponent) - { - String className = classComponent.getID(); - add((C) classComponent); - if (!getClasses().contains(className)) - { - addClass(className); - - } - return (J) this; - } - - /** - * Adds the given CSS Class Name with the given references - *

- * - * @param className Adds a class as a component to this object - * @return This class - * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#addClass(CSSComponent) - */ - @Override - public J addClass(ICssClassName className, ICssClassName... classNames) - { - addClass(className); - for (ICssClassName name : classNames) - { - addClass(name); - } - return (J) this; - } - - /** - * Returns All the angular objects mapped to this component and its children - * - * @return A map of String,Object - * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#getAngularObjectsAll() - */ - @Override - public Map getAngularObjectsAll() - { - Map map = getJsonObjects(); - for (IComponentHierarchyBase next : getChildrenHierarchy(true)) - { - processAngularObjects(next, map); - } - return map; - } - - /** - * Returns the children ArrayList of type Component - *

- * - * @return An array list of components - */ - @Override - @NotNull - public final Set getChildren() - { - if (children == null) - { - children = new LinkedHashSet<>(); - } - return children; - } - - /** - * Sets the children of this object - * - * @param children The children set to apply - */ - public void setChildren(Set children) - { - this.children = children; - } - - /** - * Get an array list of all children and their children recursively Includes this object - *

- * - * @return A complete array list of all children at time of call - */ - @Override - @NotNull - public Set> getChildrenHierarchy() - { - return getChildrenHierarchy(true); - } - - /** - * Get an array list of all children and their children recursively Excludes this object - *

- * - * @param includeSelf Whether or not to include this component - *

- * @return A complete array list of all children at time of call - */ - @Override - @NotNull - public Set> getChildrenHierarchy(boolean includeSelf) - { - Set> components = new LinkedHashSet<>(); - if (includeSelf) - { - components.add(this); - } - getChildrenHierarchy(components); - - return components; - } - - /** - * Adds the children of this component onto the array list coming in - *

- *

- *

- * - * @param componentsToAddTo The component Array List to add to - *

- * @return original components added with - *

- * see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#getChildrenHierarchy(Set ComponentHierarchyBase ?, ?, ?, ?, ? ) - */ - @Override - @NotNull - public Set> getChildrenHierarchy( - @NotNull Set> componentsToAddTo) - { - getChildren().forEach(child -> - { - if (child != null) - { - componentsToAddTo.add((IComponentHierarchyBase) child); - child.asHierarchyBase() - .getChildrenHierarchy(componentsToAddTo); - } - }); - return componentsToAddTo; - } - - /** - * Returns a complete list of events - * - * @return A unique set of all events - */ - @Override - @NotNull - public Set> getEventsAll() - { - Set> allEvents = new LinkedHashSet<>(); - getChildrenHierarchy(true).stream() - .filter(Objects::nonNull) - .forEach(child -> { - for (Object event : child.asEventBase() - .getEvents()) - { - if (event != null) - { - allEvents.add((Event) event); - } - } - }); - return allEvents; - } - - /** - * Get the page this component exists on - *

- * - * @return A Page - */ - @Override - @NotNull - public Page getPage() - { - if (page == null) - { - setPage(new Page<>()); - } - return page; - } - - /** - * Gets the parent of this hierarchy item - * - * @return The parent object - */ - @Override - public IComponentHierarchyBase getParent() - { - return parent; - } - - /** - * Sets the parent of this item - * - * @param parent Sets the parent object - */ - @Override - @NotNull - @SuppressWarnings("unchecked") - public J setParent(IComponentHierarchyBase parent) - { - this.parent = parent; - return (J) this; - } - - /** - * Adds a class name to the class list - *

- * - * @param className The class name to add - *

- * @return True if it was added, false if it already existed - */ - @Override - @NotNull - @SuppressWarnings("unchecked") - public J addClass(@NotNull String className) - { - getClasses().add(className); - return (J) this; - } - - /** - * Removes a class name from this component - *

- * - * @param className Class Name to Remove - *

- * @return True if the class was removed, False if the class was not part of the collection - */ - @Override - @SuppressWarnings("unchecked") - public J removeClass(String className) - { - getClasses().remove(className); - return (J) this; - } - - /** - * Removes a class name from this component - *

- * - * @param className Class Name to Remove - *

- * @return True if the class was removed, False if the class was not part of the collection - */ - @Override - @SuppressWarnings("unchecked") - public J removeClass(String className, String... classNames) - { - this.removeClass(className); - for (String name : classNames) - { - this.removeClass(name); - } - return (J) this; - } - - /** - * Enumeration to remove - * - * @param className - * @return - */ - @Override - public J removeClass(@NotNull Enum className, Enum... classNames) - { - this.removeClass(className); - for (Enum name : classNames) - { - this.removeClass(name); - } - return (J) this; - } - - /** - * Enumeration to remove - * - * @param className - * @return - */ - @Override - public boolean removeClass(@NotNull Enum className) - { - if (getClasses().contains(className.toString())) - { - getClasses().remove(className.toString()); - return true; - } - else - { - return false; - } - } - - /** - * Method addClass ... - * - * @param className of type ICssClassName - * @return J - * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#addClass(ICssClassName) - */ - @Override - @NotNull - @SuppressWarnings("unchecked") - public J addClass(@NotNull ICssClassName className) - { - getClasses().add(className.toString()); - return (J) this; - } - - /** - * Returns a complete list of all class names associated with this component - *

- * - * @return - */ - @Override - @NotNull - public Set getClasses() - { - if (classes == null) - { - classes = new LinkedHashSet<>(); - } - return classes; - } - - /** - * Sets the classes set - * - * @param classes a new set of classes - */ - @NotNull - @SuppressWarnings("unchecked") - @Override - public J setClasses(Set classes) - { - this.classes = classes; - return (J) this; - } - - /** - * Set the theme applied to this component - *

- * - * @param theme The JQuery UI theme to apply to the component - * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#addTheme(Theme) - */ - @Override - @NotNull - @SuppressWarnings("unchecked") - public J addTheme(@NotNull Theme theme) - { - if (!getThemes().contains(theme)) - { - getThemes().add(theme); - addClass(theme.getClassName()); - } - - return (J) this; - } - - /** - * * - * Returns all the variables for all the components - * - * @return - */ - @Override - @NotNull - public Set getVariablesAll() - { - Set allVariables = new TreeSet<>(); - getChildrenHierarchy().forEach(child -> { - if (child != null) - { - for (Object o : child.asFeatureBase() - .getVariables()) - { - if (o != null) - { - allVariables.add(o.toString()); - } - } - } - }); - return allVariables; - } - - /** - * Creates loading part objects that return an injected instance of the class associated to that part - * - * @return - */ - @Override - public ComponentHierarchyBase getLoadingPart(IEvent... events) - { - if (JWebMPSiteBinder.loadingPartClass != null) - { - ComponentHierarchyBase loadingPart = (ComponentHierarchyBase) GuiceContext.get(JWebMPSiteBinder.loadingPartClass); - loadingPart.setID(getID()); - for (IEvent event : events) - { - loadingPart.addEvent(event); - } - return loadingPart; - } - return null; - } - - @Override - protected StringBuilder renderHTML(int tabCount) - { - boolean renderChildren = true; - Set htmlRenderTriggers = GuiceContext.instance().loaderToSet(ServiceLoader.load(IOnComponentHtmlRender.class)); - for (IOnComponentHtmlRender htmlRenderTrigger : htmlRenderTriggers) - { - try - { - boolean result = htmlRenderTrigger.onHtmlRender((ComponentHierarchyBase) this); - if (!result) - { - renderChildren = result; - } - } - catch (Throwable T) - { - log.log(Level.WARNING, "Error in processing html render interceptor", T); - } - } - setRenderChildren(renderChildren); - return super.renderHTML(tabCount); - } - - /** - * Returns if this object has children or not - *

- * - * @return true if there are children attached - */ - @Override - public boolean hasChildren() - { - return !getChildren().isEmpty(); - } - - /** - * Takes a component off this components child list - *

- * - * @param childToRemove The child object to remove from this list - *

- * @return True if the child was part of this components children's list - */ - @Override - public boolean remove(C childToRemove) - { - getChildren().remove(childToRemove); - return true; - } - - /** - * * - * Returns all the JavaScript for all the components - * - * @return - */ - @Override - @NotNull - public StringBuilder renderJavascriptAll() - { - preConfigure(); - StringBuilder sb = new StringBuilder(); - Set allScripts = new LinkedHashSet<>(); - Set queries = getQueriesAll(); - queries.forEach(a -> - { - if (!Strings.isNullOrEmpty(a.toString())) - { - allScripts.add(a.toString()); - } - }); - allScripts.forEach(sb.append(getNewLine())::append); - return sb; - } - - /** - * Configures the page and all its components - * - * @see ComponentHTMLAttributeBase#preConfigure() - */ - @Override - public void preConfigure() - { - if (!isConfigured()) - { - setNewLineForClosingTag(hasChildren()); - } - super.preConfigure(); - } - - /** - * Renders the classes array as an in-line class string - * - * @return - * @see ComponentHTMLAttributeBase#renderClasses() - */ - @Override - @NotNull - protected StringBuilder renderClasses() - { - StringBuilder sb = new StringBuilder(); - Set eachClass = getClasses(); - eachClass.forEach(a -> sb.append(a) - .append(StaticStrings.STRING_SPACE)); - if (sb.length() > 0) - { - sb.deleteCharAt(sb.length() - 1); - } - return sb; - } - - /** - * @see ComponentHTMLAttributeBase#cloneComponent() - */ - @Override - @NotNull - @SuppressWarnings("unchecked") - public J cloneComponent() - { - ComponentHierarchyBase cloned = super.cloneComponent(); - //noinspection CastCanBeRemovedNarrowingVariableType - return (J) cloned; - } - - /** - * Returns all the feature queries associated to this component and all its children - * - * @return - * @see ComponentFeatureBase#getQueriesAll() - */ - @Override - @NotNull - public Set getQueriesAll() - { - Set reallyAllQueries = new LinkedHashSet<>(); - Set> allComponents = getChildrenHierarchy(true); - Consumer> action = componentQuery -> processComponentQueries(componentQuery, reallyAllQueries); - for (IComponentHierarchyBase allComponent : allComponents) - { - if (allComponent != null) - { - action.accept(allComponent); - } - } - return reallyAllQueries; - } - - /** - * Pre-Configure the children tree - * - * @return - * @see ComponentBase#toString() - */ - @Override - @NotNull - public String toString() - { - getChildren().forEach(next -> - { - if (next != null) - { - if (!next.isConfigured()) - { - next.preConfigure(); - } - } - }); - return super.toString(); - } - - /** - * Processes the queries - * - * @param componentQuery - * @param reallyAllQueries - */ - @SuppressWarnings("unchecked") - private void processComponentQueries(@NotNull IComponentHierarchyBase componentQuery, @NotNull Set reallyAllQueries) - { - reallyAllQueries.addAll(getQueries()); - @SuppressWarnings("rawtypes") - List> features = new ArrayList(componentQuery.asFeatureBase() - .getFeatures()); - features.forEach(feature -> reallyAllQueries.add(feature.renderJavascript())); - features.sort(comparing(ComponentFeatureBase::getSortOrder)); - Set events = (Set) componentQuery.asEventBase() - .getEvents(); - - events.forEach(event -> reallyAllQueries.add(((IComponentFeatureBase) event).asFeatureBase() - .renderJavascript())); - - features.sort(comparing(ComponentFeatureBase::getSortOrder)); - } - - /** - * Sets the page this component belongs on. - * Null to reset the page hierarchy for all children - *

- * - * @param page A Page - * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#setPage(Page) - */ - @Override - @SuppressWarnings("unchecked") - public J setPage(Page page) - { - this.page = page; - getChildren().stream() - .filter(a -> a != null) - .forEach(child -> child.asHierarchyBase() - .setPage(page)); - return (J) this; - } - - /** - * Processes the angular objects into a map - * - * @param next - * @param map - */ - private void processAngularObjects(@NotNull IComponentHierarchyBase next, @NotNull Map map) - { - for (Map.Entry entry : next.asAngularBase() - .getJsonObjects() - .entrySet()) - { - String key = entry.getKey(); - Object value = entry.getValue(); - if (key != null) - { - try - { - map.put(key, value); - } - catch (ClassCastException cce) - { - ComponentHierarchyBase.log.log(Level.WARNING, "Incorrect Object Type, Perhaps JavaScriptPart?", cce); - } - catch (Exception e) - { - ComponentHierarchyBase.log.log(Level.WARNING, "Unable to render angular object", e); - } - } - } - } - - /** - * Iterates through all the children checking if a boolean property has been placed, Returns the first instance of true or always false - * - * @param propertyName - * @param returnBool - * @return - */ - @SuppressWarnings("unused") - public boolean readChildrenPropertyFirstResult(String propertyName, boolean returnBool) - { - for (IComponentHierarchyBase next : getChildrenHierarchy(true)) - { - if (next != null) - { - if (next.asBase() - .getProperties() - .containsKey(propertyName)) - { - String propertyValue = next.asBase() - .getProperties() - .get(propertyName) - .toString(); - try - { - return Boolean.parseBoolean(propertyValue); - } - catch (Exception e) - { - ComponentHierarchyBase.log.log(Level.WARNING, "Property value was not a boolean.", e); - } - } - } - } - return false; - } - - /** - * Returns the first parent in the chain of the class type - * - * @param The class type - * @param parentType The type to look for - * @return - */ - @Override - public > T findParent(Class parentType) - { - return findParent(this, parentType); - } - - /** - * Recursive method for going through the parent base - * - * @param root The root - * @param parentType The parent type - * @return - */ - @SuppressWarnings("unchecked") - private > T findParent(@NotNull IComponentHierarchyBase root, @NotNull Class parentType) - { - if (root.getParent() != null) - { - T found; - found = (T) root.getParent(); - while (found != null && !parentType.isAssignableFrom(found.getClass())) - { - found = (T) found.getParent(); - } - return found; - } - return null; - } - - /** - * Method findChild ... - * - * @param childType of type Class T - * @return T - */ - @SuppressWarnings({"unchecked", "unused"}) - @Override - public > T findChild(@NotNull Class childType) - { - return (T) getChildren().stream() - .filter(componentHierarchyBase -> componentHierarchyBase.getClass() - .equals(childType)) - .findFirst() - .orElse(null); - } - - /** - * Convenience method for checking if a tag has already been added as a child - *

- * - * @param classType The Tag type to check for - *

- * @return The Obvious - */ - @SuppressWarnings("unused") - protected boolean containsClass(@NotNull Class classType) - { - for (C next : getChildren()) - { - if (next.getClass() - .equals(classType)) - { - return true; - } - } - return false; - } - - /** - * Renders each child - * - * @return - * @see ComponentHTMLBase#renderChildren() - */ - @Override - @NotNull - protected StringBuilder renderChildren() - { - StringBuilder sb = new StringBuilder(); - if (!renderChildren) - { - return sb; - } - if (renderBeforeChildren() != null) - { - sb.append(renderBeforeChildren()); - } - CopyOnWriteArraySet objects = new CopyOnWriteArraySet<>(); - objects.addAll(getChildren()); - objects.stream() - .filter(Objects::nonNull) - .forEach(child -> { - try - { - sb.append(getNewLine()) - .append(child.toString(child.asBase() - .isTiny() ? 0 : getCurrentTabIndents() + 1)); - } - catch (Exception e) - { - log.log(Level.SEVERE, "Cannot work on child object - " + child.getClass() - .getCanonicalName() + "\n, adding to the tree\n", e); - } - } - ); - if (renderAfterChildren() != null) - { - sb.append(renderAfterChildren()); - } - return sb; - } - - /** - * Ensure if there are children that new lines must be rendered - *

- * Boxed for operating purposes - * - * @return - * @see ComponentHTMLBase#isNewLineForClosingTag() - */ - @Override - @NotNull - public Boolean isNewLineForClosingTag() - { - if (hasChildren() && !isTiny()) - { - return true; - } - else - { - return super.isNewLineForClosingTag(); - } - } - - /** - * Renders String content before the children tags are rendered - *

- * - * @return Custom HTML String to be inserted before Children tags - * @see ComponentHTMLBase#renderBeforeChildren() - */ - @Override - - protected StringBuilder renderBeforeChildren() - { - return null; - } - - /** - * Renders String content after the children tags are rendered - *

- * - * @return Custom HTML String to be inserted after Children tags - * @see ComponentHTMLBase#renderAfterChildren() - */ - @Override - - protected StringBuilder renderAfterChildren() - { - return null; - } - - private Set configurations = new HashSet<>(); - - protected Set getConfigurations() - { - if (configurations == null) - { - configurations = new HashSet<>(); - } - return configurations; - } - - public J addConfiguration(IConfiguration configuration) - { - getConfigurations().add(configuration); - return (J) this; - } - - public Set getConfigurations(Class configurationType) - { - Set out = new LinkedHashSet<>(); - for (IComponentHierarchyBase iComponentHierarchyBase : getChildrenHierarchy(true)) - { - ComponentHierarchyBase chb = (ComponentHierarchyBase) iComponentHierarchyBase; - out.addAll((Set) chb.getConfigurations() - .stream() - .filter(b -> configurationType.isAssignableFrom(b.getClass())) - .collect(Collectors.toSet())); - } - return out; - } - - /** - * if children should be rendered - * - * @return - */ - public boolean isRenderChildren() - { - return renderChildren; - } - - /** - * if children should be rendered - * - * @param renderChildren - * @return - */ - public J setRenderChildren(boolean renderChildren) - { - this.renderChildren = renderChildren; - return (J) this; - } - - + A extends Enum & AttributeDefinitions, + F extends GlobalFeatures, + E extends GlobalEvents, + J extends ComponentHierarchyBase> + extends ComponentThemeBase + implements IComponentHierarchyBase { + + /** + * The list of children of this component + */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private Set children; + + /** + * My Parent + */ + @JsonIgnore + private IComponentHierarchyBase parent; + + /** + * The list of class names for this object + */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private Set classes; + + /** + * My Page + */ + @JsonIgnore + private IPage page; + + /** + * if children should be rendered + */ + private boolean renderChildren = true; + + + /** + * Constructs a new component that can be part of a tree + * + * @param componentType The component type of the class + */ + public ComponentHierarchyBase(@NotNull ComponentTypes componentType) { + super(componentType); + } + + /** + * Returns a Hierarchy Base interface of this component + * + * @return The smaller neater version as a child hierarchy + */ + @NotNull + @SuppressWarnings("unused") + public IComponentHierarchyBase asHierarchyBase() { + return this; + } + + /** + * Finds the event in all this components and child components + * + * @param eventId + * @return + * @see ComponentEventBase#findEvent(String) + */ + @Override + public ComponentEventBase findEvent(@NotNull String eventId) { + for (C child : getChildren()) { + for (Object jScript : child.cast().asHierarchyBase() + .getEventsAll()) { + if (jScript == null) { + continue; + } + if (((Event) jScript) + .getID() + .equals(eventId)) { + return (ComponentEventBase) jScript; + } + } + } + return null; + } + + /** + * Overrides this and all below components to set tiny false + * + * @param tiny + * @return super.tiny + * @see ComponentEventBase#setTiny(boolean) + */ + @Override + @NotNull + public J setTiny(boolean tiny) { + getChildren().stream() + .filter(a -> a != null) + .parallel() + .forEach(child -> child.cast().asBase() + .setTiny(tiny)); + return super.setTiny(tiny); + } + + /** + * Returns the parent id for the parent property so JSON doesn't go circular + * + * @return + */ + @JsonProperty("parent") + private String getParentJSON() { + if (getParent() != null) { + return getParent().asBase() + .getID(); + } + return null; + } + + /** + * Adds in the JavaScript References for all the children + * + * @return + * @see ComponentThemeBase#getCssReferencesAll() + */ + @Override + @NotNull + public Set getCssReferencesAll() { + Set allCss = super.getCssReferencesAll(); + getChildren().forEach(child -> + { + if (child != null) { + for (Object jScript : child.cast().asDependencyBase() + .getCssReferencesAll()) { + allCss.add((CSSReference) jScript); + } + } + }); + return allCss; + } + + /** + * Adds in the JavaScript References for all the children + * + * @return + * @see ComponentThemeBase#getJavascriptReferencesAll() + */ + @Override + @NotNull + public Set getJavascriptReferencesAll() { + Set allJs = super.getJavascriptReferencesAll(); + getChildren().forEach(child -> + { + if (child != null) { + for (Object jScript : child.cast().asDependencyBase() + .getJavascriptReferencesAll()) { + if (jScript != null) { + allJs.add((JavascriptReference) jScript); + } + } + } + }); + return allJs; + } + + /** + * Method hashCode ... + * + * @return int + */ + @Override + public int hashCode() { + return super.hashCode(); + } + + /** + * Method equals ... + * + * @param o of type Object + * @return boolean + */ + @Override + public boolean equals(Object o) { + return super.equals(o); + } + + /** + * Method destroy ... + */ + @Override + public void destroy() { + if (children != null) { + for (C next : children) { + try { + next.destroy(); + } catch (Exception e) { + ComponentHierarchyBase.log.log(Level.SEVERE, "UUnable to destroy", e); + } + } + } + if (children != null) { + children.clear(); + children = null; + } + if (classes != null) { + classes.clear(); + classes = null; + } + super.destroy(); + } + + /** + * Returns a complete list of events + * + * @return + */ + @NotNull + @SuppressWarnings("unused") + public Set> getFeaturesAll() { + Set> allFeatures = new LinkedHashSet<>(); + getChildrenHierarchy().forEach(child -> { + if (child != null) { + for (Object event : child.asFeatureBase() + .getFeatures()) { + if (event != null) { + allFeatures.add((Feature) event); + } + } + } + }); + return allFeatures; + } + + /** + * Takes an instance and wraps around the component + *

+ * e.g. BSRow.wrap(div) = iv class="row"myComponent//div + * + * @param component + * @return + */ + @NotNull + @SuppressWarnings("unchecked") + @Override + public > T wrap(@NotNull T component) { + IComponentHierarchyBase existingParent = component.getParent(); + if (existingParent != null) { + existingParent.remove(component); + existingParent.add(this); + } + getChildren().add((C) component); + return component; + } + + /** + * Takes all children and embeds them into the current children hierarchy + * None of the details for the transient container is kept + *

+ * e.g. myComponent.embed(div) + * + * @param component + * @return + */ + @NotNull + @SuppressWarnings("unchecked") + @Override + public > T embed(@NotNull T component) { + component.getChildren() + .stream() + .filter(Objects::nonNull) + .forEach(a -> add((C) a)); + return component; + } + + /** + * Add a new child to this component + *

+ * + * @param newChild The child to be added + *

+ * @return The new child added + */ + @Override + @SuppressWarnings("unchecked") + @NotNull + public J add(@NotNull C newChild) { + if (newChild == null) { + return (J) this; + } + newChild.cast().asHierarchyBase() + .setParent(this); + newChild.cast().asHierarchyBase() + .setTiny(isTiny()); + newChild.cast().asHierarchyBase() + .setPage(getPage()); + IComponentHierarchyBase c = (IComponentHierarchyBase) newChild; + c.setTiny(isTiny()); + boolean added = getChildren().add(newChild); + if (added) { + Set components = IGuiceContext.loaderToSet(ServiceLoader.load(IOnComponentAdded.class)); + for (IOnComponentAdded component : components) { + component.onComponentAdded(this, (ComponentHierarchyBase) newChild); + } + } + + return (J) this; + } + + /** + * Add a new child to this component + *

+ * + * @param newChild The child to be added + *

+ * @return The new child added + */ + @Override + @SuppressWarnings("unchecked") + @NotNull + public J add(@NotNull Integer position, @NotNull C newChild) { + if (newChild == null) { + return (J) this; + } + newChild.cast().asHierarchyBase() + .setParent(this); + newChild.cast().asHierarchyBase() + .setTiny(isTiny()); + newChild.cast().asHierarchyBase() + .setPage(getPage()); + ArrayList componentHierarchyBases = new ArrayList<>(getChildren()); + componentHierarchyBases.add(position, newChild); + setChildren(new LinkedHashSet<>(componentHierarchyBases)); + return (J) this; + } + + /** + * Returns null sets the text + * + * @param text Sets this tags raw text, does not add a component + * @return J Always this class + * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#add(String) + */ + @Override + @SuppressWarnings("unchecked") + @NotNull + public J add(@NotNull String text) { + setText(text); + return (J) this; + } + + /** + * Adds the given CSS Class Name with the given references + *

+ * + * @param classComponent Adds a class as a component to this object + * @return This class + */ + @Override + @SuppressWarnings("unchecked") + public J addClass(@NotNull ICSSComponent classComponent) { + String className = classComponent.getID(); + add((C) classComponent); + if (!getClasses().contains(className)) { + addClass(className); + + } + return (J) this; + } + + /** + * Adds the given CSS Class Name with the given references + *

+ * + * @param className Adds a class as a component to this object + * @return This class + * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#addClass(ICSSComponent) + */ + @Override + public J addClass(ICssClassName className, ICssClassName... classNames) { + addClass(className); + for (ICssClassName name : classNames) { + addClass(name); + } + return (J) this; + } + + /** + * Returns All the angular objects mapped to this component and its children + * + * @return A map of String,Object + * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#getAngularObjectsAll() + */ + @Override + public Map getAngularObjectsAll() { + Map map = getJsonObjects(); + for (IComponentHierarchyBase next : getChildrenHierarchy(true)) { + processAngularObjects(next, map); + } + return map; + } + + /** + * Returns the children ArrayList of type Component + *

+ * + * @return An array list of components + */ + @Override + @NotNull + public final Set getChildren() { + if (children == null) { + children = new LinkedHashSet<>(); + } + return children; + } + + /** + * Sets the children of this object + * + * @param children The children set to apply + */ + public void setChildren(Set children) { + this.children = children; + } + + /** + * Get an array list of all children and their children recursively Includes this object + *

+ * + * @return A complete array list of all children at time of call + */ + @Override + @NotNull + public Set> getChildrenHierarchy() { + return getChildrenHierarchy(true); + } + + /** + * Get an array list of all children and their children recursively Excludes this object + *

+ * + * @param includeSelf Whether or not to include this component + *

+ * @return A complete array list of all children at time of call + */ + @Override + @NotNull + public Set> getChildrenHierarchy(boolean includeSelf) { + Set> components = new LinkedHashSet<>(); + if (includeSelf) { + components.add(this); + } + getChildrenHierarchy(components); + + return components; + } + + /** + * Adds the children of this component onto the array list coming in + *

+ *

+ *

+ * + * @param componentsToAddTo The component Array List to add to + *

+ * @return original components added with + *

+ * see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#getChildrenHierarchy(Set ComponentHierarchyBase ?, ?, ?, ?, ? ) + */ + @Override + @NotNull + public Set> getChildrenHierarchy( + @NotNull Set> componentsToAddTo) { + getChildren().forEach(child -> + { + if (child != null) { + componentsToAddTo.add((IComponentHierarchyBase) child); + child.cast().asHierarchyBase() + .getChildrenHierarchy(componentsToAddTo); + } + }); + return componentsToAddTo; + } + + /** + * Returns a complete list of events + * + * @return A unique set of all events + */ + @Override + @NotNull + public Set> getEventsAll() { + Set> allEvents = new LinkedHashSet<>(); + getChildrenHierarchy(true).stream() + .filter(Objects::nonNull) + .forEach(child -> { + for (Object event : child.asEventBase() + .getEvents()) { + if (event != null) { + allEvents.add((IEvent) event); + } + } + }); + return allEvents; + } + + /** + * Get the page this component exists on + *

+ * + * @return A Page + */ + @Override + @NotNull + public IPage getPage() { + if (page == null) { + setPage(new Page<>()); + } + return page; + } + + /** + * Gets the parent of this hierarchy item + * + * @return The parent object + */ + @Override + public IComponentHierarchyBase getParent() { + return parent; + } + + /** + * Sets the parent of this item + * + * @param parent Sets the parent object + */ + @Override + @NotNull + @SuppressWarnings("unchecked") + public J setParent(IComponentHierarchyBase parent) { + this.parent = parent; + return (J) this; + } + + /** + * Adds a class name to the class list + *

+ * + * @param className The class name to add + *

+ * @return True if it was added, false if it already existed + */ + @Override + @NotNull + @SuppressWarnings("unchecked") + public J addClass(@NotNull String className) { + getClasses().add(className); + return (J) this; + } + + /** + * Removes a class name from this component + *

+ * + * @param className Class Name to Remove + *

+ * @return True if the class was removed, False if the class was not part of the collection + */ + @Override + @SuppressWarnings("unchecked") + public J removeClass(String className) { + getClasses().remove(className); + return (J) this; + } + + /** + * Removes a class name from this component + *

+ * + * @param className Class Name to Remove + *

+ * @return True if the class was removed, False if the class was not part of the collection + */ + @Override + @SuppressWarnings("unchecked") + public J removeClass(String className, String... classNames) { + this.removeClass(className); + for (String name : classNames) { + this.removeClass(name); + } + return (J) this; + } + + /** + * Enumeration to remove + * + * @param className + * @return + */ + @Override + public J removeClass(@NotNull Enum className, Enum... classNames) { + this.removeClass(className); + for (Enum name : classNames) { + this.removeClass(name); + } + return (J) this; + } + + /** + * Enumeration to remove + * + * @param className + * @return + */ + @Override + public boolean removeClass(@NotNull Enum className) { + if (getClasses().contains(className.toString())) { + getClasses().remove(className.toString()); + return true; + } else { + return false; + } + } + + /** + * Method addClass ... + * + * @param className of type ICssClassName + * @return J + * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#addClass(ICssClassName) + */ + @Override + @NotNull + @SuppressWarnings("unchecked") + public J addClass(@NotNull ICssClassName className) { + getClasses().add(className.toString()); + return (J) this; + } + + /** + * Returns a complete list of all class names associated with this component + *

+ * + * @return + */ + @Override + @NotNull + public Set getClasses() { + if (classes == null) { + classes = new LinkedHashSet<>(); + } + return classes; + } + + /** + * Sets the classes set + * + * @param classes a new set of classes + */ + @NotNull + @SuppressWarnings("unchecked") + @Override + public J setClasses(Set classes) { + this.classes = classes; + return (J) this; + } + + /** + * Set the theme applied to this component + *

+ * + * @param theme The JQuery UI theme to apply to the component + * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#addTheme(Theme) + */ + @Override + @NotNull + @SuppressWarnings("unchecked") + public J addTheme(@NotNull Theme theme) { + if (!getThemes().contains(theme)) { + getThemes().add(theme); + addClass(theme.getClassName()); + } + + return (J) this; + } + + /** + * * + * Returns all the variables for all the components + * + * @return + */ + @Override + @NotNull + public Set getVariablesAll() { + Set allVariables = new TreeSet<>(); + getChildrenHierarchy().forEach(child -> { + if (child != null) { + for (Object o : child.asFeatureBase() + .getVariables()) { + if (o != null) { + allVariables.add(o.toString()); + } + } + } + }); + return allVariables; + } + + /** + * Creates loading part objects that return an injected instance of the class associated to that part + * + * @return + */ + @Override + public IComponentHierarchyBase getLoadingPart(IEvent... events) { + if (JWebMPSiteBinder.loadingPartClass != null) { + ComponentHierarchyBase loadingPart = (ComponentHierarchyBase) IGuiceContext.get(JWebMPSiteBinder.loadingPartClass); + loadingPart.setID(getID()); + for (IEvent event : events) { + loadingPart.addEvent(event); + } + return (IComponentHierarchyBase) loadingPart; + } + return null; + } + + @Override + protected StringBuilder renderHTML(int tabCount) { + boolean renderChildren = true; + Set htmlRenderTriggers = IGuiceContext.loaderToSet(ServiceLoader.load(IOnComponentHtmlRender.class)); + for (IOnComponentHtmlRender htmlRenderTrigger : htmlRenderTriggers) { + try { + boolean result = htmlRenderTrigger.onHtmlRender((ComponentHierarchyBase) this); + if (!result) { + renderChildren = result; + } + } catch (Throwable T) { + log.log(Level.WARNING, "Error in processing html render interceptor", T); + } + } + setRenderChildren(renderChildren); + return super.renderHTML(tabCount); + } + + /** + * Returns if this object has children or not + *

+ * + * @return true if there are children attached + */ + @Override + public boolean hasChildren() { + return !getChildren().isEmpty(); + } + + /** + * Takes a component off this components child list + *

+ * + * @param childToRemove The child object to remove from this list + *

+ * @return True if the child was part of this components children's list + */ + @Override + public boolean remove(C childToRemove) { + getChildren().remove(childToRemove); + return true; + } + + /** + * * + * Returns all the JavaScript for all the components + * + * @return + */ + @Override + @NotNull + public StringBuilder renderJavascriptAll() { + preConfigure(); + StringBuilder sb = new StringBuilder(); + Set allScripts = new LinkedHashSet<>(); + Set queries = getQueriesAll(); + queries.forEach(a -> + { + if (!Strings.isNullOrEmpty(a.toString())) { + allScripts.add(a.toString()); + } + }); + allScripts.forEach(sb.append(getNewLine())::append); + return sb; + } + + /** + * Configures the page and all its components + * + * @see ComponentHTMLAttributeBase#preConfigure() + */ + @Override + public void preConfigure() { + if (!isConfigured()) { + setNewLineForClosingTag(hasChildren()); + } + super.preConfigure(); + } + + /** + * Renders the classes array as an in-line class string + * + * @return + * @see ComponentHTMLAttributeBase#renderClasses() + */ + @Override + @NotNull + protected StringBuilder renderClasses() { + StringBuilder sb = new StringBuilder(); + Set eachClass = getClasses(); + eachClass.forEach(a -> sb.append(a) + .append(StaticStrings.STRING_SPACE)); + if (sb.length() > 0) { + sb.deleteCharAt(sb.length() - 1); + } + return sb; + } + + /** + * @see ComponentHTMLAttributeBase#cloneComponent() + */ + @Override + @NotNull + @SuppressWarnings("unchecked") + public J cloneComponent() { + ComponentHierarchyBase cloned = super.cloneComponent(); + //noinspection CastCanBeRemovedNarrowingVariableType + return (J) cloned; + } + + /** + * Returns all the feature queries associated to this component and all its children + * + * @return + * @see ComponentFeatureBase#getQueriesAll() + */ + @Override + @NotNull + public Set getQueriesAll() { + Set reallyAllQueries = new LinkedHashSet<>(); + Set> allComponents = getChildrenHierarchy(true); + Consumer> action = componentQuery -> processComponentQueries(componentQuery, reallyAllQueries); + for (IComponentHierarchyBase allComponent : allComponents) { + if (allComponent != null) { + action.accept(allComponent); + } + } + return reallyAllQueries; + } + + /** + * Pre-Configure the children tree + * + * @return + * @see ComponentBase#toString() + */ + @Override + @NotNull + public String toString() { + getChildren().forEach(next -> + { + if (next != null) { + if (!next.isConfigured()) { + next.preConfigure(); + } + } + }); + return super.toString(); + } + + /** + * Processes the queries + * + * @param componentQuery + * @param reallyAllQueries + */ + @SuppressWarnings("unchecked") + private void processComponentQueries(@NotNull IComponentHierarchyBase componentQuery, @NotNull Set reallyAllQueries) { + reallyAllQueries.addAll(getQueries()); + @SuppressWarnings("rawtypes") + List> features = new ArrayList(componentQuery.asFeatureBase() + .getFeatures()); + features.forEach(feature -> reallyAllQueries.add(feature.renderJavascript())); + features.sort(comparing(ComponentFeatureBase::getSortOrder)); + Set events = (Set) componentQuery.asEventBase() + .getEvents(); + + events.forEach(event -> reallyAllQueries.add(((IComponentFeatureBase) event).asFeatureBase() + .renderJavascript())); + + features.sort(comparing(ComponentFeatureBase::getSortOrder)); + } + + /** + * Sets the page this component belongs on. + * Null to reset the page hierarchy for all children + *

+ * + * @param page A Page + */ + @Override + @SuppressWarnings("unchecked") + public J setPage(IPage page) { + this.page = page; + getChildren().stream() + .filter(a -> a != null) + .forEach(child -> child.cast().asHierarchyBase() + .setPage(page)); + return (J) this; + } + + /** + * Processes the angular objects into a map + * + * @param next + * @param map + */ + private void processAngularObjects(@NotNull IComponentHierarchyBase next, @NotNull Map map) { + for (Map.Entry entry : next.asAngularBase() + .getJsonObjects() + .entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + if (key != null) { + try { + map.put(key, value); + } catch (ClassCastException cce) { + ComponentHierarchyBase.log.log(Level.WARNING, "Incorrect Object Type, Perhaps JavaScriptPart?", cce); + } catch (Exception e) { + ComponentHierarchyBase.log.log(Level.WARNING, "Unable to render angular object", e); + } + } + } + } + + /** + * Iterates through all the children checking if a boolean property has been placed, Returns the first instance of true or always false + * + * @param propertyName + * @param returnBool + * @return + */ + @SuppressWarnings("unused") + public boolean readChildrenPropertyFirstResult(String propertyName, boolean returnBool) { + for (IComponentHierarchyBase next : getChildrenHierarchy(true)) { + if (next != null) { + if (next.asBase() + .getProperties() + .containsKey(propertyName)) { + String propertyValue = next.asBase() + .getProperties() + .get(propertyName) + .toString(); + try { + return Boolean.parseBoolean(propertyValue); + } catch (Exception e) { + ComponentHierarchyBase.log.log(Level.WARNING, "Property value was not a boolean.", e); + } + } + } + } + return false; + } + + /** + * Returns the first parent in the chain of the class type + * + * @param The class type + * @param parentType The type to look for + * @return + */ + @Override + public > T findParent(Class parentType) { + return findParent(this, parentType); + } + + /** + * Recursive method for going through the parent base + * + * @param root The root + * @param parentType The parent type + * @return + */ + @SuppressWarnings("unchecked") + private > T findParent(@NotNull IComponentHierarchyBase root, @NotNull Class parentType) { + if (root.getParent() != null) { + T found; + found = (T) root.getParent(); + while (found != null && !parentType.isAssignableFrom(found.getClass())) { + found = (T) found.getParent(); + } + return found; + } + return null; + } + + /** + * Method findChild ... + * + * @param childType of type Class T + * @return T + */ + @SuppressWarnings({"unchecked", "unused"}) + @Override + public > T findChild(@NotNull Class childType) { + return (T) getChildren().stream() + .filter(componentHierarchyBase -> componentHierarchyBase.getClass() + .equals(childType)) + .findFirst() + .orElse(null); + } + + /** + * Convenience method for checking if a tag has already been added as a child + *

+ * + * @param classType The Tag type to check for + *

+ * @return The Obvious + */ + @SuppressWarnings("unused") + protected boolean containsClass(@NotNull Class classType) { + for (C next : getChildren()) { + if (next.getClass() + .equals(classType)) { + return true; + } + } + return false; + } + + /** + * Renders each child + * + * @return + * @see ComponentHTMLBase#renderChildren() + */ + @Override + @NotNull + protected StringBuilder renderChildren() { + StringBuilder sb = new StringBuilder(); + if (!renderChildren) { + return sb; + } + if (renderBeforeChildren() != null) { + sb.append(renderBeforeChildren()); + } + CopyOnWriteArraySet objects = new CopyOnWriteArraySet<>(); + objects.addAll(getChildren()); + objects.stream() + .filter(Objects::nonNull) + .forEach(child -> { + try { + sb.append(getNewLine()) + .append(child.toString(child.cast().asBase() + .isTiny() ? 0 : getCurrentTabIndents() + 1)); + } catch (Exception e) { + log.log(Level.SEVERE, "Cannot work on child object - " + child.getClass() + .getCanonicalName() + "\n, adding to the tree\n", e); + } + } + ); + if (renderAfterChildren() != null) { + sb.append(renderAfterChildren()); + } + return sb; + } + + /** + * Ensure if there are children that new lines must be rendered + *

+ * Boxed for operating purposes + * + * @return + * @see ComponentHTMLBase#isNewLineForClosingTag() + */ + @Override + @NotNull + public Boolean isNewLineForClosingTag() { + if (hasChildren() && !isTiny()) { + return true; + } else { + return super.isNewLineForClosingTag(); + } + } + + /** + * Renders String content before the children tags are rendered + *

+ * + * @return Custom HTML String to be inserted before Children tags + * @see ComponentHTMLBase#renderBeforeChildren() + */ + @Override + + protected StringBuilder renderBeforeChildren() { + return null; + } + + /** + * Renders String content after the children tags are rendered + *

+ * + * @return Custom HTML String to be inserted after Children tags + * @see ComponentHTMLBase#renderAfterChildren() + */ + @Override + + protected StringBuilder renderAfterChildren() { + return null; + } + + private Set configurations = new HashSet<>(); + + protected Set getConfigurations() { + if (configurations == null) { + configurations = new HashSet<>(); + } + return configurations; + } + + public J addConfiguration(IConfiguration configuration) { + getConfigurations().add(configuration); + return (J) this; + } + + public Set getConfigurations(Class configurationType) { + Set out = new LinkedHashSet<>(); + for (IComponentHierarchyBase iComponentHierarchyBase : getChildrenHierarchy(true)) { + ComponentHierarchyBase chb = (ComponentHierarchyBase) iComponentHierarchyBase; + out.addAll((Set) chb.getConfigurations() + .stream() + .filter(b -> configurationType.isAssignableFrom(b.getClass())) + .collect(Collectors.toSet())); + } + return out; + } + + /** + * if children should be rendered + * + * @return + */ + public boolean isRenderChildren() { + return renderChildren; + } + + /** + * if children should be rendered + * + * @param renderChildren + * @return + */ + public J setRenderChildren(boolean renderChildren) { + this.renderChildren = renderChildren; + return (J) this; + } + + } diff --git a/src/main/java/com/jwebmp/core/base/ComponentStyleBase.java b/src/main/java/com/jwebmp/core/base/ComponentStyleBase.java index 6179159f5..9dad526cc 100644 --- a/src/main/java/com/jwebmp/core/base/ComponentStyleBase.java +++ b/src/main/java/com/jwebmp/core/base/ComponentStyleBase.java @@ -21,8 +21,7 @@ import com.jwebmp.core.base.html.interfaces.GlobalChildren; import com.jwebmp.core.base.html.interfaces.GlobalFeatures; import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; -import com.jwebmp.core.base.interfaces.IComponentStyleBase; +import com.jwebmp.core.base.interfaces.*; import com.jwebmp.core.base.servlets.enumarations.ComponentTypes; import com.jwebmp.core.htmlbuilder.css.CSSImpl; import com.jwebmp.core.htmlbuilder.css.composer.CSSComposer; @@ -46,233 +45,213 @@ */ @SuppressWarnings("MissingClassJavaDoc") public abstract class ComponentStyleBase & AttributeDefinitions, - F extends GlobalFeatures, - E extends GlobalEvents, - J extends ComponentStyleBase> - extends ComponentHierarchyBase - implements IComponentStyleBase -{ - /** - * The CSS Object for all styling - */ - private CSSImpl css; - - /** - * The CSS Class name if required - */ - private String cssName; - - /** - * Container for all the CSS Types - */ - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private Map cssTypeHashMap; - - /** - * Constructs a tag with styling options enabled - * - * @param componentType The type of component this is - */ - public ComponentStyleBase(ComponentTypes componentType) - { - super(componentType); - } - - /** - * Returns a ComponentStyleBase component of this - * - * @return This class with only the styling methods - */ - @SuppressWarnings("unused") - @NotNull - public IComponentStyleBase asStyleBase() - { - return this; - } - - /** - * Adds a CSS object to the component with the given type - * - * @param type The CSS Type - * @param cssItem Thee CSS Item to add - * @return Always this object - */ - @Override - @SuppressWarnings("unchecked") - @NotNull - public J addCSSEntry(CSSTypes type, CSSImpl cssItem) - { - getCssTypeHashMap().put(type, cssItem); - return (J) this; - } - - /** - * Removes a CSS item for the component - * - * @param cssType The CSS Type Entry to remove - * @return Always this object - */ - @Override - @SuppressWarnings("unchecked") - @NotNull - public J removeCSSEntry(CSSTypes cssType) - { - getCssTypeHashMap().remove(cssType); - return (J) this; - } - - /** - * Gets the CSS Object used for styling - * - * @return The CSS Implementation Object for default (CSSTypes.None) - */ - @Override - @NotNull - public CSSImpl getCss() - { - if (css == null) - { - css = new CSSImpl(); - getCssTypeHashMap().put(CSSTypes.None, css); - } - return css; - } - - /** - * Sets the CSS Object used for styling - * - * @param css The CSS Implementation object to add - * @return Always this object - */ - @Override - @NotNull - @SuppressWarnings("unchecked") - public J setCss(CSSImpl css) - { - this.css = css; - return (J) this; - } - - /** - * Returns the currently assigned CSS Name - * - * @return The currently assigned css Name for this objects style - */ - @Override - @NotNull - public String getCssName() - { - return cssName; - } - - /** - * Sets the currently assigned CSS Name - * - * @param cssName Sets the CSS Name to a valid value - * @return Always this object - */ - @Override - @NotNull - @SuppressWarnings("unchecked") - public J setCssName(@NotNull String cssName) - { - this.cssName = cssName; - return (J) this; - } - - /** - * Returns the current HashMap of all CSS Entries for the component - * - * @return The CSS Types and Implementations for each type for this object - */ - @Override - @NotNull - public Map getCssTypeHashMap() - { - if (cssTypeHashMap == null) - { - cssTypeHashMap = new EnumMap<>(CSSTypes.class); - } - return cssTypeHashMap; - } - - /** - * Renders the component CSS at the specified tab count with the <style> tag - *

- * - * @param tabCount Tab indentation for the SQL - * @return The Component CSS - */ - @Override - @NotNull - public StringBuilder renderCss(int tabCount) - { - return renderCss(tabCount, true, false, false); - } - - /** - * Renders the component CSS at the specified tab count with the <style> tag This includes everything from this classes CSS, to - * the CSS for each field. It will also populate the lower level - * child CSS for fields in this class - *

- * - * @param tabCount Tab indentation for the SQL - * @param renderOpening Whether or not to render the opening XML tag for a CSS style - * @param renderInQuotations Sets whether to render the CSS Fields in Quotations - * @param isAjaxCall Sets whether the CSS is being called from an AJAX call - *

- * @return The Component CSS - */ - @Override - @NotNull - public StringBuilder renderCss(int tabCount, boolean renderOpening, boolean renderInQuotations, boolean isAjaxCall) - { - if (!isInitialized()) - { - init(); - } - if (!isConfigured()) - { - preConfigure(); - } - CSSComposer comp = new CSSComposer(); - comp.addComponent(this, true); - return new StringBuilder(comp.toString()); - } - - /** - * @return hash-int - */ - @Override - public int hashCode() - { - return super.hashCode(); - } - - /** - * Method equals ... - * - * @param o of type Object - * @return boolean - */ - @Override - public boolean equals(Object o) - { - return super.equals(o); - } - - /** - * Method destroy ... - */ - @Override - public void destroy() - { - if (cssTypeHashMap != null) - { - cssTypeHashMap.clear(); - cssTypeHashMap = null; - } - super.destroy(); - } + A extends Enum & AttributeDefinitions, + F extends GlobalFeatures, + E extends GlobalEvents, + J extends ComponentStyleBase> + extends ComponentHierarchyBase + implements IComponentStyleBase { + /** + * The CSS Object for all styling + */ + private CSSImpl css; + + /** + * The CSS Class name if required + */ + private String cssName; + + /** + * Container for all the CSS Types + */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private Map cssTypeHashMap; + + /** + * Constructs a tag with styling options enabled + * + * @param componentType The type of component this is + */ + public ComponentStyleBase(ComponentTypes componentType) { + super(componentType); + } + + /** + * Returns a ComponentStyleBase component of this + * + * @return This class with only the styling methods + */ + @SuppressWarnings("unused") + @NotNull + public IComponentStyleBase asStyleBase() { + return this; + } + + /** + * Adds a CSS object to the component with the given type + * + * @param type The CSS Type + * @param cssItem Thee CSS Item to add + * @return Always this object + */ + @Override + @SuppressWarnings("unchecked") + @NotNull + public J addCSSEntry(CSSTypes type, ICSSImpl cssItem) { + getCssTypeHashMap().put(type, cssItem); + return (J) this; + } + + /** + * Removes a CSS item for the component + * + * @param cssType The CSS Type Entry to remove + * @return Always this object + */ + @Override + @SuppressWarnings("unchecked") + @NotNull + public J removeCSSEntry(CSSTypes cssType) { + getCssTypeHashMap().remove(cssType); + return (J) this; + } + + /** + * Gets the CSS Object used for styling + * + * @return The CSS Implementation Object for default (CSSTypes.None) + */ + @Override + @NotNull + public CSSImpl getCss() { + if (css == null) { + css = new CSSImpl(); + getCssTypeHashMap().put(CSSTypes.None, css); + } + return css; + } + + /** + * Sets the CSS Object used for styling + * + * @param css The CSS Implementation object to add + * @return Always this object + */ + @Override + @NotNull + @SuppressWarnings("unchecked") + public J setCss(ICSSImpl css) { + this.css = (CSSImpl) css; + return (J) this; + } + + /** + * Returns the currently assigned CSS Name + * + * @return The currently assigned css Name for this objects style + */ + @Override + @NotNull + public String getCssName() { + return cssName; + } + + /** + * Sets the currently assigned CSS Name + * + * @param cssName Sets the CSS Name to a valid value + * @return Always this object + */ + @Override + @NotNull + @SuppressWarnings("unchecked") + public J setCssName(@NotNull String cssName) { + this.cssName = cssName; + return (J) this; + } + + /** + * Returns the current HashMap of all CSS Entries for the component + * + * @return The CSS Types and Implementations for each type for this object + */ + @Override + @NotNull + public Map getCssTypeHashMap() { + if (cssTypeHashMap == null) { + cssTypeHashMap = new EnumMap<>(CSSTypes.class); + } + return cssTypeHashMap; + } + + /** + * Renders the component CSS at the specified tab count with the <style> tag + *

+ * + * @param tabCount Tab indentation for the SQL + * @return The Component CSS + */ + @Override + @NotNull + public StringBuilder renderCss(int tabCount) { + return renderCss(tabCount, true, false, false); + } + + /** + * Renders the component CSS at the specified tab count with the <style> tag This includes everything from this classes CSS, to + * the CSS for each field. It will also populate the lower level + * child CSS for fields in this class + *

+ * + * @param tabCount Tab indentation for the SQL + * @param renderOpening Whether or not to render the opening XML tag for a CSS style + * @param renderInQuotations Sets whether to render the CSS Fields in Quotations + * @param isAjaxCall Sets whether the CSS is being called from an AJAX call + *

+ * @return The Component CSS + */ + @Override + @NotNull + public StringBuilder renderCss(int tabCount, boolean renderOpening, boolean renderInQuotations, boolean isAjaxCall) { + if (!isInitialized()) { + init(); + } + if (!isConfigured()) { + preConfigure(); + } + CSSComposer comp = new CSSComposer(); + comp.addComponent(this, true); + return new StringBuilder(comp.toString()); + } + + /** + * @return hash-int + */ + @Override + public int hashCode() { + return super.hashCode(); + } + + /** + * Method equals ... + * + * @param o of type Object + * @return boolean + */ + @Override + public boolean equals(Object o) { + return super.equals(o); + } + + /** + * Method destroy ... + */ + @Override + public void destroy() { + if (cssTypeHashMap != null) { + cssTypeHashMap.clear(); + cssTypeHashMap = null; + } + super.destroy(); + } } diff --git a/src/main/java/com/jwebmp/core/base/ajax/AjaxCall.java b/src/main/java/com/jwebmp/core/base/ajax/AjaxCall.java deleted file mode 100644 index 6824c23d7..000000000 --- a/src/main/java/com/jwebmp/core/base/ajax/AjaxCall.java +++ /dev/null @@ -1,541 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.ajax; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.google.common.base.Strings; -import com.google.inject.Inject; -import com.google.inject.OutOfScopeException; -import com.google.inject.ProvisionException; -import com.guicedee.guicedinjection.GuiceContext; -import com.guicedee.guicedinjection.interfaces.ObjectBinderKeys; -import com.guicedee.guicedservlets.GuicedServletKeys; -import com.guicedee.guicedservlets.servlets.services.scopes.CallScope; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; -import com.jwebmp.core.htmlbuilder.javascript.JavaScriptPart; -import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.validation.constraints.NotNull; -import jakarta.websocket.Session; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * This class handles the decoding of an AJAX call being received - *

- * - * @author GedMarc - * @since 04 May 2015 - */ -@SuppressWarnings({"JavaDoc", "unused"}) -@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, - getterVisibility = JsonAutoDetect.Visibility.NONE, - setterVisibility = JsonAutoDetect.Visibility.NONE) -@JsonInclude(JsonInclude.Include.NON_EMPTY) -@CallScope -public class AjaxCall> - extends JavaScriptPart - implements IAjaxCall -{ - /** - * The component ID that was sent back - */ - private String componentId; - /** - * The date of the client event - used to measure network congestion. - */ - private Date datetime; - /** - * The event type - */ - private EventTypes eventType; - - private HeadersDTO headers; - - private Map attributes; - - /** - * The current history state - */ - private Map state; - /** - * The component object that this call is linked to - */ - @JsonIgnore - private IComponentHierarchyBase component; - /** - * The parameters associated with the call - */ - private Map parameters; - - /** - * The parameters associated with the call - */ - private Map sessionStorage; - /** - * The parameters associated with the call - */ - private Map localStorage; - - /** - * The class to create - */ - @JsonAlias({"classname","eventClass"}) - private String className; - /** - * The given hash bang - */ - @JsonAlias("hashbang") - private String hashBang; - /** - * The given path route for the application - */ - private String route; - /** - * If this call originates through a web socket (so there is no request or session scope), - * or if it is a direct page call - */ - private boolean isWebSocketCall; - /** - * The web socket session for this call - */ - @JsonIgnore - private Session websocketSession; - - /** - * If this is a page or a supporting servlet call - */ - private boolean pageCall; - - private Map unknownFields = new HashMap<>(); - private Map history = new HashMap<>(); - - /** - * JSon Jackson Constructor - */ - public AjaxCall() - { - //set nothing - } - - /** - * Creates a valid AJAX call object that can be processed - * - * @param componentId The component ID - * @param datetime The Date Time - * @param eventType The ComponentEventBase Type - * @param eventTypeFrom The ComponentEventBase Type From - */ - public AjaxCall(String componentId, Date datetime, String eventType, String eventTypeFrom) - { - this.componentId = componentId; - this.datetime = datetime; - this.eventType = EventTypes.valueOf(eventType); - } - - @Inject - void configure() - { - try - { - HttpServletRequest request = GuiceContext.get(GuicedServletKeys.getHttpServletRequestKey()); - for (Map.Entry entry : request.getParameterMap() - .entrySet()) - { - String key = entry.getKey(); - String[] value = entry.getValue(); - getParameters() - .put(key, value[0]); - } - } - catch (OutOfScopeException | ProvisionException e) - { - //ignore - } - } - - public String getAttribute(String attribute) - { - if (getAttributes() != null && getAttributes() - .get(attribute) != null) - { - return getAttributes() - .get(attribute) - .toString(); - } - return null; - } - - /** - * @return - */ - @SuppressWarnings("Convert2Diamond") - public Map getAttributeAsMap(String attributeName) - { - String variableText = getAttribute(attributeName); - if (Strings.isNullOrEmpty(variableText)) - { - return new HashMap<>(); - } - TypeReference> typeRef - = new TypeReference>() - { - }; - try - { - return GuiceContext.get(ObjectBinderKeys.DefaultObjectMapper) - .readValue(variableText, typeRef); - } - catch (JsonProcessingException e) - { - return new HashMap<>(); - } - - } - - /** - * The given hash bang - * - * @return - */ - public String getHashBang() - { - return hashBang; - } - - /** - * The given hash bang - * - * @param hashBang - */ - public void setHashBang(String hashBang) - { - this.hashBang = hashBang; - } - - @Override - public final String getComponentId() - { - return componentId; - } - - @Override - @SuppressWarnings("unchecked") - public J fromCall(AjaxCall incoming) - { - setComponent(incoming.getComponent()); - setComponentId(incoming.getComponentId()); - setDatetime(incoming.getDatetime()); - setEventType(incoming.getEventType()); - setReferenceId(incoming.getReferenceId()); - setClassName(incoming.getClassName()); - setParameters(incoming.getParameters()); - setLocalStorage(incoming.getLocalStorage()); - setSessionStorage(incoming.getSessionStorage()); - setHashBang(incoming.getHashBang()); - setWebsocketSession(incoming.getWebsocketSession()); - setWebSocketCall(incoming.isWebSocketCall()); - unknownFields = Map.copyOf(incoming.unknownFields); - - return (J) this; - } - - @Override - public Date getDatetime() - { - return datetime; - } - - @Override - @SuppressWarnings("unchecked") - public J setComponent(IComponentHierarchyBase component) - { - this.component = component; - return (J) this; - } - - @Override - public EventTypes getEventType() - { - return eventType; - } - - @Override - @SuppressWarnings("unchecked") - public J setComponentId(String componentId) - { - this.componentId = componentId; - return (J) this; - } - - @Override - @SuppressWarnings("unchecked") - public J setDatetime(Date datetime) - { - this.datetime = datetime; - return (J) this; - } - - @Override - public IComponentHierarchyBase getComponent() - { - return component; - } - - @Override - @SuppressWarnings("unchecked") - public J setEventType(EventTypes eventType) - { - this.eventType = eventType; - return (J) this; - } - - /** - * If this call originates through a web socket (so there is no request or session scope), - * * or if it is a direct page call - * - * @return - */ - public boolean isWebSocketCall() - { - return isWebSocketCall; - } - - /** - * If this call originates through a web socket (so there is no request or session scope), - * * or if it is a direct page call - * - * @param webSocketCall - */ - @SuppressWarnings("unchecked") - public J setWebSocketCall(boolean webSocketCall) - { - isWebSocketCall = webSocketCall; - return (J) this; - } - - /** - * The web socket session for this call - * - * @return - */ - public Session getWebsocketSession() - { - return websocketSession; - } - - /** - * The web socket session for this call - * - * @param websocketSession - * @return - */ - @SuppressWarnings("unchecked") - public J setWebsocketSession(Session websocketSession) - { - this.websocketSession = websocketSession; - return (J) this; - } - - @Override - @NotNull - public Map getParameters() - { - if (parameters == null) - { - parameters = new HashMap<>(); - } - return parameters; - } - - @Override - @SuppressWarnings("unchecked") - public J setParameters(Map parameters) - { - this.parameters = parameters; - return (J) this; - } - - @Override - @NotNull - public String getClassName() - { - return className; - } - - @Override - @NotNull - @SuppressWarnings("unchecked") - public J setClassName(String className) - { - this.className = className; - return (J) this; - } - - /** - * If the call originates as a live page call, or a supporting servlet call - * - * @return - */ - public boolean isPageCall() - { - return pageCall; - } - - /** - * If the call originates as a live page call, or a supporting servlet call - * - * @param pageCall - * @return - */ - @SuppressWarnings("unchecked") - public J setPageCall(boolean pageCall) - { - this.pageCall = pageCall; - return (J) this; - } - - /** - * Returns the sent through state of the session storage - * - * @return - */ - public Map getSessionStorage() - { - if (sessionStorage == null) - { - sessionStorage = new HashMap<>(); - } - return sessionStorage; - } - - /** - * Sets the call list for session storage - * - * @param sessionStorage - * @return - */ - public J setSessionStorage(Map sessionStorage) - { - this.sessionStorage = sessionStorage; - return (J) this; - } - - /** - * Gets the local storage - * - * @return - */ - public Map getLocalStorage() - { - if (localStorage == null) - { - localStorage = new HashMap<>(); - } - return localStorage; - } - - /** - * Sets local storage - * - * @param localStorage - * @return - */ - public J setLocalStorage(Map localStorage) - { - this.localStorage = localStorage; - return (J) this; - } - - - @JsonAnyGetter - public Map getUnknownFields() - { - return unknownFields; - } - - @JsonAnySetter - public void setOtherField(String name, Object value) - { - unknownFields.put(name, value); - } - - - public Map getAttributes() - { - if (attributes == null) - { - attributes = new HashMap<>(); - } - return attributes; - } - - @SuppressWarnings("unchecked") - public J setAttributes(Map attributes) - { - this.attributes = attributes; - return (J) this; - } - - public HeadersDTO getHeaders() - { - return headers; - } - - public AjaxCall setHeaders(HeadersDTO headers) - { - this.headers = headers; - return this; - } - - public String getRoute() - { - return route; - } - - public AjaxCall setRoute(String route) - { - this.route = route; - return this; - } - - public Map getState() - { - return state; - } - - public AjaxCall setState(Map state) - { - this.state = state; - return this; - } - - public Map getHistory() - { - return history; - } - - public AjaxCall setHistory(Map history) - { - this.history = history; - return this; - } -} diff --git a/src/main/java/com/jwebmp/core/base/ajax/AjaxComponentInsertType.java b/src/main/java/com/jwebmp/core/base/ajax/AjaxComponentInsertType.java deleted file mode 100644 index a91d92de1..000000000 --- a/src/main/java/com/jwebmp/core/base/ajax/AjaxComponentInsertType.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.ajax; - -/** - * @author GedMarc - * @since 22 Apr 2017 - */ -public enum AjaxComponentInsertType -{ - Replace, - Append, - Prepend, - Insert, - Remove, - Insert_Last("InsertLast"); - /** - * Any sub data - */ - private String data; - - /** - * A new AjaxComponentInsertType - */ - AjaxComponentInsertType() - { - - } - - /** - * A new AjaxComponentInsertType with data - */ - AjaxComponentInsertType(String data) - { - - } - - /** - * Returns the name or the data contained within - * - * @return - */ - @Override - public String toString() - { - if (data != null && !data.isEmpty()) - { - return data; - } - else - { - return name(); - } - } -} diff --git a/src/main/java/com/jwebmp/core/base/ajax/AjaxComponentUpdates.java b/src/main/java/com/jwebmp/core/base/ajax/AjaxComponentUpdates.java deleted file mode 100644 index 4fc5f23ba..000000000 --- a/src/main/java/com/jwebmp/core/base/ajax/AjaxComponentUpdates.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.ajax; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.jwebmp.core.base.ComponentHierarchyBase; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; -import com.jwebmp.core.htmlbuilder.javascript.JavaScriptPart; - -import jakarta.validation.constraints.NotNull; - -/** - * A JSON Class for component updates - */ -public class AjaxComponentUpdates> - extends JavaScriptPart -{ - /** - * The stored HTML - */ - @JsonProperty("html") - private String html; - /** - * An assigned ID for a component action - */ - @JsonProperty("id") - private String id; - /** - * The type for an action, defaulted to Replace - */ - @JsonProperty("insertType") - private AjaxComponentInsertType insertType; - - /** - * Constructs an update class from a given component - * - * @param component - */ - public AjaxComponentUpdates(IComponentHierarchyBase component) - { - component.setTiny(true); - html = component.toString(true); - id = component.asBase().getID(); - insertType = AjaxComponentInsertType.Replace; - } - - /** - * Returns the HTML of the component - * - * @return - */ - public String getHtml() - { - return html; - } - - /** - * Sets the HTML - * - * @param html - */ - @SuppressWarnings("unchecked") - @NotNull - public J setHtml(String html) - { - this.html = html; - return (J) this; - } - - /** - * Returns which component ID is getting replaced - * - * @return - */ - public String getId() - { - return id; - } - - /** - * Sets the ID being used for the insert type - * - * @param id - */ - @SuppressWarnings("unchecked") - @NotNull - public J setId(String id) - { - this.id = id; - return (J) this; - } - - /** - * Sets the type of insert that should occur on component ID - * - * @return - */ - public AjaxComponentInsertType getInsertType() - { - return insertType; - } - - /** - * Sets the type of insert that should occur on component ID - * - * @param insertType - */ - @SuppressWarnings("unchecked") - @NotNull - public J setInsertType(AjaxComponentInsertType insertType) - { - this.insertType = insertType; - return (J) this; - } - -} diff --git a/src/main/java/com/jwebmp/core/base/ajax/AjaxResponse.java b/src/main/java/com/jwebmp/core/base/ajax/AjaxResponse.java deleted file mode 100644 index b575a02d6..000000000 --- a/src/main/java/com/jwebmp/core/base/ajax/AjaxResponse.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.ajax; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.guicedee.guicedservlets.servlets.services.scopes.CallScope; -import com.guicedee.services.jsonrepresentation.IJsonRepresentation; -import com.jwebmp.core.Feature; -import com.jwebmp.core.htmlbuilder.javascript.JavaScriptPart; -import jakarta.validation.constraints.NotNull; - -import java.util.*; - -/** - * A response sent back to the client - * - * @author GedMarc - * @since 27 Apr 2016 - */ -@SuppressWarnings("MissingClassJavaDoc") -@CallScope -public class AjaxResponse> - extends JavaScriptPart { - /** - * Whether or not the response is a success or not - */ - @JsonProperty("success") - private boolean success = true; - - /** - * All relevant client reactions to perform - */ - @JsonProperty("reactions") - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private Set> reactions; - - /** - * An additional list of features that can fire - */ - @JsonIgnore - private Set> features; - - /** - * A list of local storage items and their keys - */ - private Map localStorage; - - /** - * A list of local storage items and their keys - */ - private Map sessionStorage; - - private Map properties = new HashMap<>(); - - public Map getProperties() { - return properties; - } - - @JsonProperty("data") - private Map dataReturns = new HashMap<>(); - - public J addDataResponse(String listener, IJsonRepresentation json) { - dataReturns.put(listener, json); - return (J) this; - } - - public J addDataResponse(String listener, Map json) throws Exception { - dataReturns.put(listener, json); - return (J) this; - } - - public J addDataResponse(String listener, String result){ - dataReturns.put(listener, result); - return (J) this; - } - - /** - * Sets the properties for this response - * - * @param properties - * @return - */ - public AjaxResponse setProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Returns all the feature queries for the given response - * - * @return - */ - @JsonProperty("features") - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @SuppressWarnings("unused") - protected Set getFeatureQueries() { - Set list = new LinkedHashSet<>(); - getFeatures().forEach(feature -> - { - feature.preConfigure(); - list.add(feature.renderJavascript() - .toString()); - }); - return list; - } - - /** - * Gets features assigned to the response - * - * @return - */ - public Set> getFeatures() { - if (features == null) { - features = new TreeSet<>(); - } - return features; - } - - /** - * Sets features assigned to the response - * - * @param features - */ - public void setFeatures(Set> features) { - this.features = features; - } - - /** - * If the server action was a success - * - * @return - */ - public boolean isSuccess() { - return success; - } - - /** - * If the server action was a success, default is no - * - * @param success - */ - public void setSuccess(boolean success) { - this.success = success; - } - - /** - * Convenience method to add a feature to the feature group - * - * @param feature The feature to add - * @return J Always this - */ - @SuppressWarnings("unchecked") - public J addFeature(Feature feature) { - getFeatures().add(feature); - return (J) this; - } - - /** - * Adds a client reaction to be performed - * - * @param reaction - */ - @SuppressWarnings("unchecked") - @NotNull - public J addReaction(AjaxResponseReaction reaction) { - getReactions().add(reaction); - return (J) this; - } - - /** - * Returns the list of client reactions available - * - * @return - */ - public Set> getReactions() { - if (reactions == null) { - reactions = new LinkedHashSet<>(); - } - return reactions; - } - - /** - * Returns the map going back for the local storage - * - * @return - */ - public Map getLocalStorage() { - if (localStorage == null) { - localStorage = new HashMap<>(); - } - return localStorage; - } - - /** - * Sets the map for the local storage going back - * - * @param localStorage - */ - public void setLocalStorage(Map localStorage) { - this.localStorage = localStorage; - } - - /** - * Gets the local session going back - * - * @return - */ - public Map getSessionStorage() { - if (sessionStorage == null) { - sessionStorage = new HashMap<>(); - } - return sessionStorage; - } - - /** - * The session storage going back - * - * @param sessionStorage - */ - public void setSessionStorage(Map sessionStorage) { - this.sessionStorage = sessionStorage; - } - -} diff --git a/src/main/java/com/jwebmp/core/base/ajax/AjaxResponseReaction.java b/src/main/java/com/jwebmp/core/base/ajax/AjaxResponseReaction.java deleted file mode 100644 index 292a2199d..000000000 --- a/src/main/java/com/jwebmp/core/base/ajax/AjaxResponseReaction.java +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.ajax; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.jwebmp.core.htmlbuilder.javascript.JavaScriptPart; - -/** - * Denotes a specific reaction to occur at the client - * - * @author GedMarc - * @since 27 Apr 2016 - */ -@SuppressWarnings({"unused", "MissingClassJavaDoc"}) -@JsonInclude(JsonInclude.Include.NON_EMPTY) -public class AjaxResponseReaction> - extends JavaScriptPart - -{ - /** - * The title of the reaction - */ - @JsonProperty("reactionTitle") - private String reactionTitle; - /** - * The message of the reaction - */ - @JsonProperty("reactionMessage") - private String reactionData; - /** - * The actual reaction - */ - @JsonProperty("reactionType") - private ReactionType reactionType; - - /** - * Field responseType - */ - @JsonProperty("type") - private AjaxResponseType responseType; - /** - * Any applicable options - */ - private JavaScriptPart options; - - /** - * Action timeout for request - */ - private int actionTimeout; - - /** - * Constructs a response reaction - */ - public AjaxResponseReaction() - { - this(null); - } - - /** - * Constructs a reaction with the given message as a dialog - * - * @param reactionData - * The data if necessary (usually is) - */ - public AjaxResponseReaction(String reactionData) - { - this(null, reactionData); - } - - /** - * Constructs a reaction with the given title and message - * - * @param reactionTitle - * The title if necessary - * @param reactionData - * The data if necessary (usually is) - */ - public AjaxResponseReaction(String reactionTitle, String reactionData) - { - this(reactionTitle, reactionData, null); - } - - /** - * Constructs a reaction with the given parameters - * - * @param reactionTitle - * The title if necessary - * @param reactionData - * The data if necessary (usually is) - * @param reactionType - * The specific response type (info, danger, warning etc) - */ - public AjaxResponseReaction(String reactionTitle, String reactionData, ReactionType reactionType) - { - this(reactionTitle, reactionData, reactionType, null); - } - - /** - * Constructs a reaction with the given parameters - * - * @param reactionTitle - * The title if necessary - * @param reactionData - * The data if necessary (usually is) - * @param reactionType - * The specific reaction type (dialog, redirect etc) - * @param responseType - * The specific response type (info, danger, warning etc) - */ - public AjaxResponseReaction(String reactionTitle, String reactionData, ReactionType reactionType, AjaxResponseType responseType) - { - this(reactionTitle, reactionData, reactionType, responseType, null); - } - - /** - * Constructs a reaction with the given parameters - * - * @param reactionTitle - * The title if necessary - * @param reactionData - * The data if necessary (usually is) - * @param reactionType - * The specific reaction type (dialog, redirect etc) - * @param responseType - * The specific response type (info, danger, warning etc) - * @param options - * Apply options, usually BootstrapDialogOptions for dialog displays - */ - public AjaxResponseReaction(String reactionTitle, String reactionData, ReactionType reactionType, AjaxResponseType responseType, JavaScriptPart options) - { - setReactionTitle(reactionTitle); - setReactionData(reactionData); - setReactionType(reactionType); - setResponseType(responseType); - setOptions(options); - } - - /** - * Constructs a reaction with the given message - * - * @param reactionData - * The data if necessary (usually is) - * @param reactionType - * The specific reaction type (dialog, redirect etc) - */ - public AjaxResponseReaction(String reactionData, ReactionType reactionType) - { - this(null, reactionData, reactionType); - } - - /** - * Constructs a redirection response after the specific seconds - * - * @param reactionData - * The URL to point to - * @param actionTimeout - * After how long to do it in milliseconds - */ - @SuppressWarnings("") - public AjaxResponseReaction(String reactionData, int actionTimeout) - { - this(null, reactionData, ReactionType.RedirectUrl, null); - setActionTimeout(actionTimeout); - } - - /** - * Returns the given reaction title - * - * @return The reactions title - */ - public String getReactionTitle() - { - return reactionTitle; - } - - /** - * Sets the given reaction title - * - * @param reactionTitle - * The reactions title - * - * @return This object - */ - public AjaxResponseReaction setReactionTitle(String reactionTitle) - { - this.reactionTitle = reactionTitle; - return this; - } - - /** - * Gets the reaction message - * - * @return the reaction data - */ - public String getReactionData() - { - return reactionData; - } - - /** - * * - * Sets the given reaction message - * - * @param reactionData - * Sets the data for the reaction - * - * @return This object - */ - public AjaxResponseReaction setReactionData(String reactionData) - { - this.reactionData = reactionData; - return this; - } - - /** - * Gets the reaction type - * - * @return The assigned reaction type - */ - public ReactionType getReactionType() - { - return reactionType; - } - - /** - * Sets the reaction type - * - * @param reactionType - * Ses the reaction type or defaults to dialog display - * - * @return This object - */ - public AjaxResponseReaction setReactionType(ReactionType reactionType) - { - this.reactionType = reactionType == null ? ReactionType.DialogDisplay : reactionType; - return this; - } - - /** - * Gets the response type for the reaction - * - * @return The assigned response type - */ - public AjaxResponseType getResponseType() - { - return responseType; - } - - /** - * Sets the response type for the reaction - * - * @param responseType - * Sets the response type or info by default - * - * @return This object - */ - public AjaxResponseReaction setResponseType(AjaxResponseType responseType) - { - this.responseType = responseType == null ? AjaxResponseType.Info : responseType; - return this; - } - - /** - * Apply a timeout before a navigation reaction occurs - * - * @return The timeout for the action to occur - */ - public int getActionTimeout() - { - return actionTimeout; - } - - /** - * Apply a timeout before a navigation reaction occurs - * - * @param actionTimeout - * The timeout for the action to occur - * - * @return This object - */ - @SuppressWarnings({"WeakerAccess", "UnusedReturnValue"}) - public AjaxResponseReaction setActionTimeout(int actionTimeout) - { - this.actionTimeout = actionTimeout; - return this; - } - - /** - * Assigns options to the response - * - * @return Any assigned options as a java script part (json) - */ - public JavaScriptPart getOptions() - { - return options; - } - - /** - * Sets the options of the response - * - * @param options - * The assigned options as a java script part (json) - * - * @return This object - */ - public AjaxResponseReaction setOptions(JavaScriptPart options) - { - this.options = options; - return this; - } -} diff --git a/src/main/java/com/jwebmp/core/base/ajax/AjaxResponseType.java b/src/main/java/com/jwebmp/core/base/ajax/AjaxResponseType.java deleted file mode 100644 index 1a65aaba6..000000000 --- a/src/main/java/com/jwebmp/core/base/ajax/AjaxResponseType.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.ajax; - -/** - * The list of bootstrap dialogue message types, used globally because its a complete list - * - * @author GedMarc - * @since 09 May 2016 - */ -public enum AjaxResponseType -{ - Default("Default"), - Primary("Primary"), - Success("Success"), - Info("Information"), - Warning("Warning"), - Danger("Danger"); - - private String valueString; - - /** - * Constructs with the given value string - * - * @param valueString - */ - AjaxResponseType(String valueString) - { - this.valueString = valueString; - } - - /** - * Returns the value string associated with this type - * - * @return - */ - @Override - public String toString() - { - return valueString; - } -} diff --git a/src/main/java/com/jwebmp/core/base/ajax/AlwaysEmptySerializer.java b/src/main/java/com/jwebmp/core/base/ajax/AlwaysEmptySerializer.java deleted file mode 100644 index ded49b6f5..000000000 --- a/src/main/java/com/jwebmp/core/base/ajax/AlwaysEmptySerializer.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.ajax; - -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; - -import java.io.IOException; - -/** - * @author GedMarc - * @since Nov 9, 2016 - */ -class AlwaysEmptySerializer - extends JsonSerializer -{ - /** - * Always serialize as an empty serialization - */ - public AlwaysEmptySerializer() - { - //Nothing required here - } - - @Override - public void serialize(Object t, JsonGenerator jg, SerializerProvider sp) throws IOException - { - jg.writeNull(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/ajax/HeadersDTO.java b/src/main/java/com/jwebmp/core/base/ajax/HeadersDTO.java deleted file mode 100644 index 26e85bc78..000000000 --- a/src/main/java/com/jwebmp/core/base/ajax/HeadersDTO.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.jwebmp.core.base.ajax; - -import com.fasterxml.jackson.annotation.*; - -import java.util.*; - -@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, - getterVisibility = JsonAutoDetect.Visibility.NONE, - setterVisibility = JsonAutoDetect.Visibility.NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class HeadersDTO -{ - public String useragent; - public String referer; - public String myIP; - public String appClassName; - - public String getUseragent() { - return useragent; - } - - public HeadersDTO setUseragent(String useragent) { - this.useragent = useragent; - return this; - } - - public String getReferer() { - return referer; - } - - public HeadersDTO setReferer(String referer) { - this.referer = referer; - return this; - } - - public String getMyIP() { - return myIP; - } - - public HeadersDTO setMyIP(String myIP) { - this.myIP = myIP; - return this; - } - - private Map unknownFields = new HashMap<>(); - - @JsonAnyGetter - public Map getUnknownFields() - { - return unknownFields; - } - - @JsonAnySetter - public void setOtherField(String name, Object value) - { - unknownFields.put(name, value); - } - - public String getAppClassName() - { - return appClassName; - } - - public HeadersDTO setAppClassName(String appClassName) - { - this.appClassName = appClassName; - return this; - } -} diff --git a/src/main/java/com/jwebmp/core/base/ajax/IAjaxCall.java b/src/main/java/com/jwebmp/core/base/ajax/IAjaxCall.java deleted file mode 100644 index 185a12e63..000000000 --- a/src/main/java/com/jwebmp/core/base/ajax/IAjaxCall.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.jwebmp.core.base.ajax; - -import com.guicedee.services.jsonrepresentation.IJsonRepresentation; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; -import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import jakarta.validation.constraints.NotNull; - -import java.util.Date; -import java.util.Map; - -public interface IAjaxCall> extends IJsonRepresentation -{ - /** - * Returns this component ID - * - * @return - */ - String getComponentId(); - - /** - * Creates this as a copy from the incoming call - * - * @param incoming - */ - - J fromCall(AjaxCall incoming); - - /** - * Returns this date time of this call - * - * @return - */ - Date getDatetime(); - - /** - * Sets this calls component - * - * @param component - */ - - J setComponent(IComponentHierarchyBase component); - - /** - * Gets event type - * - * @return - */ - EventTypes getEventType(); - - /** - * Sets this component ID - * - * @param componentId - */ - - J setComponentId(String componentId); - - /** - * Sets the date time of this call - * - * @param datetime - */ - - J setDatetime(Date datetime); - - /** - * Returns this calls component - * - * @return - */ - IComponentHierarchyBase getComponent(); - - /** - * Sets the event type - * - * @param eventType - */ - - J setEventType(EventTypes eventType); - - /** - * Returns a list of parameters - * - * @return - */ - @NotNull - Map getParameters(); - - /** - * Sets the list of parameters - * - * @param parameters - */ - - J setParameters(Map parameters); - - /** - * Returns the event class this event is associated with - * - * @return - */ - @NotNull - String getClassName(); - - /** - * Sets the class name this event is associated with - * - * @param className - */ - @NotNull - - J setClassName(String className); -} diff --git a/src/main/java/com/jwebmp/core/base/ajax/JsonVariable.java b/src/main/java/com/jwebmp/core/base/ajax/JsonVariable.java deleted file mode 100644 index 0b9716733..000000000 --- a/src/main/java/com/jwebmp/core/base/ajax/JsonVariable.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.ajax; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.guicedee.guicedinjection.GuiceContext; -import com.guicedee.guicedinjection.interfaces.ObjectBinderKeys; -import com.guicedee.services.jsonrepresentation.IJsonRepresentation; -import com.jwebmp.core.htmlbuilder.javascript.JavaScriptPart; -import lombok.extern.java.Log; - -import java.io.IOException; -import java.io.Serializable; -import java.util.*; -import java.util.logging.Level; - -/** - * DTO for angular variable transfers forward and back - * - * @author GedMarc - * @since 08 May 2016 - */ -@SuppressWarnings({"JavaDoc", "unused"}) -@Log -public class JsonVariable - extends JavaScriptPart -{ - - /** - * The variable name to use - */ - private String variableName; - /** - * The object to assign - */ - @JsonFormat(shape = JsonFormat.Shape.STRING) - @JsonDeserialize(using = ObjectToStringDeserialize.class) - @JsonSerialize(using = AlwaysEmptySerializer.class) - private String variableText; - /** - * The actual variable object - */ - private Object variable; - /** - * The owner id of this DTO - */ - @JsonProperty(value = "$jwid") - private String ownerId; - - /** - * Constructs a blank object - */ - public JsonVariable() - { - } - - /** - * Constructs a new instance with a given name and object - * - * @param variableName The variable name to apply - * @param variableObject The JSON object to use - */ - public JsonVariable(String variableName, String variableObject) - { - this.variableName = variableName; - variableText = variableObject; - variable = variableText; - } - - /** - * Constructs a new instance with a given name and object - * - * @param variableName The variable name to apply - * @param variableObject The JSON object to use - */ - public JsonVariable(String variableName, Object variableObject) - { - this.variableName = variableName; - variable = variableObject; - } - - /** - * Constructs a new instance with a given name and object - * - * @param variableName The variable name to apply - * @param variableObject The JSON object to use - */ - public JsonVariable(String variableName, JavaScriptPart variableObject) - { - this.variableName = variableName; - variable = variableObject; - } - - /** - * Gets the DTO Form of this object - * - * @param The type this object actually is - * @param classType The class type to return - * @return The DTO direct from the call - * @throws IOException - */ - public T getDto(Class classType) throws IOException - { - T output = IJsonRepresentation.From(variableText, classType); - variable = output; - return output; - } - - /** - * Gets the variable name - * - * @return - */ - public String getVariableName() - { - return variableName; - } - - /** - * Sets the variable name - * - * @param variableName - */ - public void setVariableName(String variableName) - { - this.variableName = variableName; - } - - /** - * Returns the variable if any is applied - * - * @return - */ - public Object getVariable() - { - return variable; - } - - /** - * Sets the variable if any is applied - * - * @param variable - */ - public JsonVariable setVariable(Serializable variable) - { - this.variable = variable; - return this; - } - - /** - * Sets the owning component ID - * - * @return - */ - @Override - public String getReferenceId() - { - return ownerId; - } - - /** - * Gets the owning component ID - * - * @param referenceId - */ - @Override - public void setReferenceId(String referenceId) - { - ownerId = referenceId; - } - - /** - * @return - */ - @SuppressWarnings("Convert2Diamond") - public Map asMap() - { - String variableText = getVariableText(); - TypeReference> typeRef - = new TypeReference>() - { - }; - try - { - return GuiceContext.get(ObjectBinderKeys.DefaultObjectMapper) - .readValue(variableText, typeRef); - } - catch (JsonProcessingException e) - { - return new HashMap<>(); - } - - } - - /** - * @return - */ - @SuppressWarnings("Convert2Diamond") - public List> asListMap() - { - String variableText = getVariableText(); - TypeReference>> typeRef - = new TypeReference>>() - { - }; - try - { - return GuiceContext.get(ObjectBinderKeys.DefaultObjectMapper) - .readValue(variableText, typeRef); - } - catch (JsonProcessingException e) - { - return new ArrayList<>(); - } - - } - - - /** - * Returns the variable object in the format requested - * - * @param Generic type of JavaScript part - * @param classType - * @return - */ - public T as(Class classType) - { - try - { - T instance = GuiceContext.get(classType); - return IJsonRepresentation.From(getVariableText(), classType); - } - catch (Exception e) - { - log.log(Level.WARNING, "Error in decoding Ajax Response Variable", e); - return null; - } - } - - /** - * Gets a variable object or blank so it at least gets instantiated - * - * @return - */ - public String getVariableText() - { - return variableText; - } - - /** - * Sets the variable name to a new object - * - * @param variableText - */ - public JsonVariable setVariableText(String variableText) - { - this.variableText = variableText; - return this; - } - - /** - * Returns the variable object in the format requested - * - * @param Generic type of JavaScript part - * @return - */ - public T update(T object) - { - try - { - ObjectMapper om = GuiceContext.get(ObjectMapper.class); - om.readerForUpdating(object) - .readValue(getVariableText()); - return object; - } - catch (Exception e) - { - log.log(Level.WARNING, "Error in decoding Ajax Response Variable", e); - return null; - } - } - - @Override - public boolean equals(Object o) - { - if (this == o) - { - return true; - } - if (o == null || getClass() != o.getClass()) - { - return false; - } - JsonVariable that = (JsonVariable) o; - return Objects.equals(getVariableName(), that.getVariableName()); - } - - @Override - public int hashCode() - { - return Objects.hash(getVariableName()); - } -} diff --git a/src/main/java/com/jwebmp/core/base/ajax/ObjectToStringDeserialize.java b/src/main/java/com/jwebmp/core/base/ajax/ObjectToStringDeserialize.java deleted file mode 100644 index 286662014..000000000 --- a/src/main/java/com/jwebmp/core/base/ajax/ObjectToStringDeserialize.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.ajax; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.JsonNode; -import com.jwebmp.core.htmlbuilder.javascript.JavaScriptPart; - -import java.io.IOException; - -/** - * Deserializes a field returned in JSON as an object into a string - * - * @author GedMarc - * @since Nov 9, 2016 - */ -class ObjectToStringDeserialize - extends JsonDeserializer -{ - /** - * An instant to serialize everything as tostring - */ - public ObjectToStringDeserialize() - { - //No config needed - } - - @Override - public Object deserialize(JsonParser jp, DeserializationContext dc) throws IOException - { - JsonNode node = jp.readValueAsTree(); - return new JavaScriptPart().objectAsString(node); - } -} diff --git a/src/main/java/com/jwebmp/core/base/ajax/ReactionType.java b/src/main/java/com/jwebmp/core/base/ajax/ReactionType.java deleted file mode 100644 index da7ffc0b5..000000000 --- a/src/main/java/com/jwebmp/core/base/ajax/ReactionType.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.ajax; - -/** - * Reaction Types? - * - * @author GedMarc - * @since 27 Apr 2016 - */ -public enum ReactionType -{ - /** - * Displays a normal message using the System variables messages - */ - MessageDisplay, - /** - * Displays a dialogue using the bootstrap dialog - */ - DialogDisplay, - /** - * Navigates to a new page - */ - RedirectUrl, - /** - * Creates a new window with the URL - */ - PopoutUrl, - /** - * Refreshes the current page - */ - RefreshPage, - /** - * Signals an event listener on a data component to trigger a data refresh - */ - SignalDataTrigger, - /** - * Send the user back home - */ - RedirectHome, -} diff --git a/src/main/java/com/jwebmp/core/base/client/BrowserGroups.java b/src/main/java/com/jwebmp/core/base/client/BrowserGroups.java deleted file mode 100644 index 7739d3ef4..000000000 --- a/src/main/java/com/jwebmp/core/base/client/BrowserGroups.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.client; - -/** - * Specifies the different browser groups currently catered for - * - * @author MMagon - * @version 1.0 - * @since 22 Jun 2013 - */ -public enum BrowserGroups -{ - /** - * Defines an Internet explorer browser - */ - InternetExplorer, - /** - * Defines a FireFox browser - */ - Firefox, - /** - * Defines an Opera browser - */ - Opera, - /** - * Safari - */ - Safari, - /* - * Defines the chrome browser - */ - Chrome, - /** - * * - * Defines Edge - */ - Edge -} diff --git a/src/main/java/com/jwebmp/core/base/client/Browsers.java b/src/main/java/com/jwebmp/core/base/client/Browsers.java deleted file mode 100644 index 0c2c5bc2d..000000000 --- a/src/main/java/com/jwebmp/core/base/client/Browsers.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.client; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.ArrayList; -import java.util.List; - -/** - * Lists Browsers and their capable CSS. Stores when the compatibility changed per version Only includes the version number where the CSS and HTML version changes. - * - * @author MMagon - * @version 1.0 - * @since 22 Jun 2013 - */ -@JsonAutoDetect(fieldVisibility = Visibility.ANY, - getterVisibility = Visibility.NONE, - setterVisibility = Visibility.NONE) -@JsonInclude(Include.NON_NULL) -@JsonFormat(shape = JsonFormat.Shape.OBJECT) -public enum Browsers -{ - /** - * Specifies the compatibility associated with the browser InternetExplorer 5 - */ - InternetExplorer55(CSSVersions.CSS1, HTMLVersions.XHTML11, 5.5, BrowserGroups.InternetExplorer), - /** - * Specifies the compatibility associated with the browser InternetExplorer 6 - */ - InternetExplorer6(CSSVersions.CSS2, HTMLVersions.XHTML11, 6, BrowserGroups.InternetExplorer), - /** - * Specifies the compatibility associated with the browser InternetExplorer 7 - */ - InternetExplorer7(CSSVersions.CSS21, HTMLVersions.XHTML11, 7, BrowserGroups.InternetExplorer), - /** - * Specifies the compatibility associated with the browser InternetExplorer 8 - */ - InternetExplorer8(CSSVersions.CSS21, HTMLVersions.XHTML11, 8, BrowserGroups.InternetExplorer), - /** - * Specifies the compatibility associated with the browser InternetExplorer 8 CM - */ - InternetExplorer8CompatibilityMode(CSSVersions.CSS2, HTMLVersions.HTML401Loose, 7, BrowserGroups.InternetExplorer), - /** - * Specifies the compatibility associated with the browser InternetExplorer 9 CM - */ - InternetExplorer9CompatibilityMode(CSSVersions.CSS2, HTMLVersions.HTML401Loose, 7, BrowserGroups.InternetExplorer), - /** - * Specifies the compatibility associated with the browser InternetExplorer 9 - */ - InternetExplorer9(CSSVersions.CSS3, HTMLVersions.HTML5, 9, BrowserGroups.InternetExplorer), - /** - * Specifies the compatibility associated with the browser InternetExplorer 10 - */ - InternetExplorer10(CSSVersions.CSS3, HTMLVersions.HTML5, 10, BrowserGroups.InternetExplorer), - /** - * Specifies the compatibility associated with the browser InternetExplorer 10 - */ - InternetExplorer13(CSSVersions.CSS3, HTMLVersions.HTML5, 10, BrowserGroups.InternetExplorer), - /** - * Specifies the compatibility associated with the browser InternetExplorer 10 - */ - Edge(CSSVersions.CSS3, HTMLVersions.HTML5, 13, BrowserGroups.Edge), - /** - * Specifies the compatibility associated with the browser FireFox 2 - */ - Firefox2(CSSVersions.CSS21, HTMLVersions.XHTML11, 2, BrowserGroups.Firefox), - /** - * Specifies the compatibility associated with the browser FireFox 19 - */ - Firefox19(CSSVersions.CSS3, HTMLVersions.HTML5, 19, BrowserGroups.Firefox), - /** - * Specifies the compatibility associated with the browser Chrome - */ - Chrome(CSSVersions.CSS3, HTMLVersions.HTML5, 19, BrowserGroups.Chrome), - /** - * Specifies the compatibility associated with the browser Opera 9 - */ - Opera9(CSSVersions.CSS3, HTMLVersions.XHTML401Loose, 9, BrowserGroups.Opera), - /** - * Specifies the compatibility associated with the browser Opera 11 - */ - Opera11(CSSVersions.CSS3, HTMLVersions.HTML5, 11, BrowserGroups.Opera), - /** - * Specifies the compatibility associated with the browser Safari 3 - */ - Safari3(CSSVersions.CSS3, HTMLVersions.XHTML401Loose, 3, BrowserGroups.Safari), - /** - * Specifies the compatibility associated with the browser Safari 5 - */ - Safari5(CSSVersions.CSS3, HTMLVersions.HTML5, 5, BrowserGroups.Safari), - /** - * Specifies the compatibility associated with the browser Custom or Undefined - */ - Custom(CSSVersions.CSS3, HTMLVersions.Custom, 5.5, BrowserGroups.InternetExplorer); - - @JsonProperty("cssVersion") - private CSSVersions capableCSSVersion; - @JsonProperty("browserGroup") - private BrowserGroups browserGroup; - @JsonProperty("htmlVersion") - private HTMLVersions htmlVersion; - @JsonProperty("browserLastCssHtmlUpdate") - private double browserVersion; - - /** - * Constructs a Browser for the Enumeration - * - * @param capableCSSVersion - * The CSS Version - * @param capableHTMLVersion - * The HTML Version - * @param browserVersion - * The Browser Version - * @param browserGroup - * The Browser Group - */ - Browsers(CSSVersions capableCSSVersion, HTMLVersions capableHTMLVersion, double browserVersion, BrowserGroups browserGroup) - { - this.capableCSSVersion = capableCSSVersion; - this.browserGroup = browserGroup; - htmlVersion = capableHTMLVersion; - this.browserVersion = browserVersion; - } - - /** - * Gets the browser object for a browser group name and version - * - * @param name - * The name of the browser in the header file - * @param version - * The version of the browser in the header file - * - * @return The browser object applicable - */ - public static Browsers getBrowserFromNameAndVersion(String name, double version) - { - List browsers = getBrowsersForGroup(name); - double maxCapableVersion = 0.0; - Browsers maxCapabableBrowser = Firefox19; - for (Browsers browsers1 : browsers) - { - if (browsers1.getBrowserVersion() > maxCapableVersion) - { - maxCapableVersion = browsers1.getBrowserVersion(); - maxCapabableBrowser = browsers1; - } - } - if (maxCapableVersion < version) - { - return maxCapabableBrowser; - } - - for (Browsers browsers1 : browsers) - { - if (browsers1.getBrowserVersion() < version) - { - return browsers1; - } - } - return maxCapabableBrowser; - } - - /** - * Returns all the browsers that exist in a group - * - * @param group - * The group name - * - * @return A list of browsers - */ - public static List getBrowsersForGroup(String group) - { - String groupRead = group; - if ("Trident".equalsIgnoreCase(group)) - { - groupRead = "Internet Explorer"; - } - ArrayList browsers = new ArrayList(); - for (Browsers browsers1 : values()) - { - if (browsers1.getBrowserGroup() - .name() - .equalsIgnoreCase(groupRead)) - { - browsers.add(browsers1); - } - } - return browsers; - } - - /** - * Gets the browser version - * - * @return The Browser Version - */ - public double getBrowserVersion() - { - return browserVersion; - } - - /** - * Returns the Browser Group - * - * @return The Browser Group - */ - public BrowserGroups getBrowserGroup() - { - return browserGroup; - } - - /** - * Sets the browser group for this enumeration - * - * @param browserGroup - */ - public void setBrowserGroup(BrowserGroups browserGroup) - { - this.browserGroup = browserGroup; - } - - /** - * Sets the browser version - * - * @param browserVersion - */ - public void setBrowserVersion(double browserVersion) - { - this.browserVersion = browserVersion; - } - - /** - * Retrieves the allowed CSS commands available - * - * @return The CSS Version - */ - public CSSVersions getCapableCSSVersion() - { - return capableCSSVersion; - } - - /** - * Sets the capable CSS Version - * - * @param capableCSSVersion - */ - public void setCapableCSSVersion(CSSVersions capableCSSVersion) - { - this.capableCSSVersion = capableCSSVersion; - } - - /** - * Returns the HTML Version - * - * @return The Last HTML Version Allowed - */ - public HTMLVersions getHtmlVersion() - { - return htmlVersion; - } - - /** - * Sets the capable HTML version of this version - * - * @param htmlVersion - */ - public void setHtmlVersion(HTMLVersions htmlVersion) - { - this.htmlVersion = htmlVersion; - } - -} diff --git a/src/main/java/com/jwebmp/core/base/client/CSSVersions.java b/src/main/java/com/jwebmp/core/base/client/CSSVersions.java deleted file mode 100644 index a509bef53..000000000 --- a/src/main/java/com/jwebmp/core/base/client/CSSVersions.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.client; - -/** - * CSS Versions - * CSS 1 - *

- * The first CSS specification to become an official W3C Recommendation is CSS level 1, published in December 1996.[19] Among its capabilities are support for - *

- * Font properties such as typeface and emphasis Color of text, backgrounds, and other elements Text attributes such as spacing between words, letters, and lines of text Alignment - * of text, images, - * tables and other elements Margin, border, padding, and positioning for most elements Unique identification and generic classification of groups of attributes - *

- * The W3C no longer maintains the CSS 1 Recommendation.[20] CSS 2 - *

- * CSS level 2 specification was developed by the W3C and published as a recommendation in May 1998. A superset of CSS 1, CSS 2 includes a number of new capabilities like absolute, - * relative, and fixed - * positioning of elements and z-index, the concept of media types, support for aural style sheets and bidirectional text, and new font properties such as shadows. - *

- * The W3C no longer maintains the CSS 2 recommendation.[21] CSS 2.1 - *

- * CSS level 2 revision 1, often referred to as "CSS 2.1", fixes errors in CSS 2, removes poorly supported or not fully interoperable features and adds already-implemented browser - * extensions to the - * specification. In order to comply with the W3C Process for standardizing technical specifications, CSS 2.1 went back and forth between Working Draft status and Candidate - * Recommendation status for - * many years. CSS 2.1 first became a Candidate Recommendation on February 25, 2004, but it was reverted to a Working Draft on June 13, 2005 for further review. It returned to - * Candidate Recommendation - * on 19 July 2007 and then updated twice in 2009. However, since changes and clarifications were made, it again went back to Last Call Working Draft on 7 December 2010. - *

- * CSS 2.1 went to Proposed Recommendation on 12 April 2011.[22] After being reviewed by the W3C Advisory Committee, it was finally published as a W3C Recommendation on 7 June - * 2011.[23] CSS 3 "CSS3" - * redirects here. For airport code CSS3, see Montréal/Les Cèdres Airport. File:CSS3 logo and wordmark.svg Logo of CSS3 - *

- * Unlike CSS 2, which is a large single specification defining various features, CSS 3 is divided into several separate documents called "modules". Each module adds new - * capabilities or extends - * features defined in CSS 2, over preserving backward compatibility. Work on CSS level 3 started around the time of publication of the original CSS 2 recommendation. The earliest - * CSS 3 drafts were - * published in June 1999.[24] - *

- * Due to the modularization, different modules have different stability and statuses.[25] As of June 2012, there are over fifty CSS modules published from the CSS Working - * Group.,[24] and four of - * these have been published as formal recommendations: - *

- * 2012-06-19 : Media Queries 2011-09-29 : Namespaces 2011-09-29 : Selectors Level 3 2011-06-07 : Color - *

- * Some modules (including Backgrounds and Borders and Multi-column Layout among others) have Candidate Recommendation (CR) status and are considered moderately stable. At CR - * stage, implementations - * are advised to drop vendor prefixes.[26] - * - * @author MMagon - * @version 1.0 - * @since 22 Jun 2013 - */ -public enum CSSVersions -{ - /** - * CSS Version 1.0 - */ - CSS1, - /** - * CSS Version 2.0 - */ - CSS2, - /** - * CSS Version 2.1 - */ - CSS21, - /** - * CSS Version 3 - */ - CSS3, - /** - * CSS Version 4 - */ - CSS4 -} diff --git a/src/main/java/com/jwebmp/core/base/client/HTMLVersions.java b/src/main/java/com/jwebmp/core/base/client/HTMLVersions.java deleted file mode 100644 index 0101d927a..000000000 --- a/src/main/java/com/jwebmp/core/base/client/HTMLVersions.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.client; - -/** - * A list of all possible HTML Version DTD files. Some not used at all, but good to keep. The Ordinal Value denotes priority - * - * @author MMagon - * @version 1.0 - * @since 22 Jun 2013 - */ -public enum HTMLVersions -{ - /* - * Blank HTML 5 - */ - All(""), - /** - * This DTD is equal to XHTML 1.0 Strict, but allows you to add modules (for example to provide ruby support for East-Asian languages). This one first so it never gets - * considered - */ - XHTML11(""), - /** - * This DTD contains all HTML elements and attributes, but does NOT INCLUDE presentational or deprecated elements (like font). Framesets are not allowed. - */ - HTML401Strict(""), - /** - * This DTD contains all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font). Framesets are not allowed. - */ - HTML401Loose(""), - /** - * This DTD is equal to HTML 4.01 Transitional, but allows the use of frameset content. - */ - HTML401Frameset(""), - /** - * This DTD contains all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font). Framesets are not allowed. The markup must also be written - * as well-formed XML. - */ - HTML401Transitional(""), - /** - * This DTD contains all HTML elements and attributes, but does NOT INCLUDE presentational or deprecated elements (like font). Framesets are not allowed. - */ - XHTML401Strict(""), - /** - * This DTD contains all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font). Framesets are not allowed. - */ - XHTML401Loose(""), - /** - * This DTD is equal to HTML 4.01 Transitional, but allows the use of frameset content. - */ - XHTML401Frameset(""), - /** - * Contains all tags valid for HTML 5 - */ - HTML5(""), - /** - * Default to HTML 4.0 Transitional - */ - Custom(""); - private String dtd; - - HTMLVersions(String dtd) - { - this.dtd = dtd; - } - - public String getDtd() - { - return dtd.trim(); - } - - public void setDtd(String dtd) - { - this.dtd = dtd; - } -} diff --git a/src/main/java/com/jwebmp/core/base/client/HttpMethodTypes.java b/src/main/java/com/jwebmp/core/base/client/HttpMethodTypes.java deleted file mode 100644 index 3493f8dba..000000000 --- a/src/main/java/com/jwebmp/core/base/client/HttpMethodTypes.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.client; - -/** - * @author GedMarc - * @since 20 Mar 2017 - */ -public enum HttpMethodTypes -{ - GET, - POST, - DELETE, - PUT; - - /* - * Constructs a new HttpMethodTypes - */ - HttpMethodTypes() - { - //Nothing needed - } -} diff --git a/src/main/java/com/jwebmp/core/base/client/InternetExplorerCompatibilityMode.java b/src/main/java/com/jwebmp/core/base/client/InternetExplorerCompatibilityMode.java deleted file mode 100644 index b83d4b511..000000000 --- a/src/main/java/com/jwebmp/core/base/client/InternetExplorerCompatibilityMode.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.client; - -/** - * Describes valid IE Compatibility Mode Settings. Damn I.E. to Heck - *

- * Just use edge if it is a problem, otherwise you have to actually set the - * DocType to something not HTML5 - *

- * http://msdn.microsoft.com/en-us/library/ff955275%28v=vs.85%29.aspx - *

- * 2.1.2.4 X-UA-Compatibility Meta Tag and HTTP Response Header - *

- * Web developers can also specify a document mode by including instructions in - * a meta element or HTTP response header: - *

- * Webpages that include a meta element (see [HTML]) with an http-equivalent - * value of X-UA-Compatible. - *

- * Webpages that are served with an HTTP header named "X-UA-Compatible". - *

- * If both of these instructions are sent, the developer's preference (meta - * element) takes precedence over the web server setting (HTTP header). - *

- * For more information about how to control default rendering with document - * modes, see "META Tags and Locking in Future Compatibility" at - * [MSDN-METATagsLocking]. - *

- * The X-UA-Compatible value determines Windows Internet Explorer’s document as - * follows:. - * - * @author MMagon - * @version 1.0 - * @since 24 Jun 2013 - */ -public enum InternetExplorerCompatibilityMode -{ - - /** - * Quirks mode - */ - IE5("IE=5"), - /** - * IE7 mode - */ - IE7("IE=7"), - /** - * IE7 mode (if a valid <!DOCTYPE> declaration is present) - *

- * Quirks mode (otherwise) - */ - EmulateIE7("IE=Emulate7"), - /** - * Set to IE 8 - */ - IE8("IE=8"), - /** - * IE8 mode (if a valid <!DOCTYPE> declaration is present) - *

- * Quirks mode (otherwise) - */ - EmulateIE8("IE=Emulate8"), - /** - * Set to run in IE 9 (Or Latest Version) - */ - IE9("IE=9"), - /** - * IE9 mode (if a valid <!DOCTYPE> declaration is present) - *

- * Quirks mode (otherwise) - */ - EmulateIE9("IE=Emulate9"), - /** - * IE10 mode - */ - IE10("IE=10"), - /** - * IE10 mode (if a valid <!DOCTYPE> declaration is present) - *

- * Quirks mode (otherwise) - */ - EmulateIE10("IE=Emulate10"), - /** - * IE 11 Mode - */ - IE11("IE=11"), - /** - * IE11 mode (if a valid <!DOCTYPE> declaration is present) - *

- * Quirks mode (otherwise) - */ - EmulateIE11("IE=Emulate11"), - /** - * The highest supported document mode of the browser - */ - Edge("IE=Edge"); - - private final String valueString; - - /** - * The constructor accepting the values for the X-UA-Compatible value. - *

- * - * @param valueString - */ - InternetExplorerCompatibilityMode(String valueString) - { - this.valueString = valueString; - } - - /** - * The value that must be inside the compatible set - *

- * - * @return A string of the value that must be in the X-UA-Compatible string - */ - public String getValue() - { - return valueString; - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/Body.java b/src/main/java/com/jwebmp/core/base/html/Body.java index 4fa81086a..636761bc5 100644 --- a/src/main/java/com/jwebmp/core/base/html/Body.java +++ b/src/main/java/com/jwebmp/core/base/html/Body.java @@ -29,6 +29,7 @@ import com.jwebmp.core.base.html.interfaces.events.BodyEvents; import com.jwebmp.core.base.html.interfaces.events.NoEvents; import com.jwebmp.core.base.servlets.enumarations.ComponentTypes; +import com.jwebmp.core.services.IPage; import jakarta.validation.constraints.NotNull; import java.util.Objects; @@ -63,67 +64,60 @@ * @since 2013/11/20 */ public class Body> - extends Component - implements PageChildren, HtmlChildren, LayoutHandler, ContainerType -{ - - /** - * If this body has rendered the scripts on itself - */ - private boolean renderedScripts; - - /** - * Instantiates an empty body - */ - public Body() - { - this(null); - } - - /** - * Constructs a new Body with the given Page input - * - * @param page - */ - public Body(Page page) - { - super(ComponentTypes.Body); - if (page != null) - { - setPage(page); - } - setID("body"); - - } - - @NotNull - @SuppressWarnings("unchecked") - public J setFullScreen() - { - addStyle("width:100%;height:100%;margin:0px;"); - getPage().addStyle("width:100%;height:100%;margin:0px;"); - return (J) this; - } - - /** - * If the scripts have been rendered - * - * @return - */ - protected boolean isRenderedScripts() - { - return renderedScripts; - } - - /** - * If the scripts have been rendered - * - * @param renderedScripts - * @return - */ - protected Body setRenderedScripts(boolean renderedScripts) - { - this.renderedScripts = renderedScripts; - return this; - } + extends Component + implements PageChildren, HtmlChildren, LayoutHandler, ContainerType { + + /** + * If this body has rendered the scripts on itself + */ + private boolean renderedScripts; + + /** + * Instantiates an empty body + */ + public Body() { + this(null); + } + + /** + * Constructs a new Body with the given Page input + * + * @param page + */ + public Body(IPage page) { + super(ComponentTypes.Body); + if (page != null) { + setPage(page); + } + setID("body"); + + } + + @NotNull + @SuppressWarnings("unchecked") + public J setFullScreen() { + addStyle("width:100%;height:100%;margin:0px;"); + getPage().addStyle("width:100%;height:100%;margin:0px;"); + return (J) this; + } + + /** + * If the scripts have been rendered + * + * @return + */ + protected boolean isRenderedScripts() { + return renderedScripts; + } + + /** + * If the scripts have been rendered + * + * @param renderedScripts + * @return + */ + protected Body setRenderedScripts(boolean renderedScripts) { + this.renderedScripts = renderedScripts; + return this; + } } diff --git a/src/main/java/com/jwebmp/core/base/html/Head.java b/src/main/java/com/jwebmp/core/base/html/Head.java index 000fa8308..a0bdc82db 100644 --- a/src/main/java/com/jwebmp/core/base/html/Head.java +++ b/src/main/java/com/jwebmp/core/base/html/Head.java @@ -24,6 +24,7 @@ import com.jwebmp.core.base.html.interfaces.NoIDTag; import com.jwebmp.core.base.html.interfaces.children.HeadChildren; import com.jwebmp.core.base.html.interfaces.children.HtmlChildren; +import com.jwebmp.core.base.html.interfaces.children.PageChildren; import com.jwebmp.core.base.html.interfaces.events.NoEvents; import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; import com.jwebmp.core.base.servlets.enumarations.ComponentTypes; @@ -68,22 +69,21 @@ *

* * @param - * * @author MMagon - *

- *

+ *

+ *

* @version 1.0 * @since 2013/11/12 */ public class Head> - extends ComponentHierarchyBase - implements NoIDTag, HtmlChildren, NoClassAttribute + extends ComponentHierarchyBase + implements NoIDTag, HtmlChildren, NoClassAttribute, PageChildren { - /** - * Constructs a new Head Tag - */ - public Head() - { - super(ComponentTypes.Head); - } + /** + * Constructs a new Head Tag + */ + public Head() + { + super(ComponentTypes.Head); + } } diff --git a/src/main/java/com/jwebmp/core/base/html/Html.java b/src/main/java/com/jwebmp/core/base/html/Html.java index c3d275fb2..26f5c436b 100644 --- a/src/main/java/com/jwebmp/core/base/html/Html.java +++ b/src/main/java/com/jwebmp/core/base/html/Html.java @@ -21,8 +21,11 @@ import com.jwebmp.core.base.client.*; import com.jwebmp.core.base.html.attributes.*; import com.jwebmp.core.base.html.interfaces.*; +import com.jwebmp.core.base.html.interfaces.children.HtmlChildren; import com.jwebmp.core.base.html.interfaces.events.*; +import com.jwebmp.core.base.interfaces.CastableComponent; import com.jwebmp.core.base.servlets.enumarations.*; +import com.jwebmp.core.services.IPage; import jakarta.validation.constraints.*; /** @@ -59,187 +62,188 @@ * @author GedMarc * @since right from the start, 2007 with radio on live */ -public abstract class Html> - extends Component - implements NoIDTag, NoClassAttribute +public abstract class Html> + extends Component + implements NoIDTag, NoClassAttribute { - /** - * The head object - */ - private Head head; - @JsonProperty("RunningEnvironment") - private DevelopmentEnvironments runningEnvironment = DevelopmentEnvironments.Development; - /** - * The body object - */ - private Body body; - /** - * The HTML Version the page - */ - @SuppressWarnings("FieldMayBeFinal") - private HTMLVersions htmlVersion; - /* - * The current browser of the render - */ - @JsonIgnore - private Browsers browser; - - /** - * Constructs a new HTML Tag with I.E. 10 support - */ - public Html() - { - this(Browsers.Edge); - } - - /** - * Constructs a new HTML Tag with a HTML Version. This supplies the most wanted HTML Version, and CSS Support. When measured the HTML - * Version - *

- * - * @param browser The minimum browser to support. Please don't choose IE5.5, or even 7 for that matter, You're making life difficult. - */ - public Html(Browsers browser) - { - super(ComponentTypes.Html); - htmlVersion = browser.getHtmlVersion(); - head = new Head<>(); - } - - /** - * Renders the DocType for the HTML - *

- * - * @return The associated DocType for the HTML Document - */ - @Override - protected StringBuilder renderBeforeTag() - { - StringBuilder sb = new StringBuilder(); - sb.append(getBrowser().getHtmlVersion() - .getDtd()) - .append(getNewLine()); - return sb; - } - - /** - * Returns the current browser or FireFox - * - * @return - */ - public Browsers getBrowser() - { - if (browser == null) - { - browser = Browsers.Firefox19; - } - return browser; - } - - /** - * Returns the current browser or FireFox - * - * @param browser - */ - public void setBrowser(Browsers browser) - { - this.browser = browser; - } - - @Override - public int hashCode() - { - return super.hashCode(); - } - - @Override - public boolean equals(Object o) - { - return super.equals(o); - } - - /** - * Returns a valid HTML Version - *

- * - * @return Browser - */ - public HTMLVersions getHtmlVersion() - { - return htmlVersion; - } - - /** - * Returns the currently set running environment - *

- * - * @return The current Environment. - */ - public DevelopmentEnvironments getRunningEnvironment() - { - return runningEnvironment; - } - - /** - * Sets the global running environment value - *

- * - * @param runningEnvironmentSetting The running environment value - */ - @SuppressWarnings("unchecked") - @NotNull - public J setRunningEnvironment(DevelopmentEnvironments runningEnvironmentSetting) - { - runningEnvironment = runningEnvironmentSetting; - return (J) this; - } - - /** - * Returns the head object on the HTML Tag - * - * @return - */ - public Head getHead() - { - return head; - } - - /* - * Returns the body object on the HTML Tag - */ - public Body getBody() - { - if (body == null) - { - body = new Body<>((Page) this); - } - return body; - } - - /** - * Sets the body for this class - * - * @param body - */ - @SuppressWarnings("unchecked") - public J setBody(Body body) - { - this.body = body; - return (J) this; - } - - /** - * Sets the header object for this html page - * - * @param head - * @return - */ - @SuppressWarnings("unchecked") - public J setHead(Head head) - { - this.head = head; - return (J) this; - } - - + /** + * The head object + */ + private Head head; + @JsonProperty("runningEnvironment") + private DevelopmentEnvironments runningEnvironment = DevelopmentEnvironments.Development; + /** + * The body object + */ + private Body body; + /** + * The HTML Version the page + */ + @SuppressWarnings("FieldMayBeFinal") + private HTMLVersions htmlVersion; + /* + * The current browser of the render + */ + @JsonIgnore + private Browsers browser; + + /** + * Constructs a new HTML Tag with I.E. 10 support + */ + public Html() + { + this(Browsers.Edge); + } + + /** + * Constructs a new HTML Tag with a HTML Version. This supplies the most wanted HTML Version, and CSS Support. When measured the HTML + * Version + *

+ * + * @param browser The minimum browser to support. Please don't choose IE5.5, or even 7 for that matter, You're making life difficult. + */ + public Html(Browsers browser) + { + super(ComponentTypes.Html); + htmlVersion = browser.getHtmlVersion(); + head = new Head<>(); + } + + /** + * Renders the DocType for the HTML + *

+ * + * @return The associated DocType for the HTML Document + */ + @Override + protected StringBuilder renderBeforeTag() + { + StringBuilder sb = new StringBuilder(); + sb.append(getBrowser().getHtmlVersion() + .getDtd()) + .append(getNewLine()); + return sb; + } + + /** + * Returns the current browser or FireFox + * + * @return + */ + public Browsers getBrowser() + { + if (browser == null) + { + browser = Browsers.Firefox19; + } + return browser; + } + + /** + * Returns the current browser or FireFox + * + * @param browser + */ + public J setBrowser(Browsers browser) + { + this.browser = browser; + return (J) this; + } + + @Override + public int hashCode() + { + return super.hashCode(); + } + + @Override + public boolean equals(Object o) + { + return super.equals(o); + } + + /** + * Returns a valid HTML Version + *

+ * + * @return Browser + */ + public HTMLVersions getHtmlVersion() + { + return htmlVersion; + } + + /** + * Returns the currently set running environment + *

+ * + * @return The current Environment. + */ + public DevelopmentEnvironments getRunningEnvironment() + { + return runningEnvironment; + } + + /** + * Sets the global running environment value + *

+ * + * @param runningEnvironmentSetting The running environment value + */ + @SuppressWarnings("unchecked") + @NotNull + public J setRunningEnvironment(DevelopmentEnvironments runningEnvironmentSetting) + { + runningEnvironment = runningEnvironmentSetting; + return (J) this; + } + + /** + * Returns the head object on the HTML Tag + * + * @return + */ + public Head getHead() + { + return head; + } + + /* + * Returns the body object on the HTML Tag + */ + public Body getBody() + { + if (body == null) + { + body = new Body<>((IPage) this); + } + return body; + } + + /** + * Sets the body for this class + * + * @param body + */ + @SuppressWarnings("unchecked") + public J setBody(Body body) + { + this.body = body; + return (J) this; + } + + /** + * Sets the header object for this html page + * + * @param head + * @return + */ + @SuppressWarnings("unchecked") + public J setHead(Head head) + { + this.head = head; + return (J) this; + } + + } diff --git a/src/main/java/com/jwebmp/core/base/html/Script.java b/src/main/java/com/jwebmp/core/base/html/Script.java index 01a479fa8..758f0e61c 100644 --- a/src/main/java/com/jwebmp/core/base/html/Script.java +++ b/src/main/java/com/jwebmp/core/base/html/Script.java @@ -18,6 +18,7 @@ import com.jwebmp.core.base.ComponentHierarchyBase; import com.jwebmp.core.base.html.attributes.ScriptAttributes; +import com.jwebmp.core.base.html.interfaces.GlobalChildren; import com.jwebmp.core.base.html.interfaces.NoClassAttribute; import com.jwebmp.core.base.html.interfaces.NoFeatures; import com.jwebmp.core.base.html.interfaces.NoIDTag; @@ -25,6 +26,7 @@ import com.jwebmp.core.base.html.interfaces.children.FormChildren; import com.jwebmp.core.base.html.interfaces.children.HeadChildren; import com.jwebmp.core.base.html.interfaces.events.NoEvents; +import com.jwebmp.core.base.interfaces.CastableComponent; import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; import com.jwebmp.core.base.references.JavascriptReference; import com.jwebmp.core.base.servlets.enumarations.ComponentTypes; @@ -79,187 +81,154 @@ * @since 2013/11/12 */ @Log -public class Script, J extends Script> - extends ComponentHierarchyBase - implements NoIDTag, HeadChildren, NoClassAttribute, BodyChildren, FormChildren -{ - - private JavascriptReference reference; - - /** - * Constructs a script with the given reference - * - * @param reference - */ - public Script(JavascriptReference reference) - { - this(reference.toString()); - this.reference = reference; - } - - /** - * Constructs a new script with a specified source and the type of JavaScript - *

- * - * @param src - * The source of the file - */ - public Script(String src) - { - this(); - addAttribute(ScriptAttributes.Src, src); - addAttribute(ScriptAttributes.Type, "text/javascript"); - } - - /** - * Constructs a script component - */ - public Script() - { - super(ComponentTypes.Script); - } - - /** - * Constructs a new script with a specified source and type - *

- * - * @param src - * The source of the file - * @param type - * The type of script - */ - public Script(String src, String type) - { - this(); - if (src != null) - { - addAttribute(ScriptAttributes.Src, src); - } - if (type != null) - { - addAttribute(ScriptAttributes.Type, type); - } - } - - /** - * Returns the currently set JavaScript with no indentation - * - * @return The JavaScript - */ - public StringBuilder getJavascript() - { - return getJavascript(0); - } - - /** - * Sets this script's JavaScript AS-IS - * - * @param javascript - * The JavaScript to directly insert - */ - @SuppressWarnings("unchecked") - public J setJavascript(String javascript) - { - setText(javascript); - return (J) this; - } - - /** - * Returns the currently set JavaScript with the specified indentation - * - * @param tabCount - * The indentation of the JavaScript - *

- * - * @return The JavaScript - */ - public StringBuilder getJavascript(Integer tabCount) - { - preConfigure(); - return getText(tabCount); - } - - @Override - public int hashCode() - { - return getText(0).append(getAttribute(ScriptAttributes.Src)) - .hashCode(); - } - - @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - if (obj.getClass() != getClass()) - { - return false; - } - - Script s = (Script) obj; - if (s.getAttribute(ScriptAttributes.Src) - .equals(getAttribute(ScriptAttributes.Src))) - { - if (s.getAttribute(ScriptAttributes.Type) - .equals(getAttribute(ScriptAttributes.Type))) - { - return s.getText(0) - .toString() - .equals(getText(0).toString()); - } - else - { - return false; - } - } - else - { - return false; - } - } - - /** - * Differences Between HTML and XHTML - *

- * In XHTML, the content inside scripts is declared as #PCDATA (instead of CDATA), which means that entities will be parsed. - *

- * This means that in XHTML, all special characters should be encoded, or all content should be wrapped inside a CDATA section: - */ - @Override - public void preConfigure() - { - super.preConfigure(); - if (getAttribute(ScriptAttributes.Src) != null || !getAttribute(ScriptAttributes.Src).isEmpty()) - { - try - { - if (getPage().getHtmlVersion() - .name() - .startsWith("X")) - { - String sb = "//, J extends Script> + extends ComponentHierarchyBase + implements NoIDTag, HeadChildren, NoClassAttribute, BodyChildren, FormChildren { + + private JavascriptReference reference; + + /** + * Constructs a script with the given reference + * + * @param reference + */ + public Script(JavascriptReference reference) { + this(reference.toString()); + this.reference = reference; + } + + /** + * Constructs a new script with a specified source and the type of JavaScript + *

+ * + * @param src The source of the file + */ + public Script(String src) { + this(); + addAttribute(ScriptAttributes.Src, src); + addAttribute(ScriptAttributes.Type, "text/javascript"); + } + + /** + * Constructs a script component + */ + public Script() { + super(ComponentTypes.Script); + } + + /** + * Constructs a new script with a specified source and type + *

+ * + * @param src The source of the file + * @param type The type of script + */ + public Script(String src, String type) { + this(); + if (src != null) { + addAttribute(ScriptAttributes.Src, src); + } + if (type != null) { + addAttribute(ScriptAttributes.Type, type); + } + } + + /** + * Returns the currently set JavaScript with no indentation + * + * @return The JavaScript + */ + public StringBuilder getJavascript() { + return getJavascript(0); + } + + /** + * Sets this script's JavaScript AS-IS + * + * @param javascript The JavaScript to directly insert + */ + @SuppressWarnings("unchecked") + public J setJavascript(String javascript) { + setText(javascript); + return (J) this; + } + + /** + * Returns the currently set JavaScript with the specified indentation + * + * @param tabCount The indentation of the JavaScript + *

+ * @return The JavaScript + */ + public StringBuilder getJavascript(Integer tabCount) { + preConfigure(); + return getText(tabCount); + } + + @Override + public int hashCode() { + return getText(0).append(getAttribute(ScriptAttributes.Src)) + .hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (obj.getClass() != getClass()) { + return false; + } + + Script s = (Script) obj; + if (s.getAttribute(ScriptAttributes.Src) + .equals(getAttribute(ScriptAttributes.Src))) { + if (s.getAttribute(ScriptAttributes.Type) + .equals(getAttribute(ScriptAttributes.Type))) { + return s.getText(0) + .toString() + .equals(getText(0).toString()); + } else { + return false; + } + } else { + return false; + } + } + + /** + * Differences Between HTML and XHTML + *

+ * In XHTML, the content inside scripts is declared as #PCDATA (instead of CDATA), which means that entities will be parsed. + *

+ * This means that in XHTML, all special characters should be encoded, or all content should be wrapped inside a CDATA section: + */ + @Override + public void preConfigure() { + super.preConfigure(); + if (getAttribute(ScriptAttributes.Src) != null || !getAttribute(ScriptAttributes.Src).isEmpty()) { + try { + if (getPage().getHtmlVersion() + .name() + .startsWith("X")) { + String sb = "//. - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.client.HTMLVersions; -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Definition and Usage - *

- * The >a< tag defines a hyperlink, which is used to link from one page to another. - *

- * The most important attribute of the >a< element is the HREF attribute, which indicates the links destination. - *

- * By default, links will appear as follows in all browsers: - *

- * An unvisited link is underlined and blue A visited link is underlined and purple An active link is underlined and red - *

- * Browser Support Element >a< Yes Yes Yes Yes Yes - *

- * Tips and Notes - *

- * Tip: The following attributes: download, hreflang, media, rel, target, and type cannot be present if the href attribute is not present. - *

- * Tip: A linked page is normally displayed in the current browser window, unless you specify another target. - *

- * Tip: Use CSS to style links. Differences Between HTML 4.01 and HTML5 - *

- * In HTML 4.01, the >a< tag could be either a hyperlink or an anchor. In HTML5, the >a< tag is always a hyperlink, but if it has no href attribute, it is only a - * placeholder for a - * hyperlink. - *

- * HTML5 has some new attributes, and some HTML 4.01 attributes are no longer supported. - * - * @author MMagon - * @version 1.1 - *

- * Updated attributes to full suite - * @since 23 Sep 2013 - */ -public enum ALinkAttributes - implements AttributeDefinitions -{ - /** - * Not supported in HTML5. - * Specifies the character-set of a linked document - * - * @deprecated - */ - @Deprecated - Charset(HTMLVersions.HTML401Transitional), - /** - * Specifies the coordinates of a link - * - * @deprecated - */ - @Deprecated - Coords(HTMLVersions.HTML401Transitional), - /** - * Specifies that the target will be downloaded when a user clicks - */ - Download(HTMLVersions.HTML5, true), - /** - * Specifies the URL of the page the link goes to - */ - HRef, - /** - * Specifies the language of the linked document - */ - HRefLang, - /** - * Specifies what media/device the linked document is optimized for - */ - Media, - /** - * Specifies the name of an anchor - * Not Supported in HTML5 use global attribute ID instead - * - * @deprecated - */ - @Deprecated - Name(HTMLVersions.HTML401Transitional), - /** - * Specifies the relationship between the current document and the linked document - */ - Rel, - /** - * Not supported in HTML5. - * - * @deprecated - */ - @Deprecated - Rev(HTMLVersions.HTML401Transitional, true), - /** - * Specifies the shape of a link - * - * @deprecated - */ - @Deprecated - Shape(HTMLVersions.HTML401Transitional), - /** - * Specifies where to open the linked document - */ - Target, - /** - * Specifies the media type of the linked document - */ - Type; - - /** - * The maximum supported version of this tag - */ - private HTMLVersions maxsupportedVersion = HTMLVersions.HTML5; - /** - * The minimum supported version of this tag - */ - private HTMLVersions minsupportedVersion = HTMLVersions.HTML401Frameset; - /** - * If the restriction is minimum based - */ - private boolean minSet; - - /** - * Construct a new "a" tag with all the predefined supported HTML versions - */ - ALinkAttributes() - { - } - - ALinkAttributes(HTMLVersions maxsupportedVersion) - { - this.maxsupportedVersion = maxsupportedVersion; - } - - ALinkAttributes(HTMLVersions minsupportedVersion, boolean trues) - { - this.minsupportedVersion = minsupportedVersion; - minSet = trues; - } - - /** - * Returns the minimum supported version of this tag - * - * @return - */ - public HTMLVersions getMaxsupportedVersion() - { - return maxsupportedVersion; - } - - /** - * Sets the maximum version of this tag - * - * @param maxsupportedVersion - */ - public void setMaxsupportedVersion(HTMLVersions maxsupportedVersion) - { - this.maxsupportedVersion = maxsupportedVersion; - } - - /** - * Gets the minimum html version of this tag - * - * @return - */ - public HTMLVersions getMinsupportedVersion() - { - return minsupportedVersion; - } - - /** - * Sets the minimum version of this tag - * - * @param minsupportedVersion - */ - public void setMinsupportedVersion(HTMLVersions minsupportedVersion) - { - this.minsupportedVersion = minsupportedVersion; - } - - /** - * Returns the lowercase - * - * @return - */ - @Override - public String toString() - { - return super.toString() - .toLowerCase(); - } - - /** - * Whether or not this tag is actually just a keyword - * - * @return - */ - @Override - public boolean isKeyword() - { - return false; - } - - /** - * If the restriction is min set - * - * @return - */ - public boolean isMinSet() - { - return minSet; - } - - /** - * Sets if the restriction is min or max based - * - * @param minSet - */ - public void setMinSet(boolean minSet) - { - this.minSet = minSet; - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/AbbreviationAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/AbbreviationAttributes.java deleted file mode 100644 index a9b5e3963..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/AbbreviationAttributes.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - */ -public enum AbbreviationAttributes - implements AttributeDefinitions -{ - - /** - * Defines the title of the abbreviation - */ - Title; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/AppletAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/AppletAttributes.java deleted file mode 100644 index 2186e7f73..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/AppletAttributes.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @since @version @author MMagon - */ -public enum AppletAttributes - implements AttributeDefinitions -{ - /** - * Alignment Type - */ - Align, - /** - * Specifies the file name of a Java applet - */ - Code, - /** - * Specifies a reference to a serialized representation of an applet - */ - Object, - /** - * Specifies an alternate text for an applet - */ - Alt, - /** - * Specifies the location of an archive file - */ - Archive, - /** - * Specifies a relative base URL for applets specified in the code attribute - */ - CodeBase, - /** - * Specifies the height of an applet - */ - Height, - /** - * Defines the horizontal spacing around an applet - */ - Hspace, - /** - * Defines the vertical spacing around an applet - */ - Vspace, - /** - * Specifies the width of an applet - */ - Width; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return super.toString() - .toLowerCase(); - } - - -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/AreaAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/AreaAttributes.java deleted file mode 100644 index 174f21f87..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/AreaAttributes.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * All the valid area attributes - * Not including HTML 5 - * - * @author MMagon - * @version 1.0 - * @since 2013/11/22 - */ -public enum AreaAttributes - implements AttributeDefinitions -{ - /** - * Specifies an alternate text for the area. Required if the HRef attribute is present - */ - Alt, - /** - * Specifies the coordinates of the area - */ - Coords, - /** - * Specifies the hyper-link target for the area - */ - HRef, - /** - * Specifies the shape of the area - */ - Shape, - /** - * Specifies where to open the target URL - *

- */ - Target, - /** - * The attribute for use with the map highlighting - */ - Data_MapHilight, - /** - * A specific element type - */ - Element, - /** - * Any data element - */ - Data; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/AudioAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/AudioAttributes.java deleted file mode 100644 index 59b1ce4d0..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/AudioAttributes.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author MMagon - */ -public enum AudioAttributes - implements AttributeDefinitions -{ - /** - * Specifies that the audio will start playing as soon as it is ready - */ - Autoplay, - /** - * Specifies that audio controls should be displayed (such as a play/pause button etc) - */ - Controls, - /** - * Specifies that the audio will start over again, every time it is finished - */ - Loop, - /** - * Specifies that the audio output should be muted - */ - Muted, - /** - * Specifies if and how the author thinks the audio should be loaded when the page loads - */ - Preload, - /** - * Specifies the URL of the audio file - */ - Src; - - @Override - public String toString() - { - return super.toString() - .toLowerCase(); - } - - @Override - public boolean isKeyword() - { - return false; - } - - public enum AudioPreloadTypes - { - Auto, - Metadata, - None - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/BaseAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/BaseAttributes.java deleted file mode 100644 index 026a556bf..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/BaseAttributes.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * The attributes for the Base tag - * - * @author MMagon - * @version 1.0 - * @since 2013/11/12 - */ -public enum BaseAttributes - implements AttributeDefinitions -{ - Target, - HRef, - ; - - @Override - public String toString() - { - return super.toString() - .toLowerCase(); - } - - @Override - public boolean isKeyword() - { - return false; - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/BiDirectionalDirection.java b/src/main/java/com/jwebmp/core/base/html/attributes/BiDirectionalDirection.java deleted file mode 100644 index 22371c03b..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/BiDirectionalDirection.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Required. Specifies the text direction of the text inside the >bdo< element - * - * @author GedMarc - * @since 2014/12/20 - */ -public enum BiDirectionalDirection - implements AttributeDefinitions -{ - /** - * Left to Right - */ - Ltr, - /** - * Right to Left - */ - Rtl; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/BiDirectionalOverrideAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/BiDirectionalOverrideAttributes.java deleted file mode 100644 index 9f8a84ebe..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/BiDirectionalOverrideAttributes.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - * @since 2014/12/20 - */ -public enum BiDirectionalOverrideAttributes - implements AttributeDefinitions -{ - /** - * Required. Specifies the text direction of the text inside the >bdo< element - */ - Dir; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/BlockQuoteAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/BlockQuoteAttributes.java deleted file mode 100644 index 7c35c4080..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/BlockQuoteAttributes.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Specifies attributes for the block quotes - * - * @author GedMarc - * @since 2014/12/20 - */ -public enum BlockQuoteAttributes - implements AttributeDefinitions -{ - - /** - * Specifies the source of the quotation. - *

- * String - */ - Cite; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/BodyAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/BodyAttributes.java deleted file mode 100644 index de98f0c87..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/BodyAttributes.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author MMagon - */ -public enum BodyAttributes - implements AttributeDefinitions -{ - JWType; - - @Override - public String toString() - { - return name().toLowerCase(); - } - - @Override - public boolean isKeyword() - { - return false; - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/ButtonAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/ButtonAttributes.java deleted file mode 100644 index f1e9d0648..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/ButtonAttributes.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; -import com.guicedee.services.jsonrepresentation.json.StaticStrings; - -/** - * Defines The Attributes that are valid for Buttons - *

- * - * @author GedMarc - * @since 2014/12/20 - */ -public enum ButtonAttributes - implements AttributeDefinitions -{ - - /** - * Specifies that a button should automatically get focus when the page loads - */ - AutoFocus, - /** - * Specifies one or more forms the button belongs to - */ - Form, - /** - * Specifies where to send the form-data when a form is submitted. Only for type="submit" - */ - FormAction, - /** - * Specifies how form-data should be encoded before sending it to a server. Only for type="submit". - *

- * application/ x-www-form-urlencoded multipart/ form-data text/ plain - */ - FormEncType, - /** - * Specifies how to send the form-data (which HTTP method to use). Only for type="submit". Get or Post - */ - FormMethod, - /** - * Specifies that the form-data should not be validated on submission. Only for type="submit" - */ - FormNoValidate, - /** - * Specifies where to display the response after submitting the form. Only for type="submit" - */ - FormTarget, - /** - * Specifies a name for the button - */ - Name, - /** - * Specifies the type of button - *

- * button reset submit - */ - Type, - /** - * Specifies an initial value for the button - */ - Value, - /** - * Sets the toggle - */ - Data_Toggle, - /** - * Sets the target - */ - Data_Target, - /** - * What to dismiss - */ - Data_Dismiss; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase() - .replace(StaticStrings.CHAR_UNDERSCORE, '-'); - } - -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/CSSLinkAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/CSSLinkAttributes.java deleted file mode 100644 index 7b04ba863..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/CSSLinkAttributes.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Attributes valid for the header link tag - * - * @author MMagon - * @version 1.0 - * @since 2013/11/13 - */ -public enum CSSLinkAttributes - implements AttributeDefinitions -{ - /** - * THe charset for the link - */ - Charset, - /** - * The link - */ - HRef, - /** - * The language of the link - */ - HRefLang, - /** - * The relationship to the document - */ - Rel, - /** - * The media type - */ - Media, - /** - * The link is reversed - */ - Rev, - /** - * Specifies that the target resource should be cached - */ - PreFetch, - /** - * The target frame - */ - Target, - /** - * The type - */ - Type; - - /** - * Returns the lower case variant of the name; - * - * @return - */ - @Override - public String toString() - { - return name().toLowerCase(); - } - - @Override - public boolean isKeyword() - { - return false; - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/CanvasAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/CanvasAttributes.java deleted file mode 100644 index 2ded66f65..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/CanvasAttributes.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - */ -public enum CanvasAttributes - implements AttributeDefinitions -{ - /** - * Specifies the height - */ - Height, - /** - * Specifies the width - */ - Width; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/CodeAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/CodeAttributes.java deleted file mode 100644 index 483740167..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/CodeAttributes.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - */ -public enum CodeAttributes - implements AttributeDefinitions -{ - - ; - - @Override - public boolean isKeyword() - { - return false; - } - -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/DeletedAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/DeletedAttributes.java deleted file mode 100644 index 0798543db..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/DeletedAttributes.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - */ -public enum DeletedAttributes - implements AttributeDefinitions -{ - - /** - * Specifies a URL to a document that explains the reason why the text was deleted - */ - Cite, - /** - * Specifies the date and time of when the text was deleted - *

- * YYYY-MM-DDThh:mm:ssTZD - */ - DateTime; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/DirectoryListAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/DirectoryListAttributes.java deleted file mode 100644 index f1085297b..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/DirectoryListAttributes.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - */ -public enum DirectoryListAttributes - implements AttributeDefinitions -{ - - /** - * Not supported in HTML5. Specifies that the list should render smaller than normal - * - * @deprecated - */@Deprecated - Compact, - ; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/EmbedAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/EmbedAttributes.java deleted file mode 100644 index 60c6c2fac..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/EmbedAttributes.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Specifies the attributes for the Embed component - *

- * - * @author GedMarc - */ -public enum EmbedAttributes - implements AttributeDefinitions -{ - - /** - * The height - */ - Height, - /** - * The source for the object - */ - Src, - /** - * Specifies the media type of the embedded content - */ - Type, - /** - * Specifies the width of the embedded content - */ - Width; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/FormAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/FormAttributes.java deleted file mode 100644 index 000f7e39a..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/FormAttributes.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * A list of attributes valid for the form tag - *

- * - * @author GedMarc - */ -public enum FormAttributes - implements AttributeDefinitions -{ - - /** - * Not supported in HTML5. Specifies a comma-separated list of file types that the server accepts (that can be submitted through the file upload) - *

- */ - Accept, - /** - * Specifies the character encodings that are to be used for the form submission - */ - Accept_CharSet, - /** - * Specifies where to send the form-data when a form is submitted. URL - */ - Action, - /** - * Specifies whether a form should have autocomplete on or off. Used with Data List - */ - AutoComplete, - /** - * Specifies how the form-data should be encoded when submitting it to the server (only for method="post") application/x-www-form-url - *

- * encoded - *

- * multipart/form-data - *

- * text/plain - */ - EncType, - /** - * Get/Post - */ - Method, - /** - * In XHTML, the name attribute is deprecated. Use the global id attribute instead. - * Specifies the name of a form - */ - Name, - /** - * Specifies that the form should not be validated when submitted - */ - NoValidate, - /** - * Specifies where to display the response that is received after submitting the form - */ - Target; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/FormMethods.java b/src/main/java/com/jwebmp/core/base/html/attributes/FormMethods.java deleted file mode 100644 index 48fc59997..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/FormMethods.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - */ -public enum FormMethods - implements AttributeDefinitions -{ - Get, - Post; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/GlobalAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/GlobalAttributes.java deleted file mode 100644 index 54a30839d..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/GlobalAttributes.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; -import com.jwebmp.core.utilities.StaticStrings; - -//import static com.guicedee.services.jsonrepresentation.json.StaticStrings.CHAR_DASH; -//import static com.guicedee.services.jsonrepresentation.json.StaticStrings.CHAR_UNDERSCORE; -import static com.guicedee.services.jsonrepresentation.json.StaticStrings.*; -import static com.jwebmp.core.utilities.StaticStrings.*; - -/** - * This class holds CSS Enumerations that are global across all HTML elements - *

- * - * @author GedMarc - */ -public enum GlobalAttributes - implements AttributeDefinitions -{ - - /** - * Specifies a unique id for an element - */ - ID(), - /** - * Specifies an in-line CSS style for an element - */ - Style(), - /** - * Specifies extra information about an element - */ - Title(), - /** - * Specifies the name of an anchor Not Supported in HTML5 use global attribute ID instead, but it is used everywhere by everything else. Just not by the HTML engine. and forms - * have to have them - */ - Name(), - /** - * Specifies one or more class-names for an element (refers to a class in a style sheet) - */ - Class(), - /** - * Specifies a JWType handler for an element - */ - JWType(), - /** - * Specifies a type - */ - Type(), - /** - * The JW Event Mappings - */ - Events(), - /** - * Generic Value Mapping - */ - Value, - /** - * Screen Reader Labels - */ - Aria_Label, - /** - * Screen Reader Invisible - */ - Aria_Hidden, - /** - * Screen Reader to show pressed or not - */ - Aria_Pressed, - /** - * Screen Reader to show disabled - */ - Aria_Disabled, - /** - * Screen Reader described by - */ - Aria_Describedby, - /** - * Expanded on screen reader mode - */ - Aria_Expanded, - /** - * Screen reader has popup - */ - Aria_HasPopup, - /** - * Screen Reader labelled by - */ - Aria_LabelledBy, - /** - * The controls - */ - Aria_Controls, - /** - * The Aria Live - */ - Aria_Live, - /** - * Sets the aria atomic values - */ - Aria_Atomic; - - GlobalAttributes() - { - } - - /** - * Returns the lowercase - *

- * - * @return - */ - @Override - public String toString() - { - return name().toLowerCase() - .replace(CHAR_UNDERSCORE, CHAR_DASH); - } - - @Override - public boolean isKeyword() - { - return false; - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/HeaderTypes.java b/src/main/java/com/jwebmp/core/base/html/attributes/HeaderTypes.java deleted file mode 100644 index 1fe06f5b3..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/HeaderTypes.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.fasterxml.jackson.annotation.JsonValue; -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; -import com.jwebmp.core.base.servlets.enumarations.ComponentTypes; - -/** - * An enumeration of the available header types - *

- * - * @author GedMarc - */ -public enum HeaderTypes - implements AttributeDefinitions -{ - - /** - * The Header 1 Size - */ - H1(ComponentTypes.Header1), - /** - * The HeaderText 2 Size - */ - H2(ComponentTypes.Header2), - /** - * The HeaderText 3 Size - */ - H3(ComponentTypes.Header3), - /** - * The HeaderText 4 Size - */ - H4(ComponentTypes.Header4), - /** - * The HeaderText 5 Size - */ - H5(ComponentTypes.Header5), - /** - * The HeaderText 6 Size - */ - H6(ComponentTypes.Header6); - - private final ComponentTypes linkedComponent; - - /** - * Constructs with linked Component - *

- * - * @param linkedComponent - * The linked component - */ - HeaderTypes(ComponentTypes linkedComponent) - { - this.linkedComponent = linkedComponent; - } - - /** - * Get Linked Component - *

- * - * @return The linked component - */ - public ComponentTypes getLinkedComponent() - { - return linkedComponent; - } - - @JsonValue - @Override - public String toString() - { - return name().toLowerCase(); - } - - @Override - public boolean isKeyword() - { - return false; - } - -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/IFrameAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/IFrameAttributes.java deleted file mode 100644 index f1d98f623..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/IFrameAttributes.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Valid IFrame attribute entries - *

- * - * @author MMagon - * @version 1.0 - * @since 23 Sep 2013 - */ -public enum IFrameAttributes - implements AttributeDefinitions -{ - - /** - * Not supported in HTML5. Specifies the alignment of an iframe according to surrounding elements - *

- * - * @deprecated - */@Deprecated - Align, - /** - * Not supported in HTML5. Specifies whether or not to display a border around an <iframe> - *

- * - * @deprecated - */@Deprecated - FrameBorder, - /** - * Specifies the height of an <iframe> - *

- */ - Height, - /** - * Specifies a page that contains a long description of the content of an <iframe> - *

- */ - LongDesc, - /** - * Not supported in HTML5. Specifies the top and bottom margins of the content of an <iframe> - *

- * - * @deprecated - */@Deprecated - MarginHeight, - /** - * Not supported in HTML5. Specifies the left and right margins of the content of an <iframe> - *

- * - * @deprecated - */@Deprecated - MarginWidth, - /** - * Specifies the name of an <iframe> - *

- */ - Name, - /** - * Enables an extra set of restrictions for the content in an <iframe> allow-forms - *

- * allow-pointer-lock - *

- * allow-popups - *

- * allow-same-origin - *

- * allow-scripts - *

- * allow-top-navigation - *

- */ - Sandbox, - /** - * Not supported in HTML5. Specifies whether or not to display scrollbars in an <iframe> - *

- * - * @deprecated - */@Deprecated - Scrolling, - /** - * Specifies that the <iframe> should look like it is a part of the containing document - *

- */ - Seamless, - /** - * Specifies the address of the document to embed in the <iframe> - *

- */ - Src, - /** - * Specifies the HTML content of the page to show in the <iframe> - *

- */ - SrcDoc, - /** - * Specifies the width of an <iframe> - *

- */ - Width; - - /** - * Returns the name in lowercase form - * - * @return The actual string - */ - @Override - public String toString() - { - return name().toLowerCase(); - } - - /** - * Returns if this attribute is just a keyword, or a key/value pair - * - * @return - */ - @Override - public boolean isKeyword() - { - return false; - } - -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/ImageAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/ImageAttributes.java deleted file mode 100644 index 464b875ac..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/ImageAttributes.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Valid attributes for images - * - * @author MMagon - * @version 1.0 - * @since 23 Sep 2013 - */ -public enum ImageAttributes - implements AttributeDefinitions -{ - /** - * Specifies the URL of an image - */ - Src, - /** - * Specifies an alternate text for an image - */ - ImageReplacementText, - /** - * Specifies an image as a server-side image-map - */ - IsMap, - /** - * Specifies an image as a client-side image-map - */ - UseMap, - /** - * Alternative text to display - */ - Alt, - /** - * Specifies width as an attribute - */ - Width, - /** - * Specifies height as an attribute - */ - Height; - - /** - * Returns the lowercase variant - * - * @return - */ - @Override - public String toString() - { - return name().toLowerCase(); - } - - @Override - public boolean isKeyword() - { - return false; - } - -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/ImageMapAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/ImageMapAttributes.java deleted file mode 100644 index 4998d3688..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/ImageMapAttributes.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Lists all the attributes available for the image map - * - * @author MMagon - * @version 1.0 - * @since Forever - */ -public enum ImageMapAttributes - implements AttributeDefinitions -{ - Element; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/InputAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/InputAttributes.java deleted file mode 100644 index 3e62d073e..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/InputAttributes.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Attributes valid for the Input Tag - * - * @author MMagon - * @version 1.0 - * @since 2014/05/18 - */ -public enum InputAttributes - implements AttributeDefinitions -{ - /** - * Specifies the types of files that the server accepts (only for type="file") - */ - Accept, - /** - * Specifies an alternate text for images (only for type="image") - */ - Alt, - /** - * Specifies that an input element should be pre-selected when the page loads (for type="checkbox" or type="radio") - */ - Checked, - /** - * Specifies that an >input< element should be disabled - */ - Disabled, - /** - * Specifies the maximum number of characters allowed in an >input< element - */ - MaxLength, - /** - * Specifies the width, in characters, of an input element - */ - Size, - /** - * Specifies the URL of the image to use as a submit button (only for type="image") - */ - Src, - /** - * Specifies the type input element to display - */ - Type, - /** - * Specifies the value of an input element - */ - Value; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } - -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/InputButtonTypeAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/InputButtonTypeAttributes.java deleted file mode 100644 index 0bf043bb3..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/InputButtonTypeAttributes.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * The attribute enumeration for the input button type - * - * @author GedMarc - */ -public enum InputButtonTypeAttributes - implements AttributeDefinitions -{ - /** - * The alternative text or tooltip to display - */ - Alt, - /** - * HTML 5 Only - * Specifies whether an input element should have auto-complete enabled - */ - AutoComplete, - /** - * HTML 5 Only - * Specifies that an input element should automatically get focus when the page loads - */ - AutoFocus, - /** - * The value of the field - */ - Value, - /** - * A reference to the form that contain the button - */ - Form, - /** - * Sets the value of the name attribute of an input button - */ - Name, - ; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/InputCheckBoxTypeAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/InputCheckBoxTypeAttributes.java deleted file mode 100644 index 7eb40e751..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/InputCheckBoxTypeAttributes.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * The attribute enumeration for the input button type - * - * @author GedMarc - */ -public enum InputCheckBoxTypeAttributes - implements AttributeDefinitions -{ - /** - * The alternative text or tooltip to display - */ - Alt, - /** - * HTML 5 Only - * Specifies whether an input element should have auto-complete enabled - */ - AutoComplete, - /** - * HTML 5 Only - * Specifies that an input element should automatically get focus when the page loads - */ - AutoFocus, - /** - * The value of the field - */ - Value, - /** - * A reference to the form that contain the button - */ - Form, - /** - * Sets the value of the name attribute of an input button - */ - Name, - /** - * Sets if the the type is checked. Use a boolean value. - */ - Checked, - /** - * Sets the default checked value of the check box - */ - DefaultChecked, - /** - * Sets the default value of the check box - */ - DefaultValue, - /** - * Sets or returns whether a check box is disabled, or not - */ - Disabled, - /** - * Sets the indeterminate value of a check box - * HTML 5 Only - */ - Indeterminate, - /** - * Sets the required value of the Check Box - * HTML 5 Only - */ - Required, - ; - - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/InputFileTypeAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/InputFileTypeAttributes.java deleted file mode 100644 index 89da25db4..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/InputFileTypeAttributes.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * The attribute enumeration for the input button type - *

- * - * @author GedMarc - */ -public enum InputFileTypeAttributes - implements AttributeDefinitions -{ - - /** - * The alternative text or tooltip to display - */ - Alt, - /** - * HTML 5 Only Specifies whether an input element should have auto-complete enabled - */ - AutoComplete, - /** - * HTML 5 Only Specifies that an input element should automatically get focus when the page loads - */ - AutoFocus, - /** - * The value of the field - */ - Value, - /** - * A reference to the form that contain the button - */ - Form, - /** - * Sets the value of the name attribute of an input button - */ - Name, - /** - * The accept property sets or returns the value of the accept attribute of the file upload button. - *

- * The accept attribute specifies the types of files that the server accepts (that can be submitted through a file upload). - *

- * file_extension file_extension - *

- * audio/* - *

- *

- * video/* - *

- *

- * image/* - *

- *

- * media_type - */ - Accept, - /** - * Sets or returns the default value of the file upload button - */ - DefaultValue, - /** - * Sets or returns whether the file upload button is disabled, or not - */ - Disabled, - /** - * Returns a FileList object that represents the file or files selected with the file upload button - */ - Files, - /** - * Sets or returns whether a user is allowed to select more than one file in the file upload field - */ - Multiple, - ; - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/InputHiddenTypeAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/InputHiddenTypeAttributes.java deleted file mode 100644 index 3d1f27069..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/InputHiddenTypeAttributes.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * The attribute enumeration for the input hidden type - * - * @author GedMarc - */ -public enum InputHiddenTypeAttributes - implements AttributeDefinitions -{ - /** - * The alternative text or tooltip to display - */ - Alt, - /** - * HTML 5 Only - * Specifies whether an input element should have auto-complete enabled - */ - AutoComplete, - /** - * HTML 5 Only - * Specifies that an input element should automatically get focus when the page loads - */ - AutoFocus, - /** - * The value of the field - */ - Value, - /** - * A reference to the form that contain the button - */ - Form, - /** - * Sets the value of the name attribute of an input button - */ - Name, - /** - * Sets or returns the default value of the hidden input field - */ - DefaultValue, - ; - - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/InputImageTypeAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/InputImageTypeAttributes.java deleted file mode 100644 index 6669cabf7..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/InputImageTypeAttributes.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * The attribute enumeration for the input hidden type - * - * @author GedMarc - */ -public enum InputImageTypeAttributes - implements AttributeDefinitions -{ - /** - * The alternative text or tooltip to display - */ - Alt, - /** - * HTML 5 Only - * Specifies whether an input element should have auto-complete enabled - */ - AutoComplete, - /** - * HTML 5 Only - * Specifies that an input element should automatically get focus when the page loads - */ - AutoFocus, - /** - * The value of the field - */ - Value, - /** - * A reference to the form that contain the button - */ - Form, - /** - * Sets the value of the name attribute of an input button - */ - Name, - /** - * Sets or returns the default value of the hidden input field - */ - DefaultValue, - /** - * Sets or returns the value of the src attribute of the input image - */ - Src, - /** - * Sets or returns the disabled attribute of an image attribute - */ - Disabled, - ; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/InputPasswordTypeAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/InputPasswordTypeAttributes.java deleted file mode 100644 index c6320d634..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/InputPasswordTypeAttributes.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * The attribute enumeration for the input hidden type - * - * @author GedMarc - */ -public enum InputPasswordTypeAttributes - implements AttributeDefinitions -{ - /** - * The alternative text or tooltip to display - */ - Alt, - /** - * HTML 5 Only - * Specifies whether an input element should have auto-complete enabled - */ - AutoComplete, - /** - * HTML 5 Only - * Specifies that an input element should automatically get focus when the page loads - */ - AutoFocus, - /** - * The value of the field - */ - Value, - /** - * A reference to the form that contain the button - */ - Form, - /** - * Sets the value of the name attribute of an input button - */ - Name, - /** - * Sets or returns the default value of the hidden input field - */ - DefaultValue, - /** - * Sets or returns whether a password field is read-only, or not - */ - ReadOnly, - /** - * Sets or returns whether the password field is disabled, or not - */ - Disabled, - /** - * Sets or returns the value of the maxlength attribute of a password field - */ - MaxLength, - /** - * Sets or returns the value of the size attribute of a password field - */ - Size, - ; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/InputRadioTypeAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/InputRadioTypeAttributes.java deleted file mode 100644 index 6fb0805ed..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/InputRadioTypeAttributes.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * The attribute enumeration for the input button type - * - * @author GedMarc - */ -public enum InputRadioTypeAttributes - implements AttributeDefinitions -{ - /** - * The alternative text or tooltip to display - */ - Alt, - /** - * HTML 5 Only - * Specifies whether an input element should have auto-complete enabled - */ - AutoComplete, - /** - * HTML 5 Only - * Specifies that an input element should automatically get focus when the page loads - */ - AutoFocus, - /** - * The value of the field - */ - Value, - /** - * A reference to the form that contain the button - */ - Form, - /** - * Sets the value of the name attribute of an input button - */ - Name, - /** - * Sets if the the type is checked. Use a boolean value. - */ - Checked, - /** - * Sets the default checked value of the check box - */ - DefaultChecked, - /** - * Sets the default value of the check box - */ - DefaultValue, - /** - * Sets or returns whether a check box is disabled, or not - */ - Disabled, - /** - * Sets the required value of the Check Box - * HTML 5 Only - */ - Required, - - ; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/InputRangeAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/InputRangeAttributes.java deleted file mode 100644 index dbd93d7b7..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/InputRangeAttributes.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * The attribute enumeration for the input button type - * - * @author GedMarc - */ -public enum InputRangeAttributes - implements AttributeDefinitions -{ - /** - * The minimum for the range type - */ - Min, - /** - * The maximum for the range type - */ - Max, - /** - * The step to apply for the range type - */ - Step; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/InputResetTypeAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/InputResetTypeAttributes.java deleted file mode 100644 index 225b6b9fd..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/InputResetTypeAttributes.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * The attribute enumeration for the input button type - * - * @author GedMarc - */ -public enum InputResetTypeAttributes - implements AttributeDefinitions -{ - /** - * The alternative text or tooltip to display - */ - Alt, - /** - * HTML 5 Only - * Specifies whether an input element should have auto-complete enabled - */ - AutoComplete, - /** - * HTML 5 Only - * Specifies that an input element should automatically get focus when the page loads - */ - AutoFocus, - /** - * The value of the field - */ - Value, - /** - * A reference to the form that contain the button - */ - Form, - /** - * Sets the value of the name attribute of an input button - */ - Name, - /** - * Sets or returns whether a check box is disabled, or not - */ - Disabled, - /** - * Sets the required value of the Check Box - * HTML 5 Only - */ - Required, - ; - - /** - * - */ - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/InputSearchTypeAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/InputSearchTypeAttributes.java deleted file mode 100644 index 4f6d768f4..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/InputSearchTypeAttributes.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * The attribute enumeration for the input button type - *

- * - * @author GedMarc - */ -public enum InputSearchTypeAttributes - implements AttributeDefinitions -{ - - AutoComplete, - /** - * Sets or returns the value of the autocomplete attribute of a search field - */ - AutoCocus, - /** - * Sets or returns whether a search field should automatically get focus when the page loads - */ - DefaultValue, - /** - * Sets or returns the default value of a search field - */ - Disabled, - /** - * Sets or returns whether a search field is disabled, or not - */ - Form, - /** - * Returns a reference to the form that contains the search field - */ - List, - /** - * Returns a reference to the datalist that contains the search field - */ - MaxLength, - /** - * Sets or returns the value of the maxlength attribute of a search field - */ - Name, - /** - * Sets or returns the value of the name attribute of a search field - */ - Pattern, - /** - * Sets or returns the value of the pattern attribute of a search field - */ - PlaceHolder, - /** - * Sets or returns the value of the placeholder attribute of a search field - */ - ReadOnly, - /** - * Sets or returns whether the search field is read-only, or not - */ - Required, - /** - * Sets or returns whether the search field must be filled out before submitting a form - */ - Size, - /** - * Sets or returns the value of the size attribute of the search field - */ - Type, - /** - * Returns which type of form element the search field is - */ - Value, - ; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } - -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/InputSubmitTypeAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/InputSubmitTypeAttributes.java deleted file mode 100644 index b1ce17c99..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/InputSubmitTypeAttributes.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * The attribute enumeration for the input submit type - *

- * - * @author GedMarc - */ -public enum InputSubmitTypeAttributes - implements AttributeDefinitions -{ - - /** - * Sets or returns whether a submit button should automatically get focus when the page loads - */ - AutoFocus, - /** - * Sets or returns the default value of a submit button - */ - DefaultValue, - /** - * Sets or returns whether the submit button is disabled, or not - */ - Ddisabled, - /** - * Returns a reference to the form that contains the submit button - */ - Form, - /** - * Sets or returns the value of the formaction attribute of a submit button - */ - FormAction, - /** - * Sets or returns the value of the formenctype attribute of a submit button - */ - FormEnctype, - /** - * Sets or returns the value of the formmethod attribute of a submit button - */ - FormMethod, - /** - * Sets or returns whether the form-data should be validated or not, on submission - */ - FormNoValidate, - /** - * Sets or returns the value of the formtarget attribute of a submit button - */ - FormTarget, - /** - * Sets or returns the value of the name attribute of a submit button - */ - Name, - /** - * Returns which type of form element the submit button is - */ - Type, - /** - * Sets or returns the value of the value attribute of the submit button - */ - Value, - ; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/InputTextAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/InputTextAttributes.java deleted file mode 100644 index 2146a9b7e..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/InputTextAttributes.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * The attribute enumeration for the input text type - *

- * - * @author GedMarc - */ -public enum InputTextAttributes - implements AttributeDefinitions -{ - - /** - * Sets or returns the value of the autocomplete attribute of a text field - */ - AutoComplete, - /** - * Sets or returns whether a text field should automatically get focus when the page loads - */ - AutoFocus, - /** - * Sets or returns the default value of a text field - */ - DefaultValue, - /** - * Sets or returns whether the text field is disabled, or not - */ - Disabled, - /** - * Returns a reference to the form that contains the text field - */ - Form, - /** - * Returns a reference to the datalist that contains the text field - */ - List, - /** - * Sets or returns the value of the maxlength attribute of a text field - */ - MaxLength, - /** - * Sets or returns the value of the name attribute of a text field - */ - Name, - /** - * Sets or returns the value of the pattern attribute of a text field - */ - Pattern, - /** - * Sets or returns the value of the placeholder attribute of a text field - */ - PlaceHolder, - /** - * Sets or returns whether a text field is read-only, or not - */ - ReadOnly, - /** - * Sets or returns whether the text field must be filled out before submitting a form - */ - Required, - /** - * Sets or returns the value of the size attribute of a text field - */ - Size, - /** - * Returns which type of form element a text field is - */ - Type, - /** - * Sets or returns the value of the value attribute of the text field - */ - Value; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } - -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/InputTypes.java b/src/main/java/com/jwebmp/core/base/html/attributes/InputTypes.java deleted file mode 100644 index 5a7445810..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/InputTypes.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author mmagon - */ -public enum InputTypes - implements AttributeDefinitions -{ - - /** - * A Button Input Type - */ - Button, - /** - * The Input Checkbox object represents an HTML input element with type="checkbox". - */ - Checkbox, - /** - * - */ - Color, - /** - * The date input type - */ - Date, - /** - * The date time input type - */ - Datetime, - /** - * - */ - Datetime_local, - /** - * The email type - */ - Email, - /** - * The Input FileUpload object represents an HTML input element with type="file". - */ - File, - /** - * The Input Hidden object represents an HTML input element with type="hidden". - */ - Hidden, - /** - * Specifies an Image input field - */ - Image, - /** - * The Input Month object represents an HTML input element with type="month". - *

- * Note: input elements with type="month" are not supported in Internet Explorer or Firefox. - *

- * Did custom check, enabled from ie10 and up - */ - Month, - /** - * A number input - */ - Number, - /** - * The Input Password object represents an HTML input element with type="password". - */ - Password, - /** - * The Input Radio object represents an HTML input element with type="radio". - */ - Radio, - /** - * A range input selector - */ - Range, - /** - * The Input Reset object represents an HTML input element with type="reset". - */ - Reset, - /** - * The Input Search Object is new in HTML5. - *

- */ - Search, - /** - * The submit button - */ - Submit, - /** - * A telephone entry - */ - Tel, - /** - * The Input Text object represents an HTML input element with type="text". - */ - Text, - /** - * The Input Time Object is new in HTML5. - *

- * The Input Time object represents an HTML input element with type="time". - *

- * Note: input elements with type="time" are not supported in Internet Explorer or Firefox. - *

- * JWebswing excludes this for lack of support - */ - Time, - /** - * Input URL Object - *

- * The Input URL Object is new in HTML5. - *

- * The Input URL object represents an HTML input element with type="url". - *

- * Note: input elements with type="url" are not supported in Internet Explorer 9 (and earlier versions), or Safari. - */ - Url, - /** - * The Input Week Object is new in HTML5. - *

- * The Input Week object represents an HTML input element with type="week". - *

- * Note: input elements with type="week" are not supported in Internet Explorer or Firefox. - */ - Week, - /** - * To store values as attributes - */ - Value, - /** - * This is a tag not a type - */ - Select, - /** - * This is a tag not a type - */ - TextArea; - - @Override - public String toString() - { - return name().toLowerCase() - .replaceAll("_", "-"); - } - - @Override - public boolean isKeyword() - { - return false; - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/KeyGenAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/KeyGenAttributes.java deleted file mode 100644 index 1bb67f3c8..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/KeyGenAttributes.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Definition and Usage - *

- * The >keygen< tag specifies a key-pair generator field used for forms. - *

- * When the form is submitted, the private key is stored locally, and the public key is sent to the server. Browser Support - *

- * The numbers in the table specify the first browser version that fully supports the element. Element >keygen< 1.0 Not supported 1.0 1.2 3.0 - * - * @author GedMarc - * @version 1.0 - *

- * @since Feb 9, 2015 - */ -public enum KeyGenAttributes - implements AttributeDefinitions -{ - - /** - * Sets or returns whether a keygen field automatically gets focus when the page loads, or not - */ - AutoFocus, - /** - * Sets or returns the value of the challenge attribute of a keygen field - */ - Challenge, - /** - * Sets or returns whether a keygen field is disabled, or not - */ - Disabled, - /** - * Returns a reference to the form that contains the keygen field - *

- */ - Form, - /** - * Sets or returns the value of the keytype attribute of a keygen field - */ - KeyType, - /** - * Sets or returns the value of the name attribute of a keygen field - */ - Name, - /** - * Returns which type of form element the keygen field is - */ - Type; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/LabelAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/LabelAttributes.java deleted file mode 100644 index 091f1cea5..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/LabelAttributes.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - */ -public enum LabelAttributes - implements AttributeDefinitions -{ - - /** - * Returns the labeled control - */ - Control, - /** - * Returns a reference to the form that contains the label - */ - Form, - /** - * Sets or returns the value of the for attribute of a label - */ - For, - ; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/LinkAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/LinkAttributes.java deleted file mode 100644 index 892bbef45..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/LinkAttributes.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.client.HTMLVersions; -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; -import com.guicedee.services.jsonrepresentation.json.StaticStrings; - -/** - * Definition and Usage - *

- * The >a< tag defines a hyperlink, which is used to link from one page to another. - *

- * The most important attribute of the >a< element is the HREF attribute, which indicates the links destination. - *

- * By default, links will appear as follows in all browsers: - *

- * An unvisited link is underlined and blue A visited link is underlined and purple An active link is underlined and red - *

- * Browser Support Element >a< Yes Yes Yes Yes Yes - *

- * Tips and Notes - *

- * Tip: The following attributes: download, hreflang, media, rel, target, and type cannot be present if the href attribute is not present. - *

- * Tip: A linked page is normally displayed in the current browser window, unless you specify another target. - *

- * Tip: Use CSS to style links. Differences Between HTML 4.01 and HTML5 - *

- * In HTML 4.01, the >a< tag could be either a hyperlink or an anchor. In HTML5, the >a< tag is always a hyperlink, but if it has no href attribute, it is only a - * placeholder for a - * hyperlink. - *

- * HTML5 has some new attributes, and some HTML 4.01 attributes are no longer supported. - * - * @author MMagon - * @version 1.1 - *

- * Updated attributes to full suite - * @since 23 Sep 2013 - */ -public enum LinkAttributes - implements AttributeDefinitions -{ - /** - * Not supported in HTML5. - * Specifies the character-set of a linked document - * - * @deprecated - */ - @Deprecated - Charset(HTMLVersions.HTML401Transitional), - /** - * Specifies the coordinates of a link - * - * @deprecated - */@Deprecated - Coords(HTMLVersions.HTML401Transitional), - /** - * Specifies that the target will be downloaded when a user clicks - */ - Download(HTMLVersions.HTML5, true), - /** - * Specifies the URL of the page the link goes to - */ - HRef, - /** - * Specifies the language of the linked document - */ - HRefLang, - /** - * Specifies what media/device the linked document is optimized for - */ - Media, - /** - * Specifies the name of an anchor - * Not Supported in HTML5 use global attribute ID instead - * - * @deprecated - */@Deprecated - Name(HTMLVersions.HTML401Transitional), - /** - * Specifies the relationship between the current document and the linked document - */ - Rel, - /** - * Not supported in HTML5. - * - * @deprecated - */@Deprecated - Rev(HTMLVersions.HTML401Transitional, true), - /** - * Specifies the shape of a link - * - * @deprecated - */@Deprecated - Shape(HTMLVersions.HTML401Transitional), - /** - * Specifies where to open the linked document - */ - Target, - /** - * Specifies the media type of the linked document - */ - Type, - /** - * Sets the toggle - */ - Data_Toggle, - /** - * Sets the target - */ - Data_Target, - /** - * Speicifies the data parent of the link - */ - Data_Parent; - - private HTMLVersions maxsupportedVersion = HTMLVersions.HTML5; - private HTMLVersions minsupportedVersion = HTMLVersions.HTML401Frameset; - private Class returnType = String.class; - - /** - * Construct a new "a" tag with all the predefined supported HTML versions - */ - LinkAttributes() - { - } - - LinkAttributes(HTMLVersions maxsupportedVersion) - { - this.maxsupportedVersion = maxsupportedVersion; - } - - @SuppressWarnings("unused") - LinkAttributes(HTMLVersions minsupportedVersion, boolean trues) - { - this.minsupportedVersion = minsupportedVersion; - } - - @Override - public String toString() - { - return name().toLowerCase() - .replace(StaticStrings.CHAR_UNDERSCORE, StaticStrings.CHAR_DASH); - } - - @Override - public boolean isKeyword() - { - return false; - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/MetaAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/MetaAttributes.java deleted file mode 100644 index 2461332b7..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/MetaAttributes.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; -import com.guicedee.services.jsonrepresentation.json.StaticStrings; - -/** - * MetaData Attributes - * - * @author MMagon - * @version 1.0 - * @since 2013/11/13 - */ -public enum MetaAttributes - implements AttributeDefinitions -{ - Name, - Schema, - Http_Equiv, - Content, - Charset; - - /** - * Returns the lowercase variant of the attribute - * - * @return - */ - @Override - public String toString() - { - return name().toLowerCase() - .replace(StaticStrings.CHAR_UNDERSCORE, '-'); - } - - @Override - public boolean isKeyword() - { - return false; - } - -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/NoAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/NoAttributes.java deleted file mode 100644 index a3215841c..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/NoAttributes.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Registers that the component has No Attributes - * - * @author MMagon - * @version 1.0 - * @since 23 Sep 2013 - */ -public enum NoAttributes - implements AttributeDefinitions -{ - - ; - - @Override - public boolean isKeyword() - { - return false; - } - -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/ObjectAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/ObjectAttributes.java deleted file mode 100644 index c3c375f86..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/ObjectAttributes.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - * @version 1.0 - * @since Feb 9, 2015 - */ -public enum ObjectAttributes - implements AttributeDefinitions -{ - - /** - * Specifies the URL of the resource to be used by the object - */ - Data, - /** - * Specifies one or more forms the object belongs to - */ - Form, - /** - * Specifies the height of the object - */ - Height, - /** - * Specifies a name for the object - */ - Name, - /** - * Specifies the media type of data specified in the data attribute - */ - Type, - /** - * Specifies the name of a client-side image map to be used with the object - */ - UseMap, - /** - * Specifies the width in pixels - */ - Width; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/OptionAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/OptionAttributes.java deleted file mode 100644 index e658d63d7..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/OptionAttributes.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - */ -public enum OptionAttributes - implements AttributeDefinitions -{ - /** - * Specifies the label - */ - Label, - /** - * Specifies the value of an option - */ - Value; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/OptionGroupAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/OptionGroupAttributes.java deleted file mode 100644 index d6c741607..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/OptionGroupAttributes.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - * @version 1.0 - * @since Feb 9, 2015 - */ -public enum OptionGroupAttributes - implements AttributeDefinitions -{ - /** - * Specifies the label for an option group - */ - Label, - ; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/ParagraphAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/ParagraphAttributes.java deleted file mode 100644 index 93f2011a3..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/ParagraphAttributes.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Defines all the attributes for a paragraph - * - * @author GedMarc - * @version 1.0 - * @since Mar 1, 2015 - */ -public enum ParagraphAttributes - implements AttributeDefinitions -{ - - /** - * Specifies the alignment of the text within a paragraph - *

- * left - * right - * center - * justify - * - * @deprecated Not supported in HTML 5 - */ - @Deprecated - Align; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/ParameterAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/ParameterAttributes.java deleted file mode 100644 index b29c0ed94..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/ParameterAttributes.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Defines the attributes for a parameter - * - * @author GedMarc - * @version 1.0 - * @since Mar 1, 2015 - */ -public enum ParameterAttributes - implements AttributeDefinitions -{ - - /** - * Specifies the name of a parameter - */ - Name, - /** - * Not supported in HTML5. Specifies the media type of the parameter - * - * @deprecated - */ - @Deprecated - Type, - /** - * Specifies the value of the parameter - */ - Value, - /** - * Not supported in HTML5 - *

- * Specifies the type of the value - * data - * ref - * object - * - * @deprecated - */ - @Deprecated - ValueType; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/ProgressBarAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/ProgressBarAttributes.java deleted file mode 100644 index d5240acde..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/ProgressBarAttributes.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - * @version 1.0 - * @since Mar 1, 2015 - */ -public enum ProgressBarAttributes - implements AttributeDefinitions -{ - /** - * Sets the Maximum Value - */ - Max, - /** - * Sets the current value - */ - Value; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/QuotationAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/QuotationAttributes.java deleted file mode 100644 index 331b87ecf..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/QuotationAttributes.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Specifies a quotations attributes - * - * @author GedMarc - * @version 1.0 - * @since Mar 1, 2015 - */ -public enum QuotationAttributes - implements AttributeDefinitions -{ - /** - * Specifies the source URL of the quote - */ - Cite; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/ScriptAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/ScriptAttributes.java deleted file mode 100644 index 716f9a2f3..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/ScriptAttributes.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Valid script attributes - * - * @author MMagon - * @version 1.0 - * @since 2013/11/14 - */ -public enum ScriptAttributes - implements AttributeDefinitions -{ - Async, - Charset, - Defer, - Src, - Type; - - private boolean keyWord; - - ScriptAttributes() - { - - } - - /** - * Returns the lowercase name - * - * @return - */ - @Override - public String toString() - { - return name().toLowerCase(); - } - - @Override - public boolean isKeyword() - { - return keyWord; - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/SourceAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/SourceAttributes.java deleted file mode 100644 index 6dfbfa16b..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/SourceAttributes.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - * @version 1.0 - * @since Mar 1, 2015 - */ -public enum SourceAttributes - implements AttributeDefinitions -{ - - /** - * Specifies the type of media resource - */ - Media, - /** - * Specifies the URL of the media file - */ - URL, - /** - * Specifies the media type of the media resource - */ - Type; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/StyleAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/StyleAttributes.java deleted file mode 100644 index c9bde7bad..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/StyleAttributes.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Supplies the available attributes for the style tag - * - * @author mmagon - */ -public enum StyleAttributes - implements AttributeDefinitions -{ - /** - * Specifies what media/device the media resource is optimized for - */ - Media, - /** - * Specifies that the style only applies to this elements parent element and the - * elements child elements - */ - Scoped, - /** - * Specifies the MIME Type of the style sheet - */ - Type; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/TableAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/TableAttributes.java deleted file mode 100644 index d2b4ebd78..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/TableAttributes.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Valid attributes for Tables - * - * @author MMagon - * @version 1.0 - * @since 23 Sep 2013 - */ -public enum TableAttributes - implements AttributeDefinitions -{ - CellSpacing, - CellPadding; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/TableCellAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/TableCellAttributes.java deleted file mode 100644 index ca7bcb1dc..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/TableCellAttributes.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * Valid additional attributes for table cells - * - * @author MMagon - * @version 1.0 - * @since 23 Sep 2013 - */ -public enum TableCellAttributes - implements AttributeDefinitions -{ - ColSpan, - RowSpan; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/TableColumnAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/TableColumnAttributes.java deleted file mode 100644 index 3895944ea..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/TableColumnAttributes.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - */ -public enum TableColumnAttributes - implements AttributeDefinitions -{ - - /** - * Specifies the alignment of the content related to a col element. - *

- * left right center justify char Not supported in HTML5. - *

- * - * @deprecated - */@Deprecated - Align, - /** - * Not supported in HTML5. - *

- * Specifies the alignment of the content related to a col element to a character - *

- * - * @deprecated - */@Deprecated - Char, - /** - * Not supported in HTML5. Specifies the number of characters the content will be aligned from the character specified by the char attribute - *

- * - * @deprecated - */@Deprecated - CharOff, - /** - * Specifies the number of columns a col element should span - */ - Span, - /** - * Not supported in HTML5. - *

- * Specifies the vertical alignment of the content related to a col element - *

- * - * @deprecated - */@Deprecated - VAlign, - /** - * Not supported in HTML5. - *

- * Specifies the width of a col element - * - * @deprecated - */@Deprecated - Width; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/TextAreaAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/TextAreaAttributes.java deleted file mode 100644 index d809a3192..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/TextAreaAttributes.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - * @version 1.0 - * @since Mar 1, 2015 - */ -public enum TextAreaAttributes - implements AttributeDefinitions -{ - - /** - * Sets or returns whether a text area should automatically get focus when the page loads - */ - AutoFocus, - /** - * Sets or returns the value of the cols attribute of a text area - */ - Cols, - /** - * Sets or returns the default value of a text area - */ - DefaultValue, - /** - * Sets or returns whether the text area is disabled, or not - */ - Disabled, - /** - * Returns a reference to the form that contains the text area - */ - Form, - /** - * Sets or returns the value of the maxlength attribute of a text area - */ - MaxLength, - /** - * Sets or returns the value of the name attribute of a text area - */ - Name, - /** - * Sets or returns the value of the placeholder attribute of a text area - */ - PlaceHolder, - /** - * Sets or returns whether the contents of a text area is read-only - */ - ReadOnly, - /** - * Sets or returns whether the text area must be filled out before submitting a form - */ - Required, - /** - * Sets or returns the value of the rows attribute of a text area - */ - Rows, - /** - * Returns the type of the form element the text area is - */ - Type, - /** - * Sets or returns the contents of a text area - */ - Value, - /** - * sets or returns the value of the wrap attribute of a text area - */ - Wrap; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/TimeAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/TimeAttributes.java deleted file mode 100644 index 7a98de33d..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/TimeAttributes.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - * @version 1.0 - * @since Mar 1, 2015 - */ -public enum TimeAttributes - implements AttributeDefinitions -{ - /** - * Represent a machine-readable date/time of the time element - */ - DateTime, - ; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/TrackAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/TrackAttributes.java deleted file mode 100644 index 12a00e605..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/TrackAttributes.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - * @version 1.0 - * @since Mar 1, 2015 - */ -public enum TrackAttributes - implements AttributeDefinitions -{ - - /** - * Sets or returns the default state of the track - */ - Default, - /** - * Sets or returns the value of the kind attribute of the track - */ - Kind, - /** - * Sets or returns the value of the label attribute of the track - */ - Label, - /** - * Returns the current state of the track resource - */ - ReadyState, - /** - * Sets or returns the value of the src attribute of the track - */ - Src, - /** - * Sets or returns the value of the srclang attribute of the track - */ - Srclang, - /** - * Returns a TextTrack object representing the track element's text track data - */ - Track; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/attributes/VideoAttributes.java b/src/main/java/com/jwebmp/core/base/html/attributes/VideoAttributes.java deleted file mode 100644 index 4af76ba9c..000000000 --- a/src/main/java/com/jwebmp/core/base/html/attributes/VideoAttributes.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.attributes; - -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; - -/** - * @author GedMarc - * @version 1.0 - * @since Mar 1, 2015 - */ -public enum VideoAttributes - implements AttributeDefinitions -{ - - /** - * Specifies that the video will start playing as soon as it is ready - */ - AutoPlay, - /** - * Specifies that video controls should be displayed (such as a play/pause button etc). - */ - Controls, - /** - * Sets the height of the video player - */ - Height, - /** - * Specifies that the video will start over again, every time it is finished - */ - Loop, - /** - * Specifies that the audio output of the video should be muted - */ - Muted, - /** - * Specifies an image to be shown while the video is downloading, or until the user hits the play button - */ - Poster, - /** - * Specifies if and how the author thinks the video should be loaded when the page loads - */ - Preload, - /** - * Specifies the URL of the video file - */ - Src, - /** - * Sets the width of the video player - */ - Width, - /** - * The specific volume - */ - Volume; - - @Override - public boolean isKeyword() - { - return false; - } - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/AttributeDefinitions.java b/src/main/java/com/jwebmp/core/base/html/interfaces/AttributeDefinitions.java deleted file mode 100644 index a06322749..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/AttributeDefinitions.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * This interface marks a class or enumeration as a valid attribute value set - * - * @author MMagon - * @version 1.0 - * @since 21 Jul 2013 - */ -@FunctionalInterface -public interface AttributeDefinitions -{ - - /** - * returns the attribute tag name to use - * - * @return - */ - @JsonValue - @Override - String toString(); - - /** - * Returns if this attribute is just a keyword, or a key/value pair - * - * @return - */ - boolean isKeyword(); -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/ContainerType.java b/src/main/java/com/jwebmp/core/base/html/interfaces/ContainerType.java deleted file mode 100644 index 0d416a95e..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/ContainerType.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * Defines a class that can contain the general element types - *

- * - * @author GedMarc - * @version 1.0 - * @since 07 Aug 2015 - */ -public interface ContainerType - extends DisplayObjects -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/CssClass.java b/src/main/java/com/jwebmp/core/base/html/interfaces/CssClass.java deleted file mode 100644 index cf1bbcd59..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/CssClass.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -import java.io.Serializable; - -/** - * Describes an object as a CSS Field entry - * - * @author mmagon - * @version 1.0 - * @since 2014/04/23 - */ -@FunctionalInterface -public interface CssClass - extends Serializable -{ - - /** - * @return The class name this object must yield - */ - String getName(); -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/DisplayObjectType.java b/src/main/java/com/jwebmp/core/base/html/interfaces/DisplayObjectType.java deleted file mode 100644 index aa0a8ba54..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/DisplayObjectType.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * @author GedMarc - * @version 1.0 - * @since 07 Aug 2015 - */ -public interface DisplayObjectType - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/DisplayObjects.java b/src/main/java/com/jwebmp/core/base/html/interfaces/DisplayObjects.java deleted file mode 100644 index 6e44a6a64..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/DisplayObjects.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * @author GedMarc - * @version 1.0 - * @since 07 Aug 2015 - */ -public interface DisplayObjects - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/EasingAnimation.java b/src/main/java/com/jwebmp/core/base/html/interfaces/EasingAnimation.java deleted file mode 100644 index 231fec355..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/EasingAnimation.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * Specifies an animation that is in the Easing collection set - * - * @author MMagon - * @version 1.0 - * @since 2014/05/15 - */ - -public interface EasingAnimation -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/FeatureEvents.java b/src/main/java/com/jwebmp/core/base/html/interfaces/FeatureEvents.java deleted file mode 100644 index 86820946c..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/FeatureEvents.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -import com.jwebmp.core.htmlbuilder.javascript.events.interfaces.IEvent; - -/** - * Interface to define an event is a feature event - * - * @author MMagon - * @version 1.0 - * @since 2014 08 12 - */ - -public interface FeatureEvents - extends IEvent -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/GlobalChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/GlobalChildren.java deleted file mode 100644 index 402dfe2cb..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/GlobalChildren.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -import com.jwebmp.core.base.interfaces.*; - -/** - * Defines the general interface for components that is allowed on most components - * - * @author MMagon - * @version 1.0 - * @since 2014/10/26 - */ - -public interface GlobalChildren -{ - void init(); - - void preConfigure(); - - boolean isConfigured(); - - boolean isInitialized(); - - void destroy(); - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentStyleBase asStyleBase() - { - return (IComponentStyleBase) this; - } - - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHierarchyBase asHierarchyBase() - { - return (IComponentHierarchyBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentDataBindingBase asAngularBase() - { - return (IComponentDataBindingBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHTMLAttributeBase asAttributeBase() - { - return (IComponentHTMLAttributeBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHTMLBase asTagBase() - { - return (IComponentHTMLBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentEventBase asEventBase() - { - return (IComponentEventBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentFeatureBase asFeatureBase() - { - return (IComponentFeatureBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentThemeBase asThemeBase() - { - return (IComponentThemeBase) this; - } - - /** - * Returns the components exposed dependency methods - * - * @return This component type-casted - */ - default IComponentDependencyBase asDependencyBase() - { - return (IComponentDependencyBase) this; - } - - /** - * Returns the base exposed methods - * - * @return This component type-casted - */ - default IComponentBase asBase() - { - return (IComponentBase) this; - } - - /** - * Returns the HTML for the given object - *

- * - * @param outputHtml Dummy holder for specifying HTML output - * @return The class and the associated ID and children count - */ - String toString(boolean outputHtml); - - /** - * Returns this components HTML after configuration and pre-rendering - * - * @param tabCount The number of tabs to indent by - * @return The sting with the given tab counts - */ - String toString(Integer tabCount); - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/GlobalFeatures.java b/src/main/java/com/jwebmp/core/base/html/interfaces/GlobalFeatures.java deleted file mode 100644 index 134f7e5c4..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/GlobalFeatures.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -import com.jwebmp.core.base.interfaces.IComponentBase; -import com.jwebmp.core.base.interfaces.IComponentDependencyBase; -import com.jwebmp.core.base.interfaces.IComponentFeatureBase; - -/** - * Defines a collection of features available on most component types - * - * @author MMagon - */ -public interface GlobalFeatures -{ - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentFeatureBase asFeatureBase() - { - return (IComponentFeatureBase) this; - } - - /** - * Returns the components exposed dependency methods - * - * @return This component type-casted - */ - default IComponentDependencyBase asDependencyBase() - { - return (IComponentDependencyBase) this; - } - - /** - * Returns the base exposed methods - * - * @return This component type-casted - */ - default IComponentBase asBase() - { - return (IComponentBase) this; - } -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/HTMLFeatures.java b/src/main/java/com/jwebmp/core/base/html/interfaces/HTMLFeatures.java deleted file mode 100644 index b380290a0..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/HTMLFeatures.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * Defines a collection of features available on most component types - * - * @author MMagon - */ -public interface HTMLFeatures - extends GlobalFeatures -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/InputChoiceType.java b/src/main/java/com/jwebmp/core/base/html/interfaces/InputChoiceType.java deleted file mode 100644 index bd4305dd8..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/InputChoiceType.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.jwebmp.core.base.html.interfaces; - -import jakarta.validation.constraints.NotNull; - -/** - * An input type that designates a choice - checkbox/radio - */ -@FunctionalInterface -public interface InputChoiceType -{ - @SuppressWarnings("unchecked") - @NotNull - J setChecked(boolean checked); -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/LayoutHandler.java b/src/main/java/com/jwebmp/core/base/html/interfaces/LayoutHandler.java deleted file mode 100644 index 7e67f1e61..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/LayoutHandler.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * This interface marks a component as able to be a layout - * - * @author mmagon - * @version 1.0 - * @since 2013/11/20 - */ - -public interface LayoutHandler extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/LifeCycle.java b/src/main/java/com/jwebmp/core/base/html/interfaces/LifeCycle.java deleted file mode 100644 index bb176c234..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/LifeCycle.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jwebmp.core.base.html.interfaces; - -/** - * LifeCycle implementation of the given object - */ -public interface LifeCycle -{ - /** - * Initializes - */ - void init(); - - /** - * Preconfigures - */ - void preConfigure(); - - /** - * Is Configured - * - * @return if it is configured - */ - - boolean isConfigured(); - - /** - * If it is initialized - * - * @return if the component has been initialized - */ - boolean isInitialized(); - - /** - * What happens on destroy - */ - void destroy(); -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/NamedPair.java b/src/main/java/com/jwebmp/core/base/html/interfaces/NamedPair.java deleted file mode 100644 index 175a5c57c..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/NamedPair.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * @param - * The Left Field Type - * @param - * The Right Field Typ - * Denotes a named pair - * - * @author MMagon - * @version 1.0 - * @since 2014/12/09 - */ - -public interface NamedPair -{ - /** - * Returns the left value - * - * @return - */ - S getLeft(); - - /** - * returns the right value - * - * @return - */ - T getRight(); -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/NoClassAttribute.java b/src/main/java/com/jwebmp/core/base/html/interfaces/NoClassAttribute.java deleted file mode 100644 index 2898af422..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/NoClassAttribute.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * Specifies a component must not generate any class string - * - * @author mmagon - * @version 1.0 - * @since 2013/04/23 - */ -public interface NoClassAttribute -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/NoClosingBracket.java b/src/main/java/com/jwebmp/core/base/html/interfaces/NoClosingBracket.java deleted file mode 100644 index 1fa3d7fc8..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/NoClosingBracket.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * Marks that no closing bracket should be present - * - * @author MMagon - */ - -public interface NoClosingBracket -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/NoClosingTag.java b/src/main/java/com/jwebmp/core/base/html/interfaces/NoClosingTag.java deleted file mode 100644 index 9ed1078c9..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/NoClosingTag.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * Specifies not to render a closing tag - * - * @author MMagon - * @version 1.0 - * @since 2013/11/13 - */ - -public interface NoClosingTag -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/NoFeatures.java b/src/main/java/com/jwebmp/core/base/html/interfaces/NoFeatures.java deleted file mode 100644 index 17b2fa6b8..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/NoFeatures.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * Marks a component as not able to handle features - * - * @author MMagon - * @version 1.0 - * @since 2013/11/12 - */ -public interface NoFeatures - extends GlobalFeatures -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/NoIDTag.java b/src/main/java/com/jwebmp/core/base/html/interfaces/NoIDTag.java deleted file mode 100644 index 843c0f024..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/NoIDTag.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * This interface denotes that the ID tag must not be included in the rendering - * - * @author mmagon - * @since 2013/07/17 - */ -public interface NoIDTag -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/NoNewLineBeforeChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/NoNewLineBeforeChildren.java deleted file mode 100644 index e24fa633c..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/NoNewLineBeforeChildren.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * marks no new lines before children - * - * @author GedMarc - * @since 2015/03/01 - */ -public interface NoNewLineBeforeChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/NoNewLineBeforeClosingTag.java b/src/main/java/com/jwebmp/core/base/html/interfaces/NoNewLineBeforeClosingTag.java deleted file mode 100644 index 9c7c846e5..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/NoNewLineBeforeClosingTag.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * Marks a component to not generate a new line - * - * @author MMagon - */ - -public interface NoNewLineBeforeClosingTag -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/NoNewLineForRawText.java b/src/main/java/com/jwebmp/core/base/html/interfaces/NoNewLineForRawText.java deleted file mode 100644 index 66e7624dc..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/NoNewLineForRawText.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * Marks a component to not render new lines for the raw text - * - * @author MMagon - * @version 1.0 - * @since 2014 09 23 - */ - -public interface NoNewLineForRawText -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/OneValidTag.java b/src/main/java/com/jwebmp/core/base/html/interfaces/OneValidTag.java deleted file mode 100644 index b1bd6fd12..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/OneValidTag.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -/** - * Specifies that this tag can only be used once - * - * @author MMagon - * @version 1.0 - * @since 2011/11/14 - */ - -public interface OneValidTag -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/ResizableEvents.java b/src/main/java/com/jwebmp/core/base/html/interfaces/ResizableEvents.java deleted file mode 100644 index d79afe464..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/ResizableEvents.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces; - -import com.jwebmp.core.htmlbuilder.javascript.events.interfaces.IEvent; - -/** - * Defines events capable for JWResiable - * - * @author MMagon - * @version 1.0 - * @since 2014/05/16 - */ -public interface ResizableEvents - extends IEvent -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/AbbreviationChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/AbbreviationChildren.java deleted file mode 100644 index f93d33782..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/AbbreviationChildren.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * Defines Abbreviation Children - * - * @author GedMarc - */ -public interface AbbreviationChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/AddressChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/AddressChildren.java deleted file mode 100644 index 92c1d9bcc..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/AddressChildren.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; -import com.jwebmp.core.base.html.interfaces.children.generics.ParagraphChildren; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; - -/** - * @author GedMarc - */ -public interface AddressChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/AreaChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/AreaChildren.java deleted file mode 100644 index a7d6f7290..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/AreaChildren.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * Allows labels inside of areas - * - * @author MMagon - */ -public interface AreaChildren extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/AudioChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/AudioChildren.java deleted file mode 100644 index 792af58e1..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/AudioChildren.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * @author GedMarc - */ -public interface AudioChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/BiDirectionalOverrideChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/BiDirectionalOverrideChildren.java deleted file mode 100644 index 59f6690fd..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/BiDirectionalOverrideChildren.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.children.generics.ParagraphChildren; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; - -/** - * @author GedMarc - */ -public interface BiDirectionalOverrideChildren - extends ParagraphChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/BodyChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/BodyChildren.java deleted file mode 100644 index c09d0cc58..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/BodyChildren.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * Children valid for the body tag - * - * @author MMagon - * @version 1.0 - * @since 1013/11/14 - */ - -public interface BodyChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/BodyFeatures.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/BodyFeatures.java deleted file mode 100644 index d1d419041..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/BodyFeatures.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalFeatures; - -/** - * Describes a list of features valid for a Body object - * - * @author mmagon - * @version 1.0 - * @since 2013/11/20 - */ -public interface BodyFeatures - extends GlobalFeatures -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/CodeChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/CodeChildren.java deleted file mode 100644 index 0dede0375..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/CodeChildren.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * @author GedMarc - */ -public interface CodeChildren extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/DataListChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/DataListChildren.java deleted file mode 100644 index 0a6352b37..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/DataListChildren.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * @author GedMarc - */ -public interface DataListChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/DefinitionListChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/DefinitionListChildren.java deleted file mode 100644 index 3426e9395..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/DefinitionListChildren.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * @author GedMarc - */ -public interface DefinitionListChildren extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/DescriptionListChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/DescriptionListChildren.java deleted file mode 100644 index 3183f84aa..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/DescriptionListChildren.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * @author GedMarc - */ -public interface DescriptionListChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/DetailsChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/DetailsChildren.java deleted file mode 100644 index 3ec8877fa..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/DetailsChildren.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * @author GedMarc - */ -public interface DetailsChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/DirectoryListChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/DirectoryListChildren.java deleted file mode 100644 index 925088adf..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/DirectoryListChildren.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * @author GedMarc - */ -public interface DirectoryListChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/FieldSetChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/FieldSetChildren.java deleted file mode 100644 index 6e8d4d2d2..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/FieldSetChildren.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * @author GedMarc - */ -public interface FieldSetChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/FigureChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/FigureChildren.java deleted file mode 100644 index 217fb750e..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/FigureChildren.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * @author GedMarc - */ -public interface FigureChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/FormChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/FormChildren.java deleted file mode 100644 index 6a4666db3..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/FormChildren.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * @author GedMarc - */ -public interface FormChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/HeadChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/HeadChildren.java deleted file mode 100644 index 2722c602b..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/HeadChildren.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * Describes valid children for the Head tag - * - * @author MMagon - * @version 1.0 - * @since 2013/11/12 - */ -public interface HeadChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/HeaderChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/HeaderChildren.java deleted file mode 100644 index e681618b5..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/HeaderChildren.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * @author GedMarc - */ -public interface HeaderChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/HeaderGroupChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/HeaderGroupChildren.java deleted file mode 100644 index e9545ab46..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/HeaderGroupChildren.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * @author GedMarc - */ -public interface HeaderGroupChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/HtmlChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/HtmlChildren.java deleted file mode 100644 index 82dc65bfb..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/HtmlChildren.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * Describes a valid HTML Child - * - * @author MMagon - * @version 1.0 - * @since 2013/11/12 - */ -public interface HtmlChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/ImageMapChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/ImageMapChildren.java deleted file mode 100644 index d8aec3f0c..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/ImageMapChildren.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * Describes a valid child for the Image Map - * - * @author MMagon - * @version 1.0 - * @since 2013/11/22 - */ -public interface ImageMapChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/ImageMapFeatures.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/ImageMapFeatures.java deleted file mode 100644 index 63f4b563f..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/ImageMapFeatures.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalFeatures; - -/** - * Describes features available for addon to the Image ap - * - * @author MMagon - * @version 1.0 - * @since 2013/11/22 - */ -public interface ImageMapFeatures - extends GlobalFeatures -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/ListChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/ListChildren.java deleted file mode 100644 index c3bf3c269..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/ListChildren.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * Defines children available to the list component - * - * @author MMagon - * @version 1.0 - * @since 2014/06/16 - */ -public interface ListChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/ListItemChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/ListItemChildren.java deleted file mode 100644 index 329191f3f..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/ListItemChildren.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * Defines children available to the list component - * - * @author MMagon - * @version 1.0 - * @since 2014/06/16 - */ -public interface ListItemChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/MapChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/MapChildren.java deleted file mode 100644 index e22121dfa..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/MapChildren.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * Describes a valid child for the MAP Tag - * - * @author MMagon - * @version 1.0 - * @since 2013/11/22 - */ -public interface MapChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/NoChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/NoChildren.java deleted file mode 100644 index 48c25a419..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/NoChildren.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * @author GedMarc - */ -public interface NoChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/ObjectTagChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/ObjectTagChildren.java deleted file mode 100644 index eb5d9860f..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/ObjectTagChildren.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * @author GedMarc - */ -public interface ObjectTagChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/PageChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/PageChildren.java deleted file mode 100644 index d8a8307a6..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/PageChildren.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * This interface sets the allowed children for the Page Component - * - * @author MMagon - * @since 2013/07/16 - */ -public interface PageChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/PhraseChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/PhraseChildren.java deleted file mode 100644 index dff82e62a..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/PhraseChildren.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; -import com.jwebmp.core.base.html.interfaces.children.generics.ParagraphChildren; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; - -/** - * @author GedMarc - */ -public interface PhraseChildren - extends GlobalChildren,FormChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/RubyChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/RubyChildren.java deleted file mode 100644 index 799a15135..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/RubyChildren.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; - -/** - * @author GedMarc - */ -public interface RubyChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/SelectChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/SelectChildren.java deleted file mode 100644 index f9b453131..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/SelectChildren.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; - -/** - * @author GedMarc - */ -public interface SelectChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableBodyGroupChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableBodyGroupChildren.java deleted file mode 100644 index 123d9bd96..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableBodyGroupChildren.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; - -/** - * @author GedMarc - */ -public interface TableBodyGroupChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableChildren.java deleted file mode 100644 index 9c11867b6..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableChildren.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; - -/** - * Valid table children implements this class - * - * @author MMagon - * @version 1.0 - * @since 23 Sep 2013 - */ -public interface TableChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableColumnGroupChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableColumnGroupChildren.java deleted file mode 100644 index 278fe0393..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableColumnGroupChildren.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; - -/** - * @author GedMarc - */ -public interface TableColumnGroupChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableFooterGroupChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableFooterGroupChildren.java deleted file mode 100644 index 4d12f9298..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableFooterGroupChildren.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; - -/** - * @author GedMarc - */ -public interface TableFooterGroupChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableHeaderGroupChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableHeaderGroupChildren.java deleted file mode 100644 index 46023491a..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableHeaderGroupChildren.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; - -/** - * Valid children for Table Header Groups - * - * @author MMagon - * @version 1.0 - * @since 23 Sep 2013 - */ -public interface TableHeaderGroupChildren - extends GlobalChildren - -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableRowChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableRowChildren.java deleted file mode 100644 index e9009460e..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/TableRowChildren.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; - -/** - * @author MMagon - */ -public interface TableRowChildren - extends GlobalChildren -{} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/VideoChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/VideoChildren.java deleted file mode 100644 index 38477dc2a..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/VideoChildren.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; -import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; - -/** - * @author GedMarc - */ -public interface VideoChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/children/generics/ParagraphChildren.java b/src/main/java/com/jwebmp/core/base/html/interfaces/children/generics/ParagraphChildren.java deleted file mode 100644 index bd2e22a72..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/children/generics/ParagraphChildren.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.children.generics; - -import com.jwebmp.core.base.html.interfaces.GlobalChildren; - -/** - * Specifies all children that are paragraph or textual in nature - * - * @author GedMarc - */ -public interface ParagraphChildren - extends GlobalChildren -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/events/BodyEvents.java b/src/main/java/com/jwebmp/core/base/html/interfaces/events/BodyEvents.java deleted file mode 100644 index 9900f6aaf..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/events/BodyEvents.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.events; - -import com.jwebmp.core.base.html.interfaces.GlobalFeatures; -import com.jwebmp.core.htmlbuilder.javascript.events.interfaces.IEvent; - -/** - * Determines an event allowed on the body component - * - * @author MMagon - * @version 1.0 - * @since 2014/09/11 - */ - -public interface BodyEvents> - extends IEvent -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/events/GlobalEvents.java b/src/main/java/com/jwebmp/core/base/html/interfaces/events/GlobalEvents.java deleted file mode 100644 index 373454c67..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/events/GlobalEvents.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.events; - -import com.jwebmp.core.base.html.interfaces.LifeCycle; -import com.jwebmp.core.base.interfaces.*; - -/** - * Defines a global event that can be added to all components - * - * @author GedMarc - * @since 214/12/20 - */ -public interface GlobalEvents> - extends LifeCycle -{ - /** - * Checks if this feature has been configured and rendered with all the features - */ - void checkAssignedFunctions(); - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/events/NoEvents.java b/src/main/java/com/jwebmp/core/base/html/interfaces/events/NoEvents.java deleted file mode 100644 index 0fa8b5ff6..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/events/NoEvents.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.events; - -/** - * Marks a component not able to handle events - *

- * - * @author MMagon - *

- *

- * @version 1.0 - * @since 2013/11/12 - */ -public interface NoEvents - extends GlobalEvents -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/html/interfaces/events/ParagraphEvents.java b/src/main/java/com/jwebmp/core/base/html/interfaces/events/ParagraphEvents.java deleted file mode 100644 index f8099ecae..000000000 --- a/src/main/java/com/jwebmp/core/base/html/interfaces/events/ParagraphEvents.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.html.interfaces.events; - -import com.jwebmp.core.base.html.interfaces.GlobalFeatures; -import com.jwebmp.core.htmlbuilder.javascript.events.interfaces.IEvent; - -/** - * @author MMagon - */ -public interface ParagraphEvents> - extends IEvent -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/IComponentBase.java b/src/main/java/com/jwebmp/core/base/interfaces/IComponentBase.java deleted file mode 100644 index ac1209369..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/IComponentBase.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.interfaces; - -import com.jwebmp.core.base.servlets.enumarations.*; -import jakarta.validation.constraints.*; - -import java.io.*; -import java.util.*; - -/** - * Neater way of accessing the component methods - * - * @param Always this component - * @author GedMarc - * @since 2016/09/26 - */ -public interface IComponentBase> - extends Cloneable, Serializable -{ - /** - * Clones this component and assigns a new ID - *

- * - * @return The cloned component - */ - J cloneComponent(); - - /** - * Gets the ID of this component - *

- * - * @return The ID of this component - */ - String getID(); - - /** - * Returns the ID with the # in the front of it - *

- * - * @param jQueryHolder Anything - *

- * @return An ID starting with # - */ - String getID(boolean jQueryHolder); - - /** - * Returns the component rendering for JQuery string Requires the rendering for component is set - *

- * - * @return $(' # x '). - */ - String getJQueryID(); - - /** - * Returns the new line character according to Running Environment - *

- * - * @return A new line if is in development mode - */ - String getNewLine(); - - /** - * Returns a map of user defined properties for this component - * - * @return - */ - Map getProperties(); - - /** - * returns a new StringSuilder of the raw text with the specific tab counts - *

- * - * @param tabCounts

- * @return - */ - StringBuilder getText(int tabCounts); - - /** - * If this component is already configured - * - * @return - */ - boolean isConfigured(); - - /** - * Specifies whether or not to render this component in a Production/QA fashion - *

- * - * @return If this component will render in production mode - */ - boolean isTiny(); - - /** - * Run-Once on creation Executes a piece of code before running any rendering. Marks the component as configured - */ - void preConfigure(); - - /** - * If this component is already configured - * - * @param configured - * @return - */ - J setConfigured(boolean configured); - - /** - * Sets the ID of this component - *

- * - * @param id The ID - * @return - */ - J setID(String id); - - /** - * Sets this components user defined properties - * - * @param properties - * @return - */ - J setProperties(Map properties); - - /** - * Appends the text to the raw text - * - * @param text - * @return - */ - @SuppressWarnings("unchecked") - default J appendText(String text) - { - setText(getText(0) + text); - return (J) this; - } - - /** - * Sets this components Raw Text - *

- * - * @param text The text to display as Raw Text - * @return - */ - J setText(String text); - - /** - * Sets this components Raw Text - *

- * - * @param text The text to display as Raw Text - * @return - */ - J setText(StringBuilder text); - - /** - * If this component will render as tiny HTML. Global override value - *

- * - * @param tiny Set if this component must render as tiny HTML. Does not affect CSS or JavaScript rendering - * @return - */ - J setTiny(boolean tiny); - - /** - * Returns if this component is needing refresh on next Ajax call - *

- * - * @return true if going to be touched - */ - boolean isTouched(); - - /** - * Mark this component as needing refresh to the Ajax Controller - *

- * - * @param touched Whether or not to update on next ajax call - * @return - */ - J setTouched(boolean touched); - - @NotNull ComponentTypes getComponentType(); -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/IComponentDataBindingBase.java b/src/main/java/com/jwebmp/core/base/interfaces/IComponentDataBindingBase.java deleted file mode 100644 index 7e400de84..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/IComponentDataBindingBase.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.interfaces; - -import com.jwebmp.core.base.ComponentBase; - -import java.util.Map; - -/** - * @param - * This Type (Always this class) - * - * @author GedMarc - * @since Sep 26, 2016 - */ -public interface IComponentDataBindingBase> -{ - /** - * Adds an object for watching across an application - * - * @param name - * The variable name to use - * @param dataObject - * The data object to map - * - * @return This for chain setting - */ - J addDto(String name, Object dataObject); - - /** - * Returns the angular objects mapped to this component - * - * @return - */ - Map getJsonObjects(); - - /** - * Returns the DTO currently mapped - * - * @param - * JavascriptPart - * @param name - * The name of the DTO to map - * @param classType - * The class type - * - * @return Null if not available - */ - T getDto(String name, Class classType); - - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHTMLAttributeBase asAttributeBase() - { - return (IComponentHTMLAttributeBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHTMLBase asTagBase() - { - return (IComponentHTMLBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentEventBase asEventBase() - { - return (IComponentEventBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentFeatureBase asFeatureBase() - { - return (IComponentFeatureBase) this; - } - - /** - * Returns the components exposed dependency methods - * - * @return This component type-casted - */ - default IComponentDependencyBase asDependencyBase() - { - return (IComponentDependencyBase) this; - } - - /** - * Returns the base exposed methods - * - * @return This component type-casted - */ - default IComponentBase asBase() - { - return (IComponentBase) this; - } - -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/IComponentDependencyBase.java b/src/main/java/com/jwebmp/core/base/interfaces/IComponentDependencyBase.java deleted file mode 100644 index 3df478c02..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/IComponentDependencyBase.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.interfaces; - -import com.jwebmp.core.base.ComponentBase; -import com.jwebmp.core.base.references.CSSReference; -import com.jwebmp.core.base.references.JavascriptReference; -import com.jwebmp.core.base.servlets.enumarations.RequirementsPriority; - -import java.util.Set; - -/** - * @param - * Always this object - * - * @author GedMarc - */ -public interface IComponentDependencyBase -{ - - /** - * Adds a CSS Reference to the collection - * - * @param cssReference - * - * @return - */ - J addCssReference(CSSReference cssReference); - - /** - * Adds a JavaScript Reference to the collection - * - * @param jsReference - * - * @return - */ - J addJavaScriptReference(JavascriptReference jsReference); - - /** - * Returns a clone of the given component type - * - * @return - */ - J cloneComponent(); - - /** - * Returns the strings of the CSS Links this will use - *

- * - * @return ArrayList of all CSS File Links in String format - */ - Set getCssReferences(); - - /** - * Return all the CSS References associated with this component - * - * @return - */ - Set getCssReferencesAll(); - - /** - * Returns all the CSS references with the given priority - * - * @param priority - * The priority of the references to retrieve - * - * @return A new array list of all the requested for references - */ - Set getCssReferencesAll(RequirementsPriority priority); - - /** - * Returns the JavaScript links attached to this component - *

- * - * @return - */ - Set getJavascriptReferences(); - - /** - * Return all the CSS References associated with this component. - * Override and add the references required for the functionality - * - * @return - */ - Set getJavascriptReferencesAll(); - - /** - * Returns all the CSS references with the given priority - * Override and add the references required for the functionality - * - * @param priority - * The priority of the references to retrieve - * - * @return A new array list of all the requested for references - */ - Set getJavascriptReferencesAll(RequirementsPriority priority); - - /** - * Removes the CSS Reference from the Component - * - * @param cssReference - * - * @return - */ - J removeCssReference(CSSReference cssReference); - - /** - * Removes the CSS Reference from the Component - * - * @param jsReference - * - * @return - */ - J removeJavaScriptReference(JavascriptReference jsReference); - -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/IComponentEventBase.java b/src/main/java/com/jwebmp/core/base/interfaces/IComponentEventBase.java deleted file mode 100644 index 102fb1788..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/IComponentEventBase.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.interfaces; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.jwebmp.core.base.ComponentEventBase; -import com.jwebmp.core.base.html.interfaces.LifeCycle; -import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; -import com.jwebmp.core.base.references.CSSReference; -import com.jwebmp.core.base.references.JavascriptReference; -import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; - -import java.util.Set; - -/** - * @param This classes capable event type - * @param This type - * - * @author GedMarc - * @since $(date) - */ -public interface IComponentEventBase> - extends GlobalEvents, - LifeCycle -{ - /** - * Checks if this feature has been configured and rendered with all the features - */ - void checkAssignedFunctions(); - - /** - * Adds an event to this object - *

- * - * @param event The Event to add - * @return - */ - J addEvent(E event); - - /** - * Adds in the JavaScript References for the Features - * - * @return - */ - Set getCssReferencesAll(); - - /** - * Returns the event type for this event - * - * @return - */ - @JsonProperty(value = "eventType") - EventTypes getEventTypes(); - - /** - * Gets all registered events - *

- * - * @return A Hash Map containing the event type and the events associated with it - */ - Set getEvents(); - - /** - * Returns all the events associated with the given type - * - * @param eventType - * @return - */ - Set> getEventsFor(EventTypes eventType); - - /** - * Adds in the JavaScript References for the Features - * - * @return - */ - Set getJavascriptReferencesAll(); - - /** - * In case need to put extra logic here - * - * @return - */ - Set getQueriesAll(); - - /** - * Events are types of feature that have server side support. These are referenced using the Ajax Receiver. - *

- * - * @param event The event to be removed - *

- * @return currently false - *

- */ - J removeEvent(E event); - - /** - * Sets the event type of an event - * - * @param eventType - */ - J setEventType(EventTypes eventType); - - /** - * Sets all the events to tiny - * - * @param tiny - * @return - */ - J setTiny(boolean tiny); - - /** - * Returns an event with the given Id - * - * @param eventId - * @return - */ - IComponentEventBase findEvent(String eventId); -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/IComponentFeatureBase.java b/src/main/java/com/jwebmp/core/base/interfaces/IComponentFeatureBase.java deleted file mode 100644 index 2874baaaf..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/IComponentFeatureBase.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.interfaces; - -import com.jwebmp.core.base.html.interfaces.GlobalFeatures; -import com.jwebmp.core.base.html.interfaces.LifeCycle; -import com.jwebmp.core.base.references.CSSReference; -import com.jwebmp.core.base.references.JavascriptReference; -import com.jwebmp.core.base.servlets.enumarations.RequirementsPriority; -import com.jwebmp.core.htmlbuilder.javascript.JavaScriptPart; - -import jakarta.validation.constraints.NotNull; - -import java.util.Set; - -/** - * @param - * @param - * @author GedMarc - * @since 2016/09/26 - */ -public interface IComponentFeatureBase> - extends LifeCycle,GlobalFeatures -{ - /** - * Adds a feature to the collection - * - * @param feature - * @return - */ - J addFeature(IComponentFeatureBase feature); - - /** - * Adds a variable to the collection - * - * @param variable - */ - J addVariable(String variable); - - /** - * Adds in the JavaScript References for the Features - * - * @return - */ - Set getCssReferencesAll(); - - /** - * Adds in the JavaScript References for the Features - * - * @return - */ - Set getJavascriptReferencesAll(); - - /** - * Returns the name of this feature - * - * @return the name of this feature - */ - String getName(); - - /** - * Returns any client side options available with this component - * - * @return - */ - JavaScriptPart getOptions(); - - /** - * Gets the render priority of this feature - * - * @return - */ - RequirementsPriority getPriority(); - - /** - * Returns all Queries Associated with a component - * - * @return - */ - Set getQueriesAll(); - - /** - * Sets the sort order for this feature. Default 10000 - * - * @return - */ - Integer getSortOrder(); - - /** - * Returns the list of variables - * - * @return - */ - Set getVariables(); - - /** - * Sets if this feature must be rendered in an $(document).ready statement - * - * @return If this feature has executed the assignFunctionToComponents method - */ - boolean isRenderAfterLoad(); - - /** - * Removes a feature from the components collection - *

- * - * @param feature The feature to be removed - *

- * @return True or false on whether it could be removed, e.g. if it ever - * existed. - */ - J removeFeature(F feature); - - /** - * Removes a variable from the collection - * - * @param variable - */ - J removeVariable(String variable); - - /** - * Renders the JavaScript for this Builder - * - * @return A string builder containing the raw JavaScript to send - */ - StringBuilder renderJavascript(); - - /** - * Specifies whether or not this feature actually contains some JavaScript lines or is just a link - * - * @return True if a script is located inside the feature - */ - boolean scriptAvailable(); - - /** - * Returns a list of all the features associated with this component - *

- * - * @return An ArrayList of features - */ - @NotNull - Set getFeatures(); - - /** - * Checks if this feature has been configured and rendered with all the features - */ - void checkAssignedFunctions(); - - /** - * Sets the associated component - * - * @param component - * @return This object - */ - J setComponent(IComponentHierarchyBase component); - - /** - * Gets the component - * - * @return A typed component - */ - IComponentHierarchyBase getComponent(); - -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/IComponentHTMLAttributeBase.java b/src/main/java/com/jwebmp/core/base/interfaces/IComponentHTMLAttributeBase.java deleted file mode 100644 index ecc76845f..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/IComponentHTMLAttributeBase.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.interfaces; - -import com.jwebmp.core.base.html.attributes.GlobalAttributes; -import com.jwebmp.core.base.html.interfaces.AttributeDefinitions; -import jakarta.validation.constraints.*; - -/** - * @param - * @param - * - * @author GedMarc - * @since Sep 26, 2016 - */ -public interface IComponentHTMLAttributeBase & AttributeDefinitions, J extends IComponentHTMLAttributeBase> -{ - /** - * Adds an attribute value to the attribute collection, and marks it with a GlobalAttribute Enumeration. - *

- * - * @param attribute - * The GlobalAttribute to set the attribute to - * @param value - * The value of the attribute - * - * @return - */ - J addAttribute(GlobalAttributes attribute, String value); - - @SuppressWarnings("unchecked") - J addAttribute(@NotNull GlobalAttributes attribute, @NotNull Object value); - - /** - * Adds an attribute value to the attribute collection, and marks it with a GlobalAttribute Enumeration. - *

- * - * @param attribute - * The GlobalAttribute to set the attribute to - * @param value - * The value of the attribute - * - * @return - */ - J addAttribute(A attribute, String value); - - /** - * Adds an attribute value to the attribute collection, and marks it with a GlobalAttribute Enumeration. - *

- * - * @param attribute - * The GlobalAttribute to set the attribute to - * @param value - * The value of the attribute - * - * @return - */ - J addAttribute(String attribute, String value); - - /** - * Adds an attribute value to the attribute collection, and marks it with a GlobalAttribute Enumeration. - *

- * - * @param attribute - * The GlobalAttribute to set the attribute to - * @param value - * The value of the attribute - * - * @return - */ - J addAttribute(A attribute, Integer value); - - /** - * Adds an attribute value to the attribute collection, and marks it with a GlobalAttribute Enumeration. - *

- * - * @param attribute - * The valid Local Attribute to add - * @param value - * The value of the attribute - * - * @return - */ - J addAttribute(A attribute, Boolean value); - - /** - * This component cloned - * @return - */ - J cloneComponent(); - - /** - * Returns an enumerated HashMap for ease of access - *

- * - * @param attribute - * The Global Attribute to apply - * @param bop - * Place Holder for return type boolean - *

- * - * @return HashMap of Attributes with GlobalAttributes Enumeration as Identifier - */ - Boolean getAttribute(GlobalAttributes attribute, Boolean bop); - - /** - * Returns an enumerated HashMap for ease of access - *

- * - * @param attribute - * The Global Attribute to apply - * @param bop - * Place Holder for return type integer - *

- * - * @return HashMap of Attributes with GlobalAttributes Enumeration as Identifier - */ - Integer getAttribute(GlobalAttributes attribute, Integer bop); - - /** - * Returns an enumerated HashMap for ease of access - *

- * - * @param attribute - * The Global Attribute to apply - *

- * - * @return HashMap of Attributes with GlobalAttributes Enumeration as Identifier - */ - String getAttribute(GlobalAttributes attribute); - - /** - * Gets this list of local attribute values - *

- * - * @param attributeValue - * The Valid Local Attribute to Return - *

- * - * @return A String of the attribute value currently set - */ - String getAttribute(A attributeValue); - - - /** - * Gets this list of decoded attribute values - *

- * - * @param attributeValue - * The Valid Local Attribute to Return - *

- * - * @return A String of the attribute value currently set - */ - String getAttribute(String attributeValue); - - /** - * Gets this list of decoded attribute values - *

- * - * @param attributeValue - * The decoded value to Return - * @param uselessInt - * A useless parameter purely to return the type integer - *

- * - * @return A HashMap if this components local attributes. Never null - */ - Integer getAttribute(String attributeValue, Integer uselessInt); - - /** - * Gets this list of decoded attribute values - *

- * - * @param attributeValue - * The decoded value to Return - * @param uselessInt - * A useless parameter purely to return the type Boolean - *

- * - * @return A HashMap if this components local attributes. Never null - */ - Boolean getAttribute(String attributeValue, Boolean uselessInt); - - /** - * Gets this list of local attribute values - *

- * - * @param attributeValue - * The Valid Local Attribute to Return - * @param uselessInt - * A useless parameter purely to return the type integer - *

- * - * @return A HashMap if this components local attributes. Never null - */ - Integer getAttribute(A attributeValue, Integer uselessInt); - - /** - * Gets this list of local attribute values - *

- * - * @param attributeValue - * The Valid Local Attribute to Return - * @param uselessInt - * A useless parameter purely to return the type Boolean - *

- * - * @return A HashMap if this components local attributes. Never null - */ - Boolean getAttribute(A attributeValue, Boolean uselessInt); - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHTMLBase asTagBase() - { - return (IComponentHTMLBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentEventBase asEventBase() - { - return (IComponentEventBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentFeatureBase asFeatureBase() - { - return (IComponentFeatureBase) this; - } - - /** - * Returns the components exposed dependency methods - * - * @return This component type-casted - */ - default IComponentDependencyBase asDependencyBase() - { - return (IComponentDependencyBase) this; - } - - /** - * Returns the base exposed methods - * - * @return This component type-casted - */ - default IComponentBase asBase() - { - return (IComponentBase) this; - } - - /** - * Shortcut to adding a style attribute - * - * @param property the style string to add - * @return This object - */ - J addStyle(String property, String value); - - /** - * Shortcut to adding a style attribute - * - * @param style the style string to add - * @return This object - */ - J addStyle(String style); -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/IComponentHTMLBase.java b/src/main/java/com/jwebmp/core/base/interfaces/IComponentHTMLBase.java deleted file mode 100644 index 2c903ee5a..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/IComponentHTMLBase.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.interfaces; - -import com.jwebmp.core.base.ComponentBase; -import com.jwebmp.core.base.servlets.enumarations.ComponentTypes; - -import jakarta.validation.constraints.NotNull; - -/** - * @param - * This Type - * - * @author GedMarc - * @since Sep 26, 2016 - */ -@SuppressWarnings({"UnusedReturnValue", "MissingClassJavaDoc"}) -public interface IComponentHTMLBase> -{ - /** - * Returns this tag - *

- * - * @return The tag this component will render - */ - String getTag(); - - /** - * Whether or not this component should render a closing tag - * - * @return if this tag has a closing tag - */ - Boolean isClosingTag(); - - /** - * If a new line for the closing tag is required. - * - * @return If a new line is required - */ - Boolean isNewLineForClosingTag(); - - /** - * If a new line for the closing tag is required. - * - * @param newLineForClosingTag - * A new line is required for this objects closing tag - * - * @return Always this object - */ - J setNewLineForClosingTag(boolean newLineForClosingTag); - - /** - * Sets if there must be a new line before the raw text starts - * - * @return If newline for raw text must be generated - */ - @SuppressWarnings("unused") - Boolean isNewLineForRawText(); - - /** - * Whether or not this component should render a closing tag - * - * @param noCloseTag - * Whether or not to render the closing tag - * - * @return Always this object - */ - J setClosingTag(boolean noCloseTag); - - /** - * Renders as an inline tiny html tag - * - * @return A string of the html tag - */ - @NotNull - String toTinyString(); - - /** - * Sets the number of tab indents for this component - * - * @param currentTabIndents - * the tab indentation count - * - * @return Always this object - */ - J setCurrentTabIndents(int currentTabIndents); - - /** - * Sets if this component must place a new line before the raw text - * - * @param newLineForRawText - * If there should be a new line for raw text - * - * @return Always this object - */ - @NotNull - J setNewLineForRawText(boolean newLineForRawText); - - /** - * Overrides this tag name - *

- * - * @param tag - * The tag to use instead of the default - * - * @return This Class - */ - J setTag(String tag); - - /** - * Overrides this tag name - *

- * - * @param tag - * The tag to use instead of the default - * - * @return This Class - */ - J setTag(ComponentTypes tag); - - /** - * Returns the HTML for the given object - *

- * - * @param outputHtml - * Dummy holder for specifying HTML output - * - * @return The class and the associated ID and children count - */ - String toString(boolean outputHtml); - - /** - * Returns this components HTML after configuration and pre-rendering - * - * @param tabCount - * The number of tabs to indent by - * - * @return The sting with the given tab counts - */ - String toString(Integer tabCount); - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentEventBase asEventBase() - { - return (IComponentEventBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentFeatureBase asFeatureBase() - { - return (IComponentFeatureBase) this; - } - - /** - * Returns the components exposed dependency methods - * - * @return This component type-casted - */ - default IComponentDependencyBase asDependencyBase() - { - return (IComponentDependencyBase) this; - } - - /** - * Returns the base exposed methods - * - * @return This component type-casted - */ - default IComponentBase asBase() - { - return (IComponentBase) this; - } -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/IComponentHTMLOptionsBase.java b/src/main/java/com/jwebmp/core/base/interfaces/IComponentHTMLOptionsBase.java deleted file mode 100644 index 16fba135d..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/IComponentHTMLOptionsBase.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.interfaces; - -/** - * @param - * - * @author GedMarc - * @since Sep 26, 2016 - */ -public interface IComponentHTMLOptionsBase> -{ - /** - * Adds an attribute value to the attribute collection, and marks it with a GlobalOption Enumeration. - *

- * - * @param attribute - * The GlobalOption to set the attribute to - * @param value - * The value of the attribute - * - * @return - */ - J addOption(String attribute, String value); - - /** - * This component cloned - * @return - */ - J cloneComponent(); - - /** - * Gets this list of decoded attribute values - *

- * - * @param attributeValue - * The Valid Local Option to Return - *

- * - * @return A String of the attribute value currently set - */ - String getOption(String attributeValue); - - /** - * Gets this list of decoded attribute values - *

- * - * @param attributeValue - * The decoded value to Return - * @param uselessInt - * A useless parameter purely to return the type integer - *

- * - * @return A HashMap if this components local attributes. Never null - */ - Integer getOption(String attributeValue, Integer uselessInt); - - /** - * Gets this list of decoded attribute values - *

- * - * @param attributeValue - * The decoded value to Return - * @param uselessInt - * A useless parameter purely to return the type Boolean - *

- * - * @return A HashMap if this components local attributes. Never null - */ - Boolean getOption(String attributeValue, Boolean uselessInt); - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHTMLBase asTagBase() - { - return (IComponentHTMLBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentEventBase asEventBase() - { - return (IComponentEventBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentFeatureBase asFeatureBase() - { - return (IComponentFeatureBase) this; - } - - /** - * Returns the components exposed dependency methods - * - * @return This component type-casted - */ - default IComponentDependencyBase asDependencyBase() - { - return (IComponentDependencyBase) this; - } - - /** - * Returns the base exposed methods - * - * @return This component type-casted - */ - default IComponentBase asBase() - { - return (IComponentBase) this; - } - -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/IComponentHierarchyBase.java b/src/main/java/com/jwebmp/core/base/interfaces/IComponentHierarchyBase.java deleted file mode 100644 index cfb6e48b8..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/IComponentHierarchyBase.java +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.interfaces; - -import com.jwebmp.core.*; -import com.jwebmp.core.base.ComponentHierarchyBase; -import com.jwebmp.core.base.html.interfaces.GlobalChildren; -import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; -import com.jwebmp.core.base.references.CSSReference; -import com.jwebmp.core.base.references.JavascriptReference; -import com.jwebmp.core.htmlbuilder.css.themes.Theme; -import com.jwebmp.core.htmlbuilder.javascript.events.interfaces.IEvent; -import jakarta.validation.constraints.NotNull; - -import java.util.Map; -import java.util.Set; - -/** - * @param All allowed children - * @param This Class - * @author GedMarc - * @since Sep 26, 2016 - */ -@SuppressWarnings("MissingClassJavaDoc") -public interface IComponentHierarchyBase> - extends GlobalChildren -{ - /** - * Takes an instance and wraps around the component - *

- * e.g. BSRow.wrap(div) = iv class="row"myComponent//div - * - * @param component - * @return - */ - @NotNull > T wrap(@NotNull T component); - - /** - * Takes all children and embeds them into the current children hierarchy - * None of the details for the transient container is kept - *

- * e.g. myComponent.embed(div) - * - * @param component - * @return - */ - @NotNull > T embed(@NotNull T component); - - /** - * Add a new child to this component - *

- * - * @param newChild The child to be added - *

- * @return The new child added - */ - J add(C newChild); - - /** - * Adds into a specific pesition - * - * @param position - * @param newChild - * @return Always this - */ - J add(@NotNull Integer position, C newChild); - - /** - * Returns null sets the text - * - * @param text - * @return - */ - J add(String text); - - /** - * Adds the given CSS Class Name with the given references - *

- * - * @param classComponent - * @return - */ - J addClass(CSSComponent classComponent); - - /** - * Returns All the angular objects mapped to this component and its children - * - * @return - */ - Map getAngularObjectsAll(); - - /** - * Returns the children ArrayList of type Component - *

- * - * @return An array list of components - */ - Set getChildren(); - - /** - * Get an array list of all children and their children recursively Includes this object - *

- * - * @return A complete array list of all children at time of call - */ - Set> getChildrenHierarchy(); - - /** - * Get an array list of all children and their children recursively Excludes this object - *

- * - * @param includeSelf Whether or not to include this component - *

- * @return A complete array list of all children at time of call - */ - Set> getChildrenHierarchy(boolean includeSelf); - - /** - * Adds the children of this component onto the array list coming in - *

- * - * @param componentsToAddTo The component Array List to add to - *

- * @return original components added with - */ - Set> getChildrenHierarchy(Set> componentsToAddTo); - - /** - * Adds in the JavaScript References for all the children - * - * @return - */ - Set getCssReferencesAll(); - - /** - * Returns a complete list of events - * - * @return - */ - Set> getEventsAll(); - - /** - * Adds in the JavaScript References for all the children - * - * @return - */ - Set getJavascriptReferencesAll(); - - /** - * Get the page this component exists on - *

- * - * @return A Page - */ - Page getPage(); - - /** - * Gets the parent of this hierarchy item - * - * @return - */ - IComponentHierarchyBase getParent(); - - /** - * Returns all the feature queries associated to this component and all its children - * - * @return - */ - Set getQueriesAll(); - - /** - * * - * Returns all the variables for all the components - * - * @return - */ - Set getVariablesAll(); - - /** - * Creates loading part objects that return an injected instance of the class associated to that part - * - * @return - */ - ComponentHierarchyBase getLoadingPart(IEvent... events); - - /** - * Returns if this object has children or not - *

- * - * @return true if there are children attached - */ - boolean hasChildren(); - - /** - * Takes a component off this components child list - *

- * - * @param childToRemove The child object to remove from this list - *

- * @return True if the child was part of this components children's list - */ - boolean remove(C childToRemove); - - /** - * * - * Returns all the JavaScript for all the components - * - * @return - */ - StringBuilder renderJavascriptAll(); - - /** - * Sets the page this component belongs on. - *

- * - * @param page A Page - * @return This Class - */ - J setPage(Page page); - - /** - * Sets the parent of this item - * - * @param parent - * @return This Class - */ - J setParent(IComponentHierarchyBase parent); - - /** - * Overrides this and all below components to set tiny false - * - * @param tiny - * @return - */ - J setTiny(boolean tiny); - - /** - * Adds a class name to the class list - *

- * - * @param className The class name to add - *

- * @return True if it was added, false if it already existed - */ - J addClass(String className); - - /** - * Removes a class name from this component - *

- * - * @param className Class Name to Remove - *

- * @return True if the class was removed, False if the class was not part of the collection - */ - J removeClass(String className); - - /** - * Removes the classes from the component - * - * @param className class name - * @param classNames more class names - * @return This object - */ - J removeClass(String className, String... classNames); - - /** - * Removes the classes from the component - * - * @param className class name - * @param classNames more class names - * @return This object - */ - J removeClass(@NotNull Enum className, Enum... classNames); - - /** - * Enumeration to remove - * - * @param className - * @return - */ - boolean removeClass(@NotNull Enum className); - - /** - * Sets the ID and adds the attribute to the global set - * - * @param id - * @return - */ - J setID(String id); - - /** - * Adds a class name with the given css class name compatible - * - * @param className - * @return - */ - J addClass(ICssClassName className); - - /** - * Adds a class name with the given css class name compatible - * - * @param className - * @return - */ - J addClass(ICssClassName className, ICssClassName... classNames); - - /** - * Returns a complete list of all class names associated with this component - *

- * - * @return - */ - Set getClasses(); - - /** - * Sets the classes set - * - * @param classes a new set of classes - */ - J setClasses(Set classes); - - /** - * Set the theme applied to this component - *

- * - * @param theme The JQuery UI theme to apply to the component - * @return This Class - */ - J addTheme(Theme theme); - - /** - * Returns the first parent in the chain of the class type - * - * @param The class type - * @param parentType The type to look for - * @return - */ - > T findParent(Class parentType); - - /** - * Method findChild ... - * - * @param childType of type Class T - * @return T - */ - > T findChild(@NotNull Class childType); -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/IComponentStyleBase.java b/src/main/java/com/jwebmp/core/base/interfaces/IComponentStyleBase.java deleted file mode 100644 index 1df3c680b..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/IComponentStyleBase.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.interfaces; - -import com.jwebmp.core.base.ComponentBase; -import com.jwebmp.core.htmlbuilder.css.CSSImpl; -import com.jwebmp.core.htmlbuilder.css.enumarations.CSSTypes; - -import jakarta.validation.constraints.NotNull; -import java.util.Map; - -@SuppressWarnings("unused") -/** - * A slim view of a component featuring the styling methods - * - * @param - * Returns this class - * - * @author GedMarc - * @since Sep 26, 2016 - */ -public interface IComponentStyleBase> -{ - - /** - * Adds a CSS object to the component with the given type - * - * @param type - * The CSS Type - * @param cssItem - * Thee CSS Item to add - * - * @return Always this object - */ - J addCSSEntry(CSSTypes type, CSSImpl cssItem); - - /** - * Removes a CSS item for the component - * - * @param cssType - * The CSS Type Entry to remove - * - * @return Always this object - */ - J removeCSSEntry(CSSTypes cssType); - - /** - * Gets the CSS Object used for styling - * - * @return The CSS Implementation Object for default (CSSTypes.None) - */ - CSSImpl getCss(); - - /** - * Sets the CSS Object used for styling - * - * @param css - * The CSS Implementation object to add - * - * @return Always this object - */ - J setCss(CSSImpl css); - - /** - * Returns the currently assigned CSS Name - * - * @return The currently assigned css Name for this objects style - */ - String getCssName(); - - /** - * Sets the currently assigned CSS Name - * - * @param cssName - * Sets the CSS Name to a valid value - * - * @return Always this object - */ - J setCssName(String cssName); - - /** - * Returns the current HashMap of all CSS Entries for the component - * - * @return The CSS Types and Implementations for each type for this object - */ - Map getCssTypeHashMap(); - - /** - * Renders the component CSS at the specified tab count with the <style> tag - *

- * - * @param tabCount - * Tab indentation for the SQL - * - * @return The Component CSS - */ - StringBuilder renderCss(int tabCount); - - /** - * Renders the component CSS at the specified tab count with the <style> tag This includes everything from this classes CSS, to - * the CSS for each field. It will also populate the lower level - * child CSS for fields in this class - *

- * - * @param tabCount - * Tab indentation for the SQL - * @param renderOpening - * Whether or not to render the opening XML tag for a CSS style - * @param renderInQuotations - * Sets whether to render the CSS Fields in Quotations - * @param isAjaxCall - * Sets whether the CSS is being called from an AJAX call - *

- * - * @return The Component CSS - */ - @NotNull - StringBuilder renderCss(int tabCount, boolean renderOpening, boolean renderInQuotations, boolean isAjaxCall); - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHierarchyBase asHierarchyBase() - { - return (IComponentHierarchyBase) this; - } - - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHTMLAttributeBase asAttributeBase() - { - return (IComponentHTMLAttributeBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHTMLBase asTagBase() - { - return (IComponentHTMLBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentEventBase asEventBase() - { - return (IComponentEventBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentFeatureBase asFeatureBase() - { - return (IComponentFeatureBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentThemeBase asThemeBase() - { - return (IComponentThemeBase) this; - } - - /** - * Returns the components exposed dependency methods - * - * @return This component type-casted - */ - default IComponentDependencyBase asDependencyBase() - { - return (IComponentDependencyBase) this; - } - - /** - * Returns the base exposed methods - * - * @return This component type-casted - */ - default IComponentBase asBase() - { - return (IComponentBase) this; - } - -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/IComponentThemeBase.java b/src/main/java/com/jwebmp/core/base/interfaces/IComponentThemeBase.java deleted file mode 100644 index a2cb62e38..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/IComponentThemeBase.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.interfaces; - -import com.jwebmp.core.base.references.CSSReference; -import com.jwebmp.core.base.references.JavascriptReference; -import com.jwebmp.core.htmlbuilder.css.themes.Theme; - -import java.util.Set; - -/** - * @author GedMarc - * @since Sep 26, 2016 - */ -public interface IComponentThemeBase> -{ - - /** - * Adds in the JavaScript References for the Features - * - * @return - */ - Set getCssReferencesAll(); - - /** - * Adds in the JavaScript References for the Features - * - * @return - */ - Set getJavascriptReferencesAll(); - - /** - * Returns the parents theme or the applied theme - *

- * - * @return The theme - */ - Set getThemes(); - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHTMLAttributeBase asAttributeBase() - { - return (IComponentHTMLAttributeBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHTMLBase asTagBase() - { - return (IComponentHTMLBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentEventBase asEventBase() - { - return (IComponentEventBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentFeatureBase asFeatureBase() - { - return (IComponentFeatureBase) this; - } - - /** - * Returns the components exposed dependency methods - * - * @return This component type-casted - */ - default IComponentDependencyBase asDependencyBase() - { - return (IComponentDependencyBase) this; - } - - /** - * Returns the base exposed methods - * - * @return This component type-casted - */ - default IComponentBase asBase() - { - return (IComponentBase) this; - } - - -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/IContentSecurityPolicy.java b/src/main/java/com/jwebmp/core/base/interfaces/IContentSecurityPolicy.java deleted file mode 100644 index c005f9f71..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/IContentSecurityPolicy.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.jwebmp.core.base.interfaces; - -import java.util.Set; - -public interface IContentSecurityPolicy> { - - J registerSelf(); - - Set getDefaultSrc(); - - Set getScriptSrc(); - - Set getStyleSrc(); - - Set getImgSrc(); - - Set getConnectSrc(); - - Set getFontSrc(); - - Set getObjectSrc(); - - Set getMediaSrc(); - - Set getFrameSrc(); - - Set getSandbox(); - - Set getReportUi(); - - Set getChildSrc(); - - Set getFormAction(); - - Set getFrameAncestors(); -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/ICssClassName.java b/src/main/java/com/jwebmp/core/base/interfaces/ICssClassName.java deleted file mode 100644 index f38e8aec1..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/ICssClassName.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.interfaces; - -/** - * Defines anything as a class name - the toString() will be used - * - * @author GedMarc - * @since 13 Feb 2017 - */ -public interface ICssClassName -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/ICssStructure.java b/src/main/java/com/jwebmp/core/base/interfaces/ICssStructure.java deleted file mode 100644 index f47e43d90..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/ICssStructure.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.interfaces; - -/** - * A set of CSS attributes that the Component class exposes. - * - * @param - * My type - * - * @author GedMarc - * @since Sep 26, 2016 - */ -@FunctionalInterface -public interface ICssStructure -{ - - /** - * Adds a paragraph component with the attached text - *

- * - * @param textToAdd - * The text to add - *

- * - * @return The new paragraph component - */ - J add(String textToAdd); - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentStyleBase asStyleBase() - { - return (IComponentStyleBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHierarchyBase asHierarchyBase() - { - return (IComponentHierarchyBase) this; - } - - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHTMLAttributeBase asAttributeBase() - { - return (IComponentHTMLAttributeBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentHTMLBase asTagBase() - { - return (IComponentHTMLBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentEventBase asEventBase() - { - return (IComponentEventBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentFeatureBase asFeatureBase() - { - return (IComponentFeatureBase) this; - } - - /** - * This class with the associated exposed methods - * - * @return This component type-casted - */ - default IComponentThemeBase asThemeBase() - { - return (IComponentThemeBase) this; - } - - /** - * Returns the components exposed dependency methods - * - * @return This component type-casted - */ - default IComponentDependencyBase asDependencyBase() - { - return (IComponentDependencyBase) this; - } - - /** - * Returns the base exposed methods - * - * @return This component type-casted - */ - default IComponentBase asBase() - { - return (IComponentBase) this; - } -} diff --git a/src/main/java/com/jwebmp/core/base/interfaces/IIcon.java b/src/main/java/com/jwebmp/core/base/interfaces/IIcon.java deleted file mode 100644 index 2ab5d135b..000000000 --- a/src/main/java/com/jwebmp/core/base/interfaces/IIcon.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.jwebmp.core.base.interfaces; - -import com.jwebmp.core.base.ComponentBase; -import com.jwebmp.core.base.ComponentHierarchyBase; -import com.jwebmp.core.base.html.interfaces.children.*; -import com.jwebmp.core.base.html.interfaces.children.generics.ParagraphChildren; - -/** - * Interface that denotes the type of Icon - */ -public interface IIcon,J extends ComponentBase & IIcon> - extends FormChildren, BodyChildren, ParagraphChildren, PhraseChildren, ListItemChildren, ListChildren -{ - /** - * If the string class or a component should be used. - * Determined is string class is null - * - * @return - */ - default boolean isCssClass() - { - return getClassName() == null; - } - - /** - * A class name to be applied - * - * @return - */ - String getClassName(); - - /** - * A component to render that is the actual icon - * - * @return - */ - IComponentHierarchyBase getIconComponent(); -} diff --git a/src/main/java/com/jwebmp/core/base/page/CSSLinksInsertPageConfigurator.java b/src/main/java/com/jwebmp/core/base/page/CSSLinksInsertPageConfigurator.java index 5c2f6d9a9..664be54cc 100644 --- a/src/main/java/com/jwebmp/core/base/page/CSSLinksInsertPageConfigurator.java +++ b/src/main/java/com/jwebmp/core/base/page/CSSLinksInsertPageConfigurator.java @@ -1,17 +1,17 @@ package com.jwebmp.core.base.page; +import com.guicedee.client.*; import com.jwebmp.core.Page; import com.jwebmp.core.base.ComponentHierarchyBase; import com.jwebmp.core.base.html.Paragraph; import com.jwebmp.core.base.servlets.enumarations.RequirementsPriority; -import com.jwebmp.core.services.RenderAfterLinks; -import com.jwebmp.core.services.RenderBeforeLinks; -import com.guicedee.guicedinjection.GuiceContext; +import com.jwebmp.core.services.*; + import jakarta.validation.constraints.NotNull; import java.util.Set; -import static com.jwebmp.core.services.JWebMPServicesBindings.*; +import static com.jwebmp.core.implementations.JWebMPServicesBindings.*; /** * Inserts the CSS Links into the page @@ -30,8 +30,9 @@ public CSSLinksInsertPageConfigurator() @NotNull @Override - public Page configure(Page page) + public Page configure(IPage pager) { + Page page = (Page)pager; if (!page.isConfigured() && enabled()) { renderBeforeLinks(page); @@ -54,7 +55,7 @@ public Page configure(Page page) private void renderBeforeLinks(Page page) { - Set renderB = GuiceContext.get(RenderBeforeLinksKey); + Set renderB = IGuiceContext.get(RenderBeforeLinksKey); Paragraph before = new Paragraph<>().setTextOnly(true); for (RenderBeforeLinks render : renderB) { @@ -74,7 +75,7 @@ private void renderBeforeLinks(Page page) private void renderAfterLinks(Page page) { - Set renderA = GuiceContext.get(RenderAfterLinksKey); + Set renderA = IGuiceContext.get(RenderAfterLinksKey); Paragraph after = new Paragraph<>().setTextOnly(true); for (RenderAfterLinks render : renderA) { diff --git a/src/main/java/com/jwebmp/core/base/page/ScriptsDynamicPageConfigurator.java b/src/main/java/com/jwebmp/core/base/page/ScriptsDynamicPageConfigurator.java index 80ab5327a..b6b9e6b01 100644 --- a/src/main/java/com/jwebmp/core/base/page/ScriptsDynamicPageConfigurator.java +++ b/src/main/java/com/jwebmp/core/base/page/ScriptsDynamicPageConfigurator.java @@ -1,7 +1,9 @@ package com.jwebmp.core.base.page; +import com.guicedee.client.*; import com.jwebmp.core.Page; import com.jwebmp.core.SessionHelper; +import com.jwebmp.core.base.interfaces.*; import com.jwebmp.core.implementations.JWebMPSiteBinder; import com.jwebmp.core.base.ComponentHierarchyBase; import com.jwebmp.core.base.html.CSSLink; @@ -10,18 +12,15 @@ import com.jwebmp.core.base.html.Style; import com.jwebmp.core.base.html.attributes.ScriptAttributes; import com.jwebmp.core.htmlbuilder.css.composer.CSSComposer; -import com.jwebmp.core.services.IDynamicRenderingServlet; -import com.jwebmp.core.services.IPageConfigurator; -import com.jwebmp.core.services.RenderAfterDynamicScripts; -import com.jwebmp.core.services.RenderBeforeDynamicScripts; +import com.jwebmp.core.services.*; import com.guicedee.services.jsonrepresentation.json.StaticStrings; -import com.guicedee.guicedinjection.GuiceContext; + import jakarta.validation.constraints.NotNull; import java.util.ServiceLoader; import java.util.Set; -import static com.jwebmp.core.services.JWebMPServicesBindings.*; +import static com.jwebmp.core.implementations.JWebMPServicesBindings.*; /** * Configures the dynamic script insertions that run last into the page @@ -74,7 +73,7 @@ public static void setEnabled(boolean mustEnable) /** * Configures the given page for the parameters * - * @param page + * @param pager * The page incoming * * @return The original page incoming or a new page, never null @@ -82,17 +81,18 @@ public static void setEnabled(boolean mustEnable) @NotNull @Override @SuppressWarnings("unchecked") - public Page configure(Page page) + public Page configure(IPage pager) { + Page page = (Page)pager; if (!page.isConfigured() && enabled()) { //Render Before Dynamic Scripts Paragraph beforeText = new Paragraph().setTextOnly(true); StringBuilder sbBeforeText = new StringBuilder(); - Set beforeLoader = GuiceContext.get(RenderBeforeDynamicScriptsKey); + Set beforeLoader = IGuiceContext.get(RenderBeforeDynamicScriptsKey); for (RenderBeforeDynamicScripts renderAfterDynamicScripts : beforeLoader) { - sbBeforeText.append(GuiceContext.get(renderAfterDynamicScripts.getClass()) + sbBeforeText.append(IGuiceContext.get(renderAfterDynamicScripts.getClass()) .render(page) .append(page.getNewLine())); } @@ -115,7 +115,7 @@ public Page configure(Page page) .replaceAll(StaticStrings.STRING_FORWARD_SLASH, StaticStrings.STRING_EMPTY))); } - Set dynamicRenderingServlets = GuiceContext.instance() + Set dynamicRenderingServlets = IGuiceContext.instance() .getLoader(IDynamicRenderingServlet.class, ServiceLoader.load(IDynamicRenderingServlet.class)); for (IDynamicRenderingServlet dynamicRenderingServlet : dynamicRenderingServlets) { @@ -144,13 +144,13 @@ public Page configure(Page page) addable = page.getBody(); } - Set dynamicRenderingServlets = GuiceContext.instance() + Set dynamicRenderingServlets = IGuiceContext.instance() .getLoader(IDynamicRenderingServlet.class, ServiceLoader.load(IDynamicRenderingServlet.class)); for (IDynamicRenderingServlet dynamicRenderingServlet : dynamicRenderingServlets) { if (dynamicRenderingServlet.enabled()) { - Script script = dynamicRenderingServlet.renderScript(page); + IComponentHierarchyBase script = dynamicRenderingServlet.renderScript(page); if (script != null) { addable.add(script); @@ -161,12 +161,13 @@ public Page configure(Page page) //Render After Dynamic Scripts Paragraph afterText = new Paragraph().setTextOnly(true); StringBuilder sbAfterText = new StringBuilder(); - Set afterLoader = GuiceContext.get(RenderAfterDynamicScriptsKey); + Set afterLoader = IGuiceContext.get(RenderAfterDynamicScriptsKey); for (RenderAfterDynamicScripts renderAfterDynamicScripts : afterLoader) { - sbAfterText.append(GuiceContext.get(renderAfterDynamicScripts.getClass()) - .render(page) - .append(page.getNewLine())); + sbAfterText.append(IGuiceContext + .get(renderAfterDynamicScripts.getClass()) + .render(page) + .append(page.getNewLine())); } if (!sbAfterText.toString() .isEmpty()) diff --git a/src/main/java/com/jwebmp/core/base/page/ScriptsInsertPageConfigurator.java b/src/main/java/com/jwebmp/core/base/page/ScriptsInsertPageConfigurator.java index 2676c93d4..b9d883594 100644 --- a/src/main/java/com/jwebmp/core/base/page/ScriptsInsertPageConfigurator.java +++ b/src/main/java/com/jwebmp/core/base/page/ScriptsInsertPageConfigurator.java @@ -17,14 +17,14 @@ package com.jwebmp.core.base.page; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Page; import com.jwebmp.core.base.html.Paragraph; import com.jwebmp.core.base.html.interfaces.GlobalChildren; import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; import com.jwebmp.core.base.servlets.enumarations.RequirementsPriority; -import com.jwebmp.core.services.RenderAfterScripts; -import com.jwebmp.core.services.RenderBeforeScripts; +import com.jwebmp.core.services.*; import jakarta.validation.constraints.NotNull; import java.util.ArrayList; @@ -32,8 +32,8 @@ import java.util.List; import java.util.Set; -import static com.jwebmp.core.services.JWebMPServicesBindings.RenderAfterScriptsKey; -import static com.jwebmp.core.services.JWebMPServicesBindings.RenderBeforeScriptsKey; +import static com.jwebmp.core.implementations.JWebMPServicesBindings.RenderAfterScriptsKey; +import static com.jwebmp.core.implementations.JWebMPServicesBindings.RenderBeforeScriptsKey; public class ScriptsInsertPageConfigurator extends RequirementsPriorityAbstractInsertPageConfigurator @@ -45,8 +45,9 @@ public ScriptsInsertPageConfigurator() @NotNull @Override - public Page configure(Page page) + public Page configure(IPage pager) { + Page page = (Page)pager; if (!page.isConfigured() && enabled()) { IComponentHierarchyBase addable; @@ -81,7 +82,7 @@ private void getScripts(Page page, IComponentHierarchyBase private void renderBeforeScripts(IComponentHierarchyBase scriptAddTo) { - Set renderB = GuiceContext.get(RenderBeforeScriptsKey); + Set renderB = IGuiceContext.get(RenderBeforeScriptsKey); Paragraph before = new Paragraph<>().setTextOnly(true); renderB.forEach(render -> before.setText(before.getText(0) .toString() + render.render(scriptAddTo.getPage()) @@ -121,7 +122,7 @@ private void addScriptsTo(Page page, IComponentHierarchyBase scriptAddTo) { - Set renderA = GuiceContext.get(RenderAfterScriptsKey); + Set renderA = IGuiceContext.get(RenderAfterScriptsKey); Paragraph after = new Paragraph<>().setTextOnly(true); for (RenderAfterScripts render : renderA) { diff --git a/src/main/java/com/jwebmp/core/base/page/TopShelfScriptsInsertPageConfigurator.java b/src/main/java/com/jwebmp/core/base/page/TopShelfScriptsInsertPageConfigurator.java index ef67a8355..4047e4707 100644 --- a/src/main/java/com/jwebmp/core/base/page/TopShelfScriptsInsertPageConfigurator.java +++ b/src/main/java/com/jwebmp/core/base/page/TopShelfScriptsInsertPageConfigurator.java @@ -24,6 +24,7 @@ import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; import com.jwebmp.core.base.servlets.enumarations.RequirementsPriority; +import com.jwebmp.core.services.*; import jakarta.validation.constraints.NotNull; import java.util.ArrayList; import java.util.Collection; @@ -45,8 +46,9 @@ public Integer sortOrder() @NotNull @Override - public Page configure(Page page) + public IPage configure(IPage pageIn) { + Page page = (Page)pageIn; if (!page.isConfigured() && enabled()) { List> reqs = getPriorityRequirements(page, RequirementsPriority.Top_Shelf, new ArrayList<>(), true, true); diff --git a/src/main/java/com/jwebmp/core/base/references/CSSReference.java b/src/main/java/com/jwebmp/core/base/references/CSSReference.java deleted file mode 100644 index b42e0eea4..000000000 --- a/src/main/java/com/jwebmp/core/base/references/CSSReference.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.references; - -import com.jwebmp.core.generics.WebReference; - -/** - * This class is a CSS Reference - * - * @author MMagon - * @version 1.0 - * @since 2014/12/09 - */ -public class CSSReference - extends WebReference -{ - /** - * Construct a new CSS File Reference - *

- * - * @param name - * The name of the reference - * @param version - * The version of the reference - * @param localReference - * The local reference - * @param remoteReference - * The remote reference - * @param sortOrder - * The sort order for the reference - */ - public CSSReference(String name, Double version, String localReference, String remoteReference, int sortOrder) - { - super(name, version, localReference, remoteReference, sortOrder); - } - - /** - * Construct a new CSS File Reference - *

- * - * @param name - * The name of the reference - * @param version - * The version of the reference - * @param localReference - * The local reference - * @param remoteReference - * The remote reference - */ - public CSSReference(String name, Double version, String localReference, String remoteReference) - { - super(name, version, localReference, remoteReference); - } - - /** - * Construct a new CSS File Reference - *

- * - * @param name - * The name of the reference - * @param version - * The version of the reference - * @param localReference - * The local reference - */ - public CSSReference(String name, Double version, String localReference) - { - super(name, version, localReference, localReference); - } - - /** - * Construct a new CSS File Reference - *

- * - * @param name - * The name of the reference - * @param version - * The version of the reference - * @param localReference - * The local reference - * @param sortOrder - * The sort order for the reference - */ - public CSSReference(String name, Double version, String localReference, int sortOrder) - { - super(name, version, localReference, localReference, sortOrder); - } -} diff --git a/src/main/java/com/jwebmp/core/base/references/JavascriptReference.java b/src/main/java/com/jwebmp/core/base/references/JavascriptReference.java deleted file mode 100644 index 4599a3e73..000000000 --- a/src/main/java/com/jwebmp/core/base/references/JavascriptReference.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.references; - -import com.jwebmp.core.base.servlets.enumarations.RequirementsPriority; -import com.jwebmp.core.generics.WebReference; - -import jakarta.validation.constraints.NotNull; - -/** - * This class is a Java Reference - * - * @author MMagon - * @version 1.0 - * @since 2014/12/09 - */ -@SuppressWarnings("unused") -public class JavascriptReference - extends WebReference -{ - private boolean defer; - private boolean async; - private String scriptType = "text/javascript"; - - /** - * @param name - * The name of the reference - * @param version - * The version of the reference - * @param localReference - * The local reference - * @param remoteReference - * The remote reference - */ - public JavascriptReference(String name, Double version, String localReference, String remoteReference) - { - super(name, version, localReference, remoteReference); - } - - /** - * @param name - * The name of the reference - * @param version - * The version of the reference - * @param localReference - * The local reference - */ - public JavascriptReference(String name, Double version, String localReference) - { - super(name, version, localReference, localReference); - } - - /** - * @param name - * The name of the reference - * @param version - * The version of the reference - * @param localReference - * The local reference - * @param priority - * The priority to apply - */ - @SuppressWarnings("") - public JavascriptReference(String name, Double version, String localReference, RequirementsPriority priority) - { - super(name, version, localReference, localReference); - setPriority(priority); - } - - /** - * @param name - * The name of the reference - * @param version - * The version of the reference - * @param localReference - * The local reference - * @param sortOrder - * Default Sort Order - *

- * 0 - Root (JQuery) 5 - Core 10 - Core Accompanied 15 - Stand Alone Components 20 - Complex Components 500k - Default 600k - Atmosphere Reserved - */ - public JavascriptReference(String name, Double version, String localReference, Integer sortOrder) - { - super(name, version, localReference, localReference); - setSortOrder(sortOrder); - } - - /** - * @param name - * The name of the reference - * @param version - * The version of the reference - * @param localReference - * The local reference - * @param remoteReference - * The remote reference - * @param sortOrder - * Default Sort Order - *

- * 0 - Root (JQuery) 5 - Core 10 - Core Accompanied 15 - Stand Alone Components 20 - Complex Components 500k - Default 600k - Atmosphere Reserved - */ - public JavascriptReference(String name, Double version, String localReference, String remoteReference, Integer sortOrder) - { - super(name, version, localReference, remoteReference); - setSortOrder(sortOrder); - } - - /** - *

- * 0 - Root (JQuery) 5 - Core 10 - Core Accompanied 15 - Stand Alone Components 20 - Complex Components 500k - Default 600k - Atmosphere Reserved - * - * @param name - * The name of the reference - * @param version - * The version of the reference - * @param localReference - * The local reference - * @param remoteReference - * The remote reference - * @param sortOrder - * Default Sort Order - * @param priority - * The priority to apply - */ - @SuppressWarnings("") - public JavascriptReference(String name, Double version, String localReference, String remoteReference, Integer sortOrder, RequirementsPriority priority) - { - super(name, version, localReference, remoteReference); - setSortOrder(sortOrder); - setPriority(priority); - } - - /** - * If this reference should render with defer - * - * @return If defer is enabled - */ - public boolean isDefer() - { - return defer; - } - - /** - * If this reference should render with defer - * - * @param defer - * If defer is enabled - */ - @SuppressWarnings("unchecked") - @NotNull - public JavascriptReference setDefer(boolean defer) - { - this.defer = defer; - if (defer) - { - getAdditionalOptions().add("defer"); - } - else - { - getAdditionalOptions().remove("defer"); - } - return this; - } - - /** - * If this reference should render with asyc - * - * @return If async is enabled - */ - public boolean isAsync() - { - return async; - } - - /** - * Sets if this reference should render async - * - * @param async - * If async is enabled - * - * @return This - */ - @SuppressWarnings("unchecked") - @NotNull - public JavascriptReference setAsync(boolean async) - { - this.async = async; - if (async) - { - getAdditionalOptions().add("async"); - } - else - { - getAdditionalOptions().remove("async"); - } - return this; - } - - /** - * Returns the script type for this reference - * @return - */ - public String getScriptType() - { - return scriptType; - } - - /** - * Sets the script type for this reference - * @param scriptType - * @return - */ - public JavascriptReference setScriptType(String scriptType) - { - this.scriptType = scriptType; - return this; - } -} diff --git a/src/main/java/com/jwebmp/core/base/servlets/AjaxReceiverServlet.java b/src/main/java/com/jwebmp/core/base/servlets/AjaxReceiverServlet.java index 1b2175296..60f00affc 100644 --- a/src/main/java/com/jwebmp/core/base/servlets/AjaxReceiverServlet.java +++ b/src/main/java/com/jwebmp/core/base/servlets/AjaxReceiverServlet.java @@ -30,7 +30,7 @@ import java.util.logging.Level; -import static com.guicedee.guicedinjection.GuiceContext.get; +import static com.guicedee.client.IGuiceContext.get; import static com.guicedee.services.jsonrepresentation.json.StaticStrings.CHAR_DOT; import static com.guicedee.services.jsonrepresentation.json.StaticStrings.CHAR_UNDERSCORE; import static com.jwebmp.interception.JWebMPInterceptionBinder.AjaxCallInterceptorKey; diff --git a/src/main/java/com/jwebmp/core/base/servlets/CSSServlet.java b/src/main/java/com/jwebmp/core/base/servlets/CSSServlet.java index 683d969ae..d2c3400e5 100644 --- a/src/main/java/com/jwebmp/core/base/servlets/CSSServlet.java +++ b/src/main/java/com/jwebmp/core/base/servlets/CSSServlet.java @@ -17,9 +17,10 @@ package com.jwebmp.core.base.servlets; import com.google.inject.Singleton; +import com.guicedee.client.*; import com.jwebmp.core.Page; import com.guicedee.services.jsonrepresentation.json.StaticStrings; -import com.guicedee.guicedinjection.GuiceContext; + import com.guicedee.guicedservlets.GuicedServletKeys; import com.jwebmp.core.services.IPage; @@ -37,7 +38,7 @@ public void perform() { @SuppressWarnings("MismatchedQueryAndUpdateOfStringBuilder") StringBuilder scripts = new StringBuilder(); - Page page = (Page) GuiceContext.get(IPage.class); + Page page = (Page) IGuiceContext.get(IPage.class); StringBuilder css = page.getBody() .renderCss(0); scripts.append(css); diff --git a/src/main/java/com/jwebmp/core/base/servlets/DataServlet.java b/src/main/java/com/jwebmp/core/base/servlets/DataServlet.java index fab7fae7f..ab04a7335 100644 --- a/src/main/java/com/jwebmp/core/base/servlets/DataServlet.java +++ b/src/main/java/com/jwebmp/core/base/servlets/DataServlet.java @@ -27,7 +27,7 @@ import jakarta.servlet.http.HttpServletRequest; import lombok.extern.java.Log; -import static com.guicedee.guicedinjection.GuiceContext.get; +import static com.guicedee.client.IGuiceContext.get; import static com.jwebmp.interception.JWebMPInterceptionBinder.DataCallInterceptorKey; /** diff --git a/src/main/java/com/jwebmp/core/base/servlets/JWDefaultServlet.java b/src/main/java/com/jwebmp/core/base/servlets/JWDefaultServlet.java index 6e5a5dbe5..c4e322ad8 100644 --- a/src/main/java/com/jwebmp/core/base/servlets/JWDefaultServlet.java +++ b/src/main/java/com/jwebmp/core/base/servlets/JWDefaultServlet.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.base.servlets; -import com.guicedee.guicedinjection.GuiceContext; +import com.guicedee.client.*; + import com.guicedee.guicedservlets.GuicedServletKeys; import com.guicedee.services.jsonrepresentation.json.StaticStrings; import com.jwebmp.core.Page; @@ -44,7 +45,7 @@ import java.util.Set; import java.util.logging.Level; -import static com.guicedee.guicedinjection.GuiceContext.get; +import static com.guicedee.client.IGuiceContext.get; import static com.jwebmp.interception.JWebMPInterceptionBinder.SiteCallInterceptorKey; /** @@ -158,7 +159,7 @@ public boolean validateRequest(AjaxCall ajaxCall) throws InvalidRequestExcept .getId()); throw new InvalidRequestException("Invalid Date Time Value"); } - EventTypes eventType = ajaxCall.getEventType(); + EventTypes eventType = (EventTypes) ajaxCall.getEventType(); if (eventType == null) { JWDefaultServlet.log.log(Level.SEVERE, "[SessionID]-[{0}];[Security]-[Event Type Incorrect]", request.getSession() @@ -167,7 +168,7 @@ public boolean validateRequest(AjaxCall ajaxCall) throws InvalidRequestExcept } for (SiteCallIntercepter siteCallIntercepter : get(SiteCallInterceptorKey)) { - siteCallIntercepter.intercept(ajaxCall, GuiceContext.get(AjaxResponse.class)); + siteCallIntercepter.intercept(ajaxCall, IGuiceContext.get(AjaxResponse.class)); } return true; @@ -221,7 +222,7 @@ protected Page getPageFromGuice() protected Page getErrorPageHtml(Throwable t) { JWDefaultServlet.log.log(Level.SEVERE, "Exception incoming", t); - Set errorPages = GuiceContext.instance() + Set errorPages = IGuiceContext.instance() .getLoader(IErrorPage.class, ServiceLoader.load(IErrorPage.class)); if (!errorPages.iterator() .hasNext()) @@ -246,7 +247,7 @@ protected Page getErrorPageHtml(Throwable t) IErrorPage p = get(errorPages.iterator() .next() .getClass()); - return p.renderPage(t); + return (Page) p.renderPage(t); } } diff --git a/src/main/java/com/jwebmp/core/base/servlets/JWScriptServlet.java b/src/main/java/com/jwebmp/core/base/servlets/JWScriptServlet.java index a54a5221e..55bb8fd90 100644 --- a/src/main/java/com/jwebmp/core/base/servlets/JWScriptServlet.java +++ b/src/main/java/com/jwebmp/core/base/servlets/JWScriptServlet.java @@ -17,13 +17,13 @@ package com.jwebmp.core.base.servlets; import com.google.inject.*; -import com.guicedee.guicedinjection.*; +import com.guicedee.client.*; import com.guicedee.services.jsonrepresentation.json.*; import com.guicedee.guicedservlets.*; import com.jwebmp.core.*; import jakarta.servlet.http.*; -import static com.guicedee.guicedinjection.GuiceContext.*; +import static com.guicedee.client.IGuiceContext.*; /** * @author GedMarc @@ -43,7 +43,7 @@ public class JWScriptServlet @Override public void perform() { - HttpServletRequest request = GuiceContext.get(GuicedServletKeys.getHttpServletRequestKey()); + HttpServletRequest request = IGuiceContext.get(GuicedServletKeys.getHttpServletRequestKey()); FileTemplates.getFileTemplate(JWScriptServlet.class, JWScriptServlet.FILE_TEMPLATE_NAME, "siteloader"); FileTemplates.getTemplateVariables() .put("SITEADDRESSINSERT", new StringBuilder(SessionHelper.getServerPath())); @@ -52,7 +52,7 @@ public void perform() try { FileTemplates.getTemplateVariables() - .put("PAGECLASS", new StringBuilder(GuiceContext.get(Page.class) + .put("PAGECLASS", new StringBuilder(IGuiceContext.get(Page.class) .getClass() .getCanonicalName())); diff --git a/src/main/java/com/jwebmp/core/base/servlets/JWebMPServlet.java b/src/main/java/com/jwebmp/core/base/servlets/JWebMPServlet.java index 586bf1b46..4bd66f341 100644 --- a/src/main/java/com/jwebmp/core/base/servlets/JWebMPServlet.java +++ b/src/main/java/com/jwebmp/core/base/servlets/JWebMPServlet.java @@ -17,7 +17,8 @@ package com.jwebmp.core.base.servlets; import com.google.inject.Singleton; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.guicedee.guicedservlets.GuicedServletKeys; import com.guicedee.services.jsonrepresentation.json.StaticStrings; import jakarta.servlet.http.HttpServletResponse; @@ -53,7 +54,7 @@ public JWebMPServlet() public void perform() { - HttpServletResponse response = GuiceContext.get(GuicedServletKeys.getHttpServletResponseKey()); + HttpServletResponse response = IGuiceContext.get(GuicedServletKeys.getHttpServletResponseKey()); sendPage(response); } @@ -78,7 +79,7 @@ public void destroy() try { JWebMPServlet.log.log(Level.INFO, "Destroying Servlet JWebMP Servlet and all Static Objects"); - GuiceContext.destroy(); + IGuiceContext.getContext().destroy(); } catch (Exception t) { diff --git a/src/main/java/com/jwebmp/core/base/servlets/JavaScriptServlet.java b/src/main/java/com/jwebmp/core/base/servlets/JavaScriptServlet.java index 003ae52a4..59608336d 100644 --- a/src/main/java/com/jwebmp/core/base/servlets/JavaScriptServlet.java +++ b/src/main/java/com/jwebmp/core/base/servlets/JavaScriptServlet.java @@ -17,10 +17,11 @@ package com.jwebmp.core.base.servlets; import com.google.inject.Singleton; +import com.guicedee.client.*; import com.jwebmp.core.FileTemplates; import com.jwebmp.core.Page; import com.guicedee.services.jsonrepresentation.json.StaticStrings; -import com.guicedee.guicedinjection.GuiceContext; + import com.guicedee.guicedservlets.GuicedServletKeys; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -32,7 +33,7 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; -import static com.guicedee.guicedinjection.GuiceContext.get; +import static com.guicedee.client.IGuiceContext.get; import static com.jwebmp.core.implementations.JWebMPJavaScriptDynamicScriptRenderer.renderJavascript; import static com.jwebmp.interception.JWebMPInterceptionBinder.*; import static java.nio.charset.StandardCharsets.UTF_8; @@ -61,7 +62,7 @@ public void perform() Page page = (Page) get(IPage.class); for (AjaxCallIntercepter ajaxCallIntercepter : get(AjaxCallInterceptorKey)) { - ajaxCallIntercepter.intercept(GuiceContext.get(AjaxCall.class), GuiceContext.get(AjaxResponse.class)); + ajaxCallIntercepter.intercept(IGuiceContext.get(AjaxCall.class), IGuiceContext.get(AjaxResponse.class)); } page.toString(0); FileTemplates.removeTemplate(JavaScriptServlet.scriptReplacement); diff --git a/src/main/java/com/jwebmp/core/base/servlets/enumarations/ComponentTypes.java b/src/main/java/com/jwebmp/core/base/servlets/enumarations/ComponentTypes.java deleted file mode 100644 index aad3e2a2b..000000000 --- a/src/main/java/com/jwebmp/core/base/servlets/enumarations/ComponentTypes.java +++ /dev/null @@ -1,580 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.servlets.enumarations; - -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * This class registers all HTML accepted tags that can be used across all - * browsers (IE6+) - *

- * When Enum get's extend capability then can add the HTML 5 components too, but - * adding them here would break the point of jQuery - *

- * - * @author GedMarc - */ -public enum ComponentTypes -{ - - /** - * Defines a document type - */ - /** - * Defines a document type - */ - /** - * Defines a document type - */ - /** - * Defines a document type - */ - DocumentType("!"), - /** - * The CSS CSSLink Component - */ - CSSLink("link"), - Comment(""), - /** - * The normal link component - */ - Link("a"), - /** - * The abbreviation component - */ - Abbreviation("abbr"), - /** - * The address component - */ - Address("addr"), - /** - * Defines an acronym. Displays as ABBR when being viewed by HTML 5 - */ - Acronym("acronym"), - /** - * Defines a Java Applet - */ - Applet("applet"), - /** - * The A specific article. Only renders properly in HTML 5 - */ - Article("article"), - /** - * The area tag defines an area inside an image-map (an image-map is an - * image with clickable areas). - */ - Area("area"), - /** - * The ASide component only renders in HTML 5 - */ - Aside("aside"), - /** - * The Audio Component - */ - Audio("audio"), - /** - * The Bold Component - */ - Bold("b"), - /** - * The Base Component (The tag Base) - */ - Base("base"), - /** - * The base font, deprecated I believe - *

- * - * @deprecated - */ - @Deprecated - BaseFont("basefont"), - /** - * The Body Div - */ - Body("body"), - /** - * bdo stands for Bi-Directional Override. - *

- * The tag is used to override the current text direction. - */ - BiDirectionalOverride("bdo"), - /** - * bdi stands for Bi-directional Isolation. - *

- * The >bdi< tag isolates a part of text that might be formatted in a - * different direction from other text outside it. - */ - BiDirectionalIsolation("bdi"), - /** - * The >blockquote< tag specifies a section that is quoted from - * another source. - */ - BlockQuotes("blockquote"), - /** - * Denotes a line break - */ - LineBreak("br"), - /** - * The button tag defines a clickable button. - */ - Button("button"), - /** - * The canvas tag is used to draw graphics, on the fly, via scripting - * (usually JavaScript). - */ - Canvas("canvas"), - /** - * The caption tag defines a table caption. - */ - TableCaption("caption"), - /** - * The center tag is not supported in HTML5. Use CSS instead. - *

- * The center tag is used to center-align text. - */ - Center("center"), - /** - * The cite tag defines the title of a work (e.g. a book, a song, a movie, a - * TV show, a painting, a sculpture, etc.). - */ - Cite("cite"), - /** - * Defines a piece of computer code - */ - Code("code"), - /** - * Defines a table column - */ - TableColumn("col"), - /** - * The colgroup tag specifies a group of one or more columns in a table for - * formatting. - */ - TableColumnGroup("colgroup"), - /** - * The datalist tag specifies a list of pre-defined options for an input - * element. - */ - DataList("datalist"), - /** - * The dd tag is used to describe a term/name in a description list. - */ - DataDescription("dd"), - /** - * The del tag defines text that has been deleted from a document. - */ - Deleted("del"), - /** - * The details tag specifies additional details that the user can view or - * hide on demand. - */ - Details("details"), - /** - * The dfn tag represents the defining instance of a term in HTML. - */ - Definition("dfn"), - /** - * The dir tag is not supported in HTML5. Use CSS instead. The dir tag is - * used to list directory titles. - *

- */ - DirectoryList("dir"), - /** - * The div tag defines a division or a section in an HTML document. - *

- * The dir tag is used to group block-elements to format them with CSS. - */ - Div("div"), - /** - * The dl tag defines a definition list. - */ - DescriptionList("dl"), - /** - * The dt tag defines a term/name in a description list. - */ - DescriptionTag("dt"), - /** - * The em tag is a phrase tag. It renders as emphasized text. - */ - Emphasized("em"), - /** - * The embed tag defines a container for an external application or - * interactive content (a plug-in) - */ - Embed("embed"), - /** - * The field-set tag is used to group related elements in a form. - */ - FieldSet("fieldset"), - /** - * Defines a caption for a figure - */ - FigureCaption("figcaption"), - /** - * The figure tag specifies self-contained content, like illustrations, - * diagrams, photos, code listings, etc. - */ - Figure("figure"), - /** - * Denotes a footer section of an address tag - */ - Footer("footer"), - /** - * Defines a form container that posts back - */ - Form("form"), - /** - * The Head Element for all meta-data about the web page - */ - Head("head"), - /** - * The header element represents a container for introductory content or a - * set of navigational links. - */ - Header("header"), - /** - * The hgroup tag is used to group heading elements. - */ - HeaderGroup("hgroup"), - /** - * Largest Header Size - */ - Header1("h1"), - /** - * 2nd Largest Header Size - */ - Header2("h2"), - /** - * Header Level 3 - */ - Header3("h3"), - /** - * Header Level 4 - */ - Header4("h4"), - /** - * Header Level 5 - */ - Header5("h5"), - /** - * Header Level 6 - */ - Header6("h6"), - /** - * Specifies an option in a data list or normal list - */ - HorizontalRule("hr"), - /** - * The HTML tag tells the browser that this is an HTML document. - */ - Html("html"), - /* - * Displays as Italic - */ - Italic("i"), - /** - * Image Reference - */ - Image("img"), - /** - * Specifies an IFrame - */ - IFrame("iframe"), - /** - * Specifies an Input for a form tag - */ - Input("input"), - /** - * Defines keyboard input - */ - KeyboardInput("kbd"), - /** - * The keygen tag specifies a key-pair generator field used for forms. - *

- * When the form is submitted, the private key is stored locally, and the - * public key is sent to the server. - */ - KeyGen("keygen"), - /** - * The label tag defines a label for an input element. - */ - Label("label"), - /** - * The legend tag defines a caption for the fieldset element. - */ - Legend("legend"), - /** - * Defines a list item - */ - ListItem("li"), - /** - * An unordered list - */ - UnorderedList("ul"), - /** - * An ordered list - */ - OrderedList("ol"), - /** - * A Map Component - */ - Map("map"), - /** - * Highlights Text - */ - Marker("mark"), - /** - * Specifies the meta-data for a page - */ - Metadata("meta"), - /** - * Navigation Section - */ - Navigation("nav"), - /** - * Displayed when no JavaScript is available - */ - NoScript("noscript"), - /** - * The object tag defines an embedded object within an HTML document. Use - * this element to embed multimedia (like audio, video, Java applets, - * ActiveX, PDF, and Flash) in your web pages. - */ - Object("object"), - /** - * Defines an option group for the select components children - */ - OptionGroup("optgroup"), - /** - * The <option> tag defines an option in a select list. - *

- * <option> elements go inside a <select> or <datalist> - * element. - */ - Option("option"), - /** - * The output tag represents the result of a calculation (like one performed - * by a script. - */ - Output("output"), - /** - * The param tag is used to define parameters for plugins embedded with an - * object element. - */ - Parameter("param"), - /** - * Defines a text paragraph - */ - Paragraph("p"), - /** - * The >pre< tag defines preformatted text. - *

- * Text in a >pre< element is displayed in a fixed-width font (usually - * Courier), and it preserves both spaces and line breaks. - */ - PreFormatted("pre"), - /** - * Displays a progress bar - */ - ProgressBar("progress"), - /** - * Defines a Quotation - */ - Quotation("q"), - /** - * The rb tags sets what to show when the browser does not support ruby - * annotations - */ - RubyNoSupport("rp"), - /** - * Ruby Script - */ - RubyTranslate("rt"), - /** - * Ruby - */ - Ruby("ruby"), - /** - * The s tag marks information that is no longer relevant - */ - S("s"), - /** - * defines sample output from a computer program. - */ - SampleCode("samp"), - /** - * Defines a script object - */ - Script("script"), - /** - * Defines sections in a document, such as chapters, headers, footers, or - * any other sections of the document. - */ - Section("section"), - /** - * The select element is used to create a drop-down list. - */ - Select("select"), - /** - * Specifies Small Text - */ - SmallText("small"), - /** - * Specifies a source for a Video or a Audio Object - */ - Source("source"), - /** - * used to group inline-elements in a document. - */ - Span("span"), - /** - * Defines important text - */ - Strong("strong"), - /** - * Used to define style information for an HTML document. - */ - Style("style"), - /** - * Specifies Sub Script - */ - Subscript("sub"), - /** - * Defines a summary text for a detail object - */ - Summary("summary"), - /** - * Defines superscript text - */ - SuperScript("sup"), - /** - * defines a table - */ - Table("table"), - /** - * A table body group - */ - TableBodyGroup("tbody"), - /** - * Defines a table cell - */ - TableCell("td"), - /** - * Defines a Text Area Input - */ - TextArea("textarea"), - /** - * Defines a table footer group - */ - TableFooterGroup("tfoot"), - /** - * Defines a Table - */ - TableHeader("th"), - /** - * Defines a table header group - */ - TableHeaderGroup("thead"), - /** - * The time object - Only for HTML 5 only - */ - Time("time"), - /** - * Defines the title of a document - */ - HeadTitle("title"), - /** - * Defines a table row - */ - TableRow("tr"), - /** - * Defines a video Track - */ - Track("track"), - /** - * Specifies Underlined Text - */ - Underline("u"), - /** - * Defines a Variable type phrase - */ - Variable("var"), - /** - * Defines a Video. HTML 5 Only - */ - Video("video"), - /** - * Assists resizing by showing the browser where to set word breaks - */ - WordBreak("wbr"), - /** - * - */ - Feature("feature"), - Event("event"), - PageHTML("html"), - /** - * Formats a component as a CSS Class Name Reference Only - */ - CSSClass("meh"),; - - private String componentTag; - private Class classType; - private Object instance; - - ComponentTypes() - { - } - - ComponentTypes(String componentTag) - { - this.componentTag = componentTag; - } - - /** - * Returns an array of all the values - * - * @return - */ - public static ComponentTypes[] getAll() - { - return values(); - } - - /** - * Returns the component tag - * - * @return - */ - public String getComponentTag() - { - return componentTag; - } - - /** - * Descriptive string of the reference - * - * @return - */ - @JsonValue - @Override - public String toString() - { - return this.name() - .toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/base/servlets/enumarations/DevelopmentEnvironments.java b/src/main/java/com/jwebmp/core/base/servlets/enumarations/DevelopmentEnvironments.java deleted file mode 100644 index a28d2ebf7..000000000 --- a/src/main/java/com/jwebmp/core/base/servlets/enumarations/DevelopmentEnvironments.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.servlets.enumarations; - -import jakarta.validation.constraints.NotNull; -import java.util.Properties; - -/** - * Configures the global generation type - * - * @author mmagon - * @version 1.0 - * @since 2013/11/20 - */ -public enum DevelopmentEnvironments -{ - /** - * All commenting and everything - */ - Local(null), - /** - * Lots of commenting - */ - Sandbox(null), - /** - * Always pretty print HTML - */ - Development, - /** - * Allows for pretty print of HTML - */ - QA, - /** - * UI Test Environment - */ - UITest, - /** - * PreProduction Environment - */ - PreProduction, - /** - * Forces tiny HTML to be rendered - */ - Production; - - private Properties environmentProperties; - - DevelopmentEnvironments() - { - environmentProperties = null; - } - - /** - * Constructs with a default properties set - * - * @param environmentProperties - */ - DevelopmentEnvironments(Properties environmentProperties) - { - this.environmentProperties = environmentProperties; - } - - /** - * Returns the assigned environment properties - * - * @return - */ - @NotNull - public Properties getEnvironmentProperties() - { - if (environmentProperties == null) - { - environmentProperties = new Properties(); - } - return environmentProperties; - } - - /** - * Sets the default properties - * - * @param environmentProperties - */ - @SuppressWarnings("unused") - public void setEnvironmentProperties(@NotNull Properties environmentProperties) - { - this.environmentProperties = environmentProperties; - } -} diff --git a/src/main/java/com/jwebmp/core/base/servlets/enumarations/Orientation.java b/src/main/java/com/jwebmp/core/base/servlets/enumarations/Orientation.java deleted file mode 100644 index 8ab874b03..000000000 --- a/src/main/java/com/jwebmp/core/base/servlets/enumarations/Orientation.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.servlets.enumarations; - -/** - * This Class - * - * @author GedMarc - * @since 30 Dec 2015 - */ -public enum Orientation -{ - VERTICAL, - HORIZONTAL; - - @Override - public String toString() - { - return super.toString() - .toLowerCase(); - } - -} diff --git a/src/main/java/com/jwebmp/core/base/servlets/enumarations/RequirementsPriority.java b/src/main/java/com/jwebmp/core/base/servlets/enumarations/RequirementsPriority.java deleted file mode 100644 index 9f81ca9b1..000000000 --- a/src/main/java/com/jwebmp/core/base/servlets/enumarations/RequirementsPriority.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.servlets.enumarations; - -/** - * To prioritize sorted references into groups, very good for loading - * - * @author GedMarc - * @since 16 Apr 2016 - */ -public enum RequirementsPriority - implements Comparable -{ - /** - * Loads it at the top (in the head) - */ - Top_Shelf, - /** - * Run in First Group - */ - First, - /** - * Run in Second Group - */ - Second, - /** - * Run in Third Group - */ - Third, - /** - * Run in Fourth Group - */ - Fourth, - /** - * Run in Fifth Group - */ - Fifth, - /** - * Somewhere in the middle, sorted, but who cares - */ - DontCare, - /** - * Somewhere after the don't care section - */ - Last, - /** - * The very last section. Usually at the end of the page, before or at the scripts section of body - */ - VeryLast, - /** - * After all the dynamic scripts, just before body close tag - */ - StoneLast; - - RequirementsPriority() - { - } - -} diff --git a/src/main/java/com/jwebmp/core/base/servlets/interfaces/IComponent.java b/src/main/java/com/jwebmp/core/base/servlets/interfaces/IComponent.java deleted file mode 100644 index 62545fc81..000000000 --- a/src/main/java/com/jwebmp/core/base/servlets/interfaces/IComponent.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.servlets.interfaces; - -/** - * The base of each component - * - * @author GedMarc - */ -public interface IComponent -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/servlets/interfaces/IDataComponent.java b/src/main/java/com/jwebmp/core/base/servlets/interfaces/IDataComponent.java deleted file mode 100644 index 47cbd6266..000000000 --- a/src/main/java/com/jwebmp/core/base/servlets/interfaces/IDataComponent.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.servlets.interfaces; - -import jakarta.validation.constraints.NotNull; - -/** - * Marks a component as one with Data that is available as either AJAX or direct - * - * @author GedMarc - * @since Nov 9, 2016 - */ -@FunctionalInterface -public interface IDataComponent -{ - /** - * Renders the physical data on call - */ - @NotNull StringBuilder renderData(); -} diff --git a/src/main/java/com/jwebmp/core/base/servlets/interfaces/IFeature.java b/src/main/java/com/jwebmp/core/base/servlets/interfaces/IFeature.java deleted file mode 100644 index ed8677f3c..000000000 --- a/src/main/java/com/jwebmp/core/base/servlets/interfaces/IFeature.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.servlets.interfaces; - -import com.jwebmp.core.base.ComponentBase; -import com.jwebmp.core.base.html.interfaces.GlobalFeatures; - -/** - * Specifies a feature that can be added to a component A feature is a client side script that runs. Essentially is JavaScript commands that get added to a system. - * - * @author GedMarc - * @version 1.8 - *

- * 1.0 - Initial Creation 1.2 Added minified support 1.3 CSS file additional support - * @since 2011/05/03 - */ -public interface IFeature> - extends GlobalFeatures -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/servlets/interfaces/IReferencePool.java b/src/main/java/com/jwebmp/core/base/servlets/interfaces/IReferencePool.java deleted file mode 100644 index 4f617db8f..000000000 --- a/src/main/java/com/jwebmp/core/base/servlets/interfaces/IReferencePool.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.servlets.interfaces; - -import com.jwebmp.core.base.references.CSSReference; -import com.jwebmp.core.base.references.JavascriptReference; - -import java.io.Serializable; - -/** - * @author GedMarc - * @since Oct 24, 2016 - */ -public interface IReferencePool> - extends Serializable -{ - - /** - * Gets the CSS Reference - *

- * - * @return - */ - CSSReference getCssReference(); - - /** - * Sets the CSS Reference - *

- * - * @param cssReference - */ - void setCssReference(CSSReference cssReference); - - /** - * Gets the JavaScript reference - *

- * - * @return - */ - JavascriptReference getJavaScriptReference(); - - /** - * Sets the JavaScript reference - *

- * - * @param javaScriptReference - */ - void setJavaScriptReference(JavascriptReference javaScriptReference); - -} diff --git a/src/main/java/com/jwebmp/core/base/servlets/interfaces/Loader.java b/src/main/java/com/jwebmp/core/base/servlets/interfaces/Loader.java deleted file mode 100644 index ccee454b5..000000000 --- a/src/main/java/com/jwebmp/core/base/servlets/interfaces/Loader.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.servlets.interfaces; - -/** - * Defines a Registered Loader - * - * @author GedMarc - */ -public interface Loader -{ - -} diff --git a/src/main/java/com/jwebmp/core/base/servlets/interfaces/ReferencePool.java b/src/main/java/com/jwebmp/core/base/servlets/interfaces/ReferencePool.java deleted file mode 100644 index b7dcd2123..000000000 --- a/src/main/java/com/jwebmp/core/base/servlets/interfaces/ReferencePool.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.base.servlets.interfaces; - -import java.io.Serializable; - -/** - * @author GedMarc - */ -public interface ReferencePool - extends Serializable, IReferencePool -{ - -} diff --git a/src/main/java/com/jwebmp/core/events/activate/ActivateAdapter.java b/src/main/java/com/jwebmp/core/events/activate/ActivateAdapter.java index c4d86f6ad..1032790af 100644 --- a/src/main/java/com/jwebmp/core/events/activate/ActivateAdapter.java +++ b/src/main/java/com/jwebmp/core/events/activate/ActivateAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.activate; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -85,7 +86,7 @@ public void preConfigure() private void onCreate() { @SuppressWarnings("rawtypes") - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnActivateService.class, ServiceLoader.load(IOnActivateService.class)); services.forEach(service -> service.onCreate(this)); } @@ -108,8 +109,9 @@ private void onCreate() private void onCall() { @SuppressWarnings("rawtypes") - Set services = GuiceContext.instance() - .getLoader(IOnActivateService.class, ServiceLoader.load(IOnActivateService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnActivateService.class, ServiceLoader.load(IOnActivateService.class)); services.forEach(service -> service.onCall(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/beforeactivate/BeforeActivateAdapter.java b/src/main/java/com/jwebmp/core/events/beforeactivate/BeforeActivateAdapter.java index 74e7f6443..50b36ce51 100644 --- a/src/main/java/com/jwebmp/core/events/beforeactivate/BeforeActivateAdapter.java +++ b/src/main/java/com/jwebmp/core/events/beforeactivate/BeforeActivateAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.beforeactivate; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -82,7 +83,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnBeforeActivateService.class, ServiceLoader.load(IOnBeforeActivateService.class)); services.forEach(service -> service.onCall(this)); } @@ -104,8 +105,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnBeforeActivateService.class, ServiceLoader.load(IOnBeforeActivateService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnBeforeActivateService.class, ServiceLoader.load(IOnBeforeActivateService.class)); services.forEach(service -> service.onCreate(this)); } diff --git a/src/main/java/com/jwebmp/core/events/beforeclose/BeforeCloseAdapter.java b/src/main/java/com/jwebmp/core/events/beforeclose/BeforeCloseAdapter.java index e59e5b555..6fff66b22 100644 --- a/src/main/java/com/jwebmp/core/events/beforeclose/BeforeCloseAdapter.java +++ b/src/main/java/com/jwebmp/core/events/beforeclose/BeforeCloseAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.beforeclose; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -83,7 +84,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnBeforeCloseService.class, ServiceLoader.load(IOnBeforeCloseService.class)); services.forEach(service -> service.onCall(this)); } @@ -105,8 +106,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnBeforeCloseService.class, ServiceLoader.load(IOnBeforeCloseService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnBeforeCloseService.class, ServiceLoader.load(IOnBeforeCloseService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/beforeload/BeforeLoadAdapter.java b/src/main/java/com/jwebmp/core/events/beforeload/BeforeLoadAdapter.java index 3e9bd73cf..b35488226 100644 --- a/src/main/java/com/jwebmp/core/events/beforeload/BeforeLoadAdapter.java +++ b/src/main/java/com/jwebmp/core/events/beforeload/BeforeLoadAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.beforeload; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -82,7 +83,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnBeforeLoadService.class, ServiceLoader.load(IOnBeforeLoadService.class)); services.forEach(service -> service.onCall(this)); } @@ -104,8 +105,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnBeforeLoadService.class, ServiceLoader.load(IOnBeforeLoadService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnBeforeLoadService.class, ServiceLoader.load(IOnBeforeLoadService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/beforestop/BeforeStopAdapter.java b/src/main/java/com/jwebmp/core/events/beforestop/BeforeStopAdapter.java index 29fbb122d..c340bb1cf 100644 --- a/src/main/java/com/jwebmp/core/events/beforestop/BeforeStopAdapter.java +++ b/src/main/java/com/jwebmp/core/events/beforestop/BeforeStopAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.beforestop; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -82,7 +83,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnBeforeStopService.class, ServiceLoader.load(IOnBeforeStopService.class)); services.forEach(service -> service.onCall(this)); } @@ -104,8 +105,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnBeforeStopService.class, ServiceLoader.load(IOnBeforeStopService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnBeforeStopService.class, ServiceLoader.load(IOnBeforeStopService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/blur/BlurAdapter.java b/src/main/java/com/jwebmp/core/events/blur/BlurAdapter.java index c41e0eeba..8f1e6cbf7 100644 --- a/src/main/java/com/jwebmp/core/events/blur/BlurAdapter.java +++ b/src/main/java/com/jwebmp/core/events/blur/BlurAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.blur; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,7 +82,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnBlurService.class, ServiceLoader.load(IOnBlurService.class)); services.forEach(service -> service.onCall(this)); } @@ -103,8 +104,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnBlurService.class, ServiceLoader.load(IOnBlurService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnBlurService.class, ServiceLoader.load(IOnBlurService.class)); services.forEach(service -> service.onCreate(this)); } diff --git a/src/main/java/com/jwebmp/core/events/buttonclick/ButtonClickAdapter.java b/src/main/java/com/jwebmp/core/events/buttonclick/ButtonClickAdapter.java index 5026b2ac5..d17d1c7ea 100644 --- a/src/main/java/com/jwebmp/core/events/buttonclick/ButtonClickAdapter.java +++ b/src/main/java/com/jwebmp/core/events/buttonclick/ButtonClickAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.buttonclick; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -84,7 +85,7 @@ public void fireEvent(AjaxCall ajaxObject, AjaxResponse ajaxReceiver) @SuppressWarnings({"rawtypes", "unchecked"}) private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnButtonClickService.class, ServiceLoader.load(IOnButtonClickService.class)); services.forEach(service -> service.onCall(this)); } @@ -107,8 +108,9 @@ public void preConfigure() private void onCreate() { @SuppressWarnings("rawtypes") - Set services = GuiceContext.instance() - .getLoader(IOnButtonClickService.class, ServiceLoader.load(IOnButtonClickService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnButtonClickService.class, ServiceLoader.load(IOnButtonClickService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/cancel/CancelAdapter.java b/src/main/java/com/jwebmp/core/events/cancel/CancelAdapter.java index d4f9bd85f..6f165b088 100644 --- a/src/main/java/com/jwebmp/core/events/cancel/CancelAdapter.java +++ b/src/main/java/com/jwebmp/core/events/cancel/CancelAdapter.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.events.cancel; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -84,8 +84,8 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnCancelService.class, ServiceLoader.load(IOnCancelService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnCancelService.class, ServiceLoader.load(IOnCancelService.class)); services.forEach(service -> service.onCall(this)); } @@ -106,8 +106,8 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnCancelService.class, ServiceLoader.load(IOnCancelService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnCancelService.class, ServiceLoader.load(IOnCancelService.class)); services.forEach(service -> service.onCreate(this)); } diff --git a/src/main/java/com/jwebmp/core/events/change/ChangeAdapter.java b/src/main/java/com/jwebmp/core/events/change/ChangeAdapter.java index bbd2c2889..ae349627d 100644 --- a/src/main/java/com/jwebmp/core/events/change/ChangeAdapter.java +++ b/src/main/java/com/jwebmp/core/events/change/ChangeAdapter.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.events.change; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -86,8 +86,8 @@ public void fireEvent(AjaxCall call, AjaxResponse response) @SuppressWarnings({"unchecked", "rawtypes"}) private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnChangeService.class, ServiceLoader.load(IOnChangeService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnChangeService.class, ServiceLoader.load(IOnChangeService.class)); services.forEach(service -> service.onCall(this)); } @@ -108,8 +108,8 @@ public void preConfigure() @SuppressWarnings({"unchecked", "rawtypes"}) private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnChangeService.class, ServiceLoader.load(IOnChangeService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnChangeService.class, ServiceLoader.load(IOnChangeService.class)); services.forEach(service -> service.onCreate(this)); } diff --git a/src/main/java/com/jwebmp/core/events/checked/CheckedAdapter.java b/src/main/java/com/jwebmp/core/events/checked/CheckedAdapter.java index c889bcb5e..907065cd7 100644 --- a/src/main/java/com/jwebmp/core/events/checked/CheckedAdapter.java +++ b/src/main/java/com/jwebmp/core/events/checked/CheckedAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.checked; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,7 +82,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnCheckedService.class, ServiceLoader.load(IOnCheckedService.class)); services.forEach(service -> service.onCall(this)); } @@ -103,8 +104,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnCheckedService.class, ServiceLoader.load(IOnCheckedService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnCheckedService.class, ServiceLoader.load(IOnCheckedService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/click/ClickAdapter.java b/src/main/java/com/jwebmp/core/events/click/ClickAdapter.java index 238d57e12..ada1d3949 100644 --- a/src/main/java/com/jwebmp/core/events/click/ClickAdapter.java +++ b/src/main/java/com/jwebmp/core/events/click/ClickAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.click; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -90,7 +91,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnClickService.class, ServiceLoader.load(IOnClickService.class)); services.forEach(service -> service.onCall(this)); } @@ -111,8 +112,9 @@ public void preConfigure() @SuppressWarnings("unchecked") protected void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnClickService.class, ServiceLoader.load(IOnClickService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnClickService.class, ServiceLoader.load(IOnClickService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/close/CloseAdapter.java b/src/main/java/com/jwebmp/core/events/close/CloseAdapter.java index 79b2da7d3..abfc2d894 100644 --- a/src/main/java/com/jwebmp/core/events/close/CloseAdapter.java +++ b/src/main/java/com/jwebmp/core/events/close/CloseAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.close; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -84,7 +85,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnCloseService.class, ServiceLoader.load(IOnCloseService.class)); services.forEach(service -> service.onCall(this)); } @@ -106,8 +107,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnCloseService.class, ServiceLoader.load(IOnCloseService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnCloseService.class, ServiceLoader.load(IOnCloseService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/complete/CompleteAdapter.java b/src/main/java/com/jwebmp/core/events/complete/CompleteAdapter.java index 7eecfdf75..8bcd97483 100644 --- a/src/main/java/com/jwebmp/core/events/complete/CompleteAdapter.java +++ b/src/main/java/com/jwebmp/core/events/complete/CompleteAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.complete; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -85,7 +86,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnCompleteService.class, ServiceLoader.load(IOnCompleteService.class)); services.forEach(service -> service.onCall(this)); } @@ -107,8 +108,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnCompleteService.class, ServiceLoader.load(IOnCompleteService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnCompleteService.class, ServiceLoader.load(IOnCompleteService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/create/CreateAdapter.java b/src/main/java/com/jwebmp/core/events/create/CreateAdapter.java index 174da6e36..6270c00ae 100644 --- a/src/main/java/com/jwebmp/core/events/create/CreateAdapter.java +++ b/src/main/java/com/jwebmp/core/events/create/CreateAdapter.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.events.create; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -86,8 +86,8 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnCreateService.class, ServiceLoader.load(IOnCreateService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnCreateService.class, ServiceLoader.load(IOnCreateService.class)); services.forEach(service -> service.onCall(this)); } @@ -108,8 +108,8 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnCreateService.class, ServiceLoader.load(IOnCreateService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnCreateService.class, ServiceLoader.load(IOnCreateService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/deactivate/DeactivateAdapter.java b/src/main/java/com/jwebmp/core/events/deactivate/DeactivateAdapter.java index 57ab6f271..9c1785581 100644 --- a/src/main/java/com/jwebmp/core/events/deactivate/DeactivateAdapter.java +++ b/src/main/java/com/jwebmp/core/events/deactivate/DeactivateAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.deactivate; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -85,7 +86,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnDeActivateService.class, ServiceLoader.load(IOnDeActivateService.class)); services.forEach(service -> service.onCall(this)); } @@ -107,8 +108,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnDeActivateService.class, ServiceLoader.load(IOnDeActivateService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnDeActivateService.class, ServiceLoader.load(IOnDeActivateService.class)); services.forEach(service -> service.onCreate(this)); } diff --git a/src/main/java/com/jwebmp/core/events/drag/DragAdapter.java b/src/main/java/com/jwebmp/core/events/drag/DragAdapter.java index 3f1d03039..98f071716 100644 --- a/src/main/java/com/jwebmp/core/events/drag/DragAdapter.java +++ b/src/main/java/com/jwebmp/core/events/drag/DragAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.drag; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -84,7 +85,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnDragService.class, ServiceLoader.load(IOnDragService.class)); services.forEach(service -> service.onCall(this)); } @@ -106,8 +107,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnDragService.class, ServiceLoader.load(IOnDragService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnDragService.class, ServiceLoader.load(IOnDragService.class)); services.forEach(service -> service.onCreate(this)); } diff --git a/src/main/java/com/jwebmp/core/events/dragstart/DragStartAdapter.java b/src/main/java/com/jwebmp/core/events/dragstart/DragStartAdapter.java index 1102c3b3b..079e848e6 100644 --- a/src/main/java/com/jwebmp/core/events/dragstart/DragStartAdapter.java +++ b/src/main/java/com/jwebmp/core/events/dragstart/DragStartAdapter.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.events.dragstart; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -83,8 +83,8 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnDragStartService.class, ServiceLoader.load(IOnDragStartService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnDragStartService.class, ServiceLoader.load(IOnDragStartService.class)); services.forEach(service -> service.onCall(this)); } @@ -104,8 +104,8 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnDragStartService.class, ServiceLoader.load(IOnDragStartService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnDragStartService.class, ServiceLoader.load(IOnDragStartService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/dragstop/DragStopAdapter.java b/src/main/java/com/jwebmp/core/events/dragstop/DragStopAdapter.java index d69fb89ee..88dfb72f4 100644 --- a/src/main/java/com/jwebmp/core/events/dragstop/DragStopAdapter.java +++ b/src/main/java/com/jwebmp/core/events/dragstop/DragStopAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.dragstop; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -85,7 +86,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnDragStopService.class, ServiceLoader.load(IOnDragStopService.class)); services.forEach(service -> service.onCall(this)); } @@ -107,8 +108,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnDragStopService.class, ServiceLoader.load(IOnDragStopService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnDragStopService.class, ServiceLoader.load(IOnDragStopService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/drop/DropAdapter.java b/src/main/java/com/jwebmp/core/events/drop/DropAdapter.java index fae3f5f35..40b635023 100644 --- a/src/main/java/com/jwebmp/core/events/drop/DropAdapter.java +++ b/src/main/java/com/jwebmp/core/events/drop/DropAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.drop; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -85,7 +86,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnDropService.class, ServiceLoader.load(IOnDropService.class)); services.forEach(service -> service.onCall(this)); } @@ -106,8 +107,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnDropService.class, ServiceLoader.load(IOnDropService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnDropService.class, ServiceLoader.load(IOnDropService.class)); services.forEach(service -> service.onCreate(this)); } diff --git a/src/main/java/com/jwebmp/core/events/dropout/DropOutAdapter.java b/src/main/java/com/jwebmp/core/events/dropout/DropOutAdapter.java index c1fff07c4..667b6f5d6 100644 --- a/src/main/java/com/jwebmp/core/events/dropout/DropOutAdapter.java +++ b/src/main/java/com/jwebmp/core/events/dropout/DropOutAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.dropout; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -85,7 +86,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnDropOutService.class, ServiceLoader.load(IOnDropOutService.class)); services.forEach(service -> service.onCall(this)); } @@ -107,8 +108,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnDropOutService.class, ServiceLoader.load(IOnDropOutService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnDropOutService.class, ServiceLoader.load(IOnDropOutService.class)); services.forEach(service -> service.onCreate(this)); } diff --git a/src/main/java/com/jwebmp/core/events/dropover/DropOverAdapter.java b/src/main/java/com/jwebmp/core/events/dropover/DropOverAdapter.java index f165fa1af..753831596 100644 --- a/src/main/java/com/jwebmp/core/events/dropover/DropOverAdapter.java +++ b/src/main/java/com/jwebmp/core/events/dropover/DropOverAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.dropover; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -85,7 +86,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnDropOverService.class, ServiceLoader.load(IOnDropOverService.class)); services.forEach(service -> service.onCall(this)); } @@ -107,8 +108,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnDropOverService.class, ServiceLoader.load(IOnDropOverService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnDropOverService.class, ServiceLoader.load(IOnDropOverService.class)); services.forEach(service -> service.onCreate(this)); } diff --git a/src/main/java/com/jwebmp/core/events/focus/FocusAdapter.java b/src/main/java/com/jwebmp/core/events/focus/FocusAdapter.java index ddc94716a..924dc77b5 100644 --- a/src/main/java/com/jwebmp/core/events/focus/FocusAdapter.java +++ b/src/main/java/com/jwebmp/core/events/focus/FocusAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.focus; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -85,7 +86,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnFocusService.class, ServiceLoader.load(IOnFocusService.class)); services.forEach(service -> service.onCall(this)); } @@ -107,8 +108,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnFocusService.class, ServiceLoader.load(IOnFocusService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnFocusService.class, ServiceLoader.load(IOnFocusService.class)); services.forEach(service -> service.onCreate(this)); } diff --git a/src/main/java/com/jwebmp/core/events/keydown/KeyDownAdapter.java b/src/main/java/com/jwebmp/core/events/keydown/KeyDownAdapter.java index 4af39d0b2..0dc0a5333 100644 --- a/src/main/java/com/jwebmp/core/events/keydown/KeyDownAdapter.java +++ b/src/main/java/com/jwebmp/core/events/keydown/KeyDownAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.keydown; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,7 +82,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnKeyDownService.class, ServiceLoader.load(IOnKeyDownService.class)); services.forEach(service -> service.onCall(this)); } @@ -103,8 +104,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnKeyDownService.class, ServiceLoader.load(IOnKeyDownService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnKeyDownService.class, ServiceLoader.load(IOnKeyDownService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/keypressed/KeyPressedAdapter.java b/src/main/java/com/jwebmp/core/events/keypressed/KeyPressedAdapter.java index cd76d8d60..e806ecb65 100644 --- a/src/main/java/com/jwebmp/core/events/keypressed/KeyPressedAdapter.java +++ b/src/main/java/com/jwebmp/core/events/keypressed/KeyPressedAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.keypressed; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -84,7 +85,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnKeyPressedService.class, ServiceLoader.load(IOnKeyPressedService.class)); services.forEach(service -> service.onCall(this)); } @@ -106,8 +107,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnKeyPressedService.class, ServiceLoader.load(IOnKeyPressedService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnKeyPressedService.class, ServiceLoader.load(IOnKeyPressedService.class)); services.forEach(service -> service.onCreate(this)); } diff --git a/src/main/java/com/jwebmp/core/events/keyup/KeyUpAdapter.java b/src/main/java/com/jwebmp/core/events/keyup/KeyUpAdapter.java index e9e9ff19b..630b39a30 100644 --- a/src/main/java/com/jwebmp/core/events/keyup/KeyUpAdapter.java +++ b/src/main/java/com/jwebmp/core/events/keyup/KeyUpAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.keyup; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,7 +82,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnKeyUpService.class, ServiceLoader.load(IOnKeyUpService.class)); services.forEach(service -> service.onCall(this)); } @@ -103,8 +104,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnKeyUpService.class, ServiceLoader.load(IOnKeyUpService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnKeyUpService.class, ServiceLoader.load(IOnKeyUpService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/load/LoadAdapter.java b/src/main/java/com/jwebmp/core/events/load/LoadAdapter.java index e10f44fab..85e648b5b 100644 --- a/src/main/java/com/jwebmp/core/events/load/LoadAdapter.java +++ b/src/main/java/com/jwebmp/core/events/load/LoadAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.load; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,7 +82,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnLoadService.class, ServiceLoader.load(IOnLoadService.class)); services.forEach(service -> service.onCall(this)); } @@ -102,8 +103,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnLoadService.class, ServiceLoader.load(IOnLoadService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnLoadService.class, ServiceLoader.load(IOnLoadService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/mousedown/MouseDownAdapter.java b/src/main/java/com/jwebmp/core/events/mousedown/MouseDownAdapter.java index c60151873..e285a6df2 100644 --- a/src/main/java/com/jwebmp/core/events/mousedown/MouseDownAdapter.java +++ b/src/main/java/com/jwebmp/core/events/mousedown/MouseDownAdapter.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.events.mousedown; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -82,8 +82,8 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnMouseDownService.class, ServiceLoader.load(IOnMouseDownService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnMouseDownService.class, ServiceLoader.load(IOnMouseDownService.class)); services.forEach(service -> service.onCall(this)); } @@ -103,8 +103,8 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnMouseDownService.class, ServiceLoader.load(IOnMouseDownService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnMouseDownService.class, ServiceLoader.load(IOnMouseDownService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/mouseenter/MouseEnterAdapter.java b/src/main/java/com/jwebmp/core/events/mouseenter/MouseEnterAdapter.java index 93f1a6f67..3d14973d8 100644 --- a/src/main/java/com/jwebmp/core/events/mouseenter/MouseEnterAdapter.java +++ b/src/main/java/com/jwebmp/core/events/mouseenter/MouseEnterAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.mouseenter; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -82,7 +83,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnMouseEnterService.class, ServiceLoader.load(IOnMouseEnterService.class)); services.forEach(service -> service.onCall(this)); } @@ -104,8 +105,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnMouseEnterService.class, ServiceLoader.load(IOnMouseEnterService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnMouseEnterService.class, ServiceLoader.load(IOnMouseEnterService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/mousemove/MouseMoveAdapter.java b/src/main/java/com/jwebmp/core/events/mousemove/MouseMoveAdapter.java index 9cf1f852c..ea56e43a7 100644 --- a/src/main/java/com/jwebmp/core/events/mousemove/MouseMoveAdapter.java +++ b/src/main/java/com/jwebmp/core/events/mousemove/MouseMoveAdapter.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.events.mousemove; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -83,8 +83,8 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnMouseMoveService.class, ServiceLoader.load(IOnMouseMoveService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnMouseMoveService.class, ServiceLoader.load(IOnMouseMoveService.class)); services.forEach(service -> service.onCall(this)); } @@ -104,8 +104,8 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnMouseMoveService.class, ServiceLoader.load(IOnMouseMoveService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnMouseMoveService.class, ServiceLoader.load(IOnMouseMoveService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/mouseout/MouseOutAdapter.java b/src/main/java/com/jwebmp/core/events/mouseout/MouseOutAdapter.java index fc498f1e1..d7b29d4f2 100644 --- a/src/main/java/com/jwebmp/core/events/mouseout/MouseOutAdapter.java +++ b/src/main/java/com/jwebmp/core/events/mouseout/MouseOutAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.mouseout; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -82,8 +83,9 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnMouseOutService.class, ServiceLoader.load(IOnMouseOutService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnMouseOutService.class, ServiceLoader.load(IOnMouseOutService.class)); services.forEach(service -> service.onCall(this)); } @@ -104,7 +106,7 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnMouseOutService.class, ServiceLoader.load(IOnMouseOutService.class)); services.forEach(service -> service.onCreate(this)); } diff --git a/src/main/java/com/jwebmp/core/events/mouseover/MouseOverAdapter.java b/src/main/java/com/jwebmp/core/events/mouseover/MouseOverAdapter.java index 2234f494d..bb69adaeb 100644 --- a/src/main/java/com/jwebmp/core/events/mouseover/MouseOverAdapter.java +++ b/src/main/java/com/jwebmp/core/events/mouseover/MouseOverAdapter.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.events.mouseover; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -80,8 +80,8 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnMouseOverService.class, ServiceLoader.load(IOnMouseOverService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnMouseOverService.class, ServiceLoader.load(IOnMouseOverService.class)); services.forEach(service -> service.onCall(this)); } @@ -101,8 +101,8 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnMouseOverService.class, ServiceLoader.load(IOnMouseOverService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnMouseOverService.class, ServiceLoader.load(IOnMouseOverService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/mouseup/MouseUpAdapter.java b/src/main/java/com/jwebmp/core/events/mouseup/MouseUpAdapter.java index 6c02451a5..9cb40cd8d 100644 --- a/src/main/java/com/jwebmp/core/events/mouseup/MouseUpAdapter.java +++ b/src/main/java/com/jwebmp/core/events/mouseup/MouseUpAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.mouseup; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -82,7 +83,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnMouseUpService.class, ServiceLoader.load(IOnMouseUpService.class)); services.forEach(service -> service.onCall(this)); } @@ -104,8 +105,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnMouseUpService.class, ServiceLoader.load(IOnMouseUpService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnMouseUpService.class, ServiceLoader.load(IOnMouseUpService.class)); services.forEach(service -> service.onCreate(this)); } diff --git a/src/main/java/com/jwebmp/core/events/open/OpenAdapter.java b/src/main/java/com/jwebmp/core/events/open/OpenAdapter.java index adbed3e26..f81f1fe14 100644 --- a/src/main/java/com/jwebmp/core/events/open/OpenAdapter.java +++ b/src/main/java/com/jwebmp/core/events/open/OpenAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.open; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,7 +82,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnOpenService.class, ServiceLoader.load(IOnOpenService.class)); services.forEach(service -> service.onCall(this)); } @@ -103,8 +104,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnOpenService.class, ServiceLoader.load(IOnOpenService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnOpenService.class, ServiceLoader.load(IOnOpenService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/receive/ReceiveAdapter.java b/src/main/java/com/jwebmp/core/events/receive/ReceiveAdapter.java index 6cd412269..a02edf2a5 100644 --- a/src/main/java/com/jwebmp/core/events/receive/ReceiveAdapter.java +++ b/src/main/java/com/jwebmp/core/events/receive/ReceiveAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.receive; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -82,7 +83,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnReceiveService.class, ServiceLoader.load(IOnReceiveService.class)); services.forEach(service -> service.onCall(this)); } @@ -103,8 +104,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnReceiveService.class, ServiceLoader.load(IOnReceiveService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnReceiveService.class, ServiceLoader.load(IOnReceiveService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/remove/RemoveAdapter.java b/src/main/java/com/jwebmp/core/events/remove/RemoveAdapter.java index 642051a12..bd6d4d3dd 100644 --- a/src/main/java/com/jwebmp/core/events/remove/RemoveAdapter.java +++ b/src/main/java/com/jwebmp/core/events/remove/RemoveAdapter.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.events.remove; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -82,8 +82,8 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnRemoveService.class, ServiceLoader.load(IOnRemoveService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnRemoveService.class, ServiceLoader.load(IOnRemoveService.class)); services.forEach(service -> service.onCall(this)); } @@ -104,8 +104,8 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnRemoveService.class, ServiceLoader.load(IOnRemoveService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnRemoveService.class, ServiceLoader.load(IOnRemoveService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/resize/ResizeAdapter.java b/src/main/java/com/jwebmp/core/events/resize/ResizeAdapter.java index acb1da526..be7fc3fca 100644 --- a/src/main/java/com/jwebmp/core/events/resize/ResizeAdapter.java +++ b/src/main/java/com/jwebmp/core/events/resize/ResizeAdapter.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.events.resize; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -82,8 +82,8 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnResizeService.class, ServiceLoader.load(IOnResizeService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnResizeService.class, ServiceLoader.load(IOnResizeService.class)); services.forEach(service -> service.onCall(this)); } @@ -103,8 +103,8 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnResizeService.class, ServiceLoader.load(IOnResizeService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnResizeService.class, ServiceLoader.load(IOnResizeService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/resizestart/ResizeStartAdapter.java b/src/main/java/com/jwebmp/core/events/resizestart/ResizeStartAdapter.java index b0c422777..488616bf3 100644 --- a/src/main/java/com/jwebmp/core/events/resizestart/ResizeStartAdapter.java +++ b/src/main/java/com/jwebmp/core/events/resizestart/ResizeStartAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.resizestart; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -82,7 +83,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnResizeStartService.class, ServiceLoader.load(IOnResizeStartService.class)); services.forEach(service -> service.onCall(this)); } @@ -103,8 +104,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnResizeStartService.class, ServiceLoader.load(IOnResizeStartService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnResizeStartService.class, ServiceLoader.load(IOnResizeStartService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/resizestop/ResizeStopAdapter.java b/src/main/java/com/jwebmp/core/events/resizestop/ResizeStopAdapter.java index 15a8dd0ee..7b2a9b2d8 100644 --- a/src/main/java/com/jwebmp/core/events/resizestop/ResizeStopAdapter.java +++ b/src/main/java/com/jwebmp/core/events/resizestop/ResizeStopAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.resizestop; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,7 +82,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnResizeStopService.class, ServiceLoader.load(IOnResizeStopService.class)); services.forEach(service -> service.onCall(this)); } @@ -102,8 +103,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnResizeStopService.class, ServiceLoader.load(IOnResizeStopService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnResizeStopService.class, ServiceLoader.load(IOnResizeStopService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/response/ResponseAdapter.java b/src/main/java/com/jwebmp/core/events/response/ResponseAdapter.java index ec7e5a148..760d7cd88 100644 --- a/src/main/java/com/jwebmp/core/events/response/ResponseAdapter.java +++ b/src/main/java/com/jwebmp/core/events/response/ResponseAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.response; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,7 +82,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnResponseService.class, ServiceLoader.load(IOnResponseService.class)); services.forEach(service -> service.onCall(this)); } @@ -103,8 +104,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnResponseService.class, ServiceLoader.load(IOnResponseService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnResponseService.class, ServiceLoader.load(IOnResponseService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/rightclick/RightClickAdapter.java b/src/main/java/com/jwebmp/core/events/rightclick/RightClickAdapter.java index 9c85d12af..d4e2d36c6 100644 --- a/src/main/java/com/jwebmp/core/events/rightclick/RightClickAdapter.java +++ b/src/main/java/com/jwebmp/core/events/rightclick/RightClickAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.rightclick; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,7 +82,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnRightClickService.class, ServiceLoader.load(IOnRightClickService.class)); services.forEach(service -> service.onCall(this)); } @@ -102,8 +103,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnRightClickService.class, ServiceLoader.load(IOnRightClickService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnRightClickService.class, ServiceLoader.load(IOnRightClickService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/search/SearchAdapter.java b/src/main/java/com/jwebmp/core/events/search/SearchAdapter.java index 9b32466e1..bf6498125 100644 --- a/src/main/java/com/jwebmp/core/events/search/SearchAdapter.java +++ b/src/main/java/com/jwebmp/core/events/search/SearchAdapter.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.events.search; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,8 +81,8 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnSearchService.class, ServiceLoader.load(IOnSearchService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnSearchService.class, ServiceLoader.load(IOnSearchService.class)); services.forEach(service -> service.onCall(this)); } @@ -103,8 +103,8 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnSearchService.class, ServiceLoader.load(IOnSearchService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnSearchService.class, ServiceLoader.load(IOnSearchService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/select/SelectAdapter.java b/src/main/java/com/jwebmp/core/events/select/SelectAdapter.java index d61036f01..90fe36c5c 100644 --- a/src/main/java/com/jwebmp/core/events/select/SelectAdapter.java +++ b/src/main/java/com/jwebmp/core/events/select/SelectAdapter.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.events.select; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,8 +81,8 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnSelectService.class, ServiceLoader.load(IOnSelectService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnSelectService.class, ServiceLoader.load(IOnSelectService.class)); services.forEach(service -> service.onCall(this)); } @@ -103,8 +103,8 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnSelectService.class, ServiceLoader.load(IOnSelectService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnSelectService.class, ServiceLoader.load(IOnSelectService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/selected/SelectedAdapter.java b/src/main/java/com/jwebmp/core/events/selected/SelectedAdapter.java index c9a6390bc..1c1eaacbb 100644 --- a/src/main/java/com/jwebmp/core/events/selected/SelectedAdapter.java +++ b/src/main/java/com/jwebmp/core/events/selected/SelectedAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.selected; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -84,7 +85,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnSelectedService.class, ServiceLoader.load(IOnSelectedService.class)); services.forEach(service -> service.onCall(this)); } @@ -106,8 +107,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnSelectedService.class, ServiceLoader.load(IOnSelectedService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnSelectedService.class, ServiceLoader.load(IOnSelectedService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/selecting/SelectingAdapter.java b/src/main/java/com/jwebmp/core/events/selecting/SelectingAdapter.java index 41a4d3220..5ae590f0f 100644 --- a/src/main/java/com/jwebmp/core/events/selecting/SelectingAdapter.java +++ b/src/main/java/com/jwebmp/core/events/selecting/SelectingAdapter.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.events.selecting; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,8 +81,8 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnSelectingService.class, ServiceLoader.load(IOnSelectingService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnSelectingService.class, ServiceLoader.load(IOnSelectingService.class)); services.forEach(service -> service.onCall(this)); } @@ -102,8 +102,8 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnSelectingService.class, ServiceLoader.load(IOnSelectingService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnSelectingService.class, ServiceLoader.load(IOnSelectingService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/slide/SlideAdapter.java b/src/main/java/com/jwebmp/core/events/slide/SlideAdapter.java index 6213228b1..da5ad5eb0 100644 --- a/src/main/java/com/jwebmp/core/events/slide/SlideAdapter.java +++ b/src/main/java/com/jwebmp/core/events/slide/SlideAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.slide; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -80,8 +81,9 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnSlideService.class, ServiceLoader.load(IOnSlideService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnSlideService.class, ServiceLoader.load(IOnSlideService.class)); services.forEach(service -> service.onCall(this)); } @@ -102,7 +104,7 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnSlideService.class, ServiceLoader.load(IOnSlideService.class)); services.forEach(service -> service.onCreate(this)); } diff --git a/src/main/java/com/jwebmp/core/events/sort/SortAdapter.java b/src/main/java/com/jwebmp/core/events/sort/SortAdapter.java index fc88ed4c5..aa6123754 100644 --- a/src/main/java/com/jwebmp/core/events/sort/SortAdapter.java +++ b/src/main/java/com/jwebmp/core/events/sort/SortAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.sort; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -89,7 +90,7 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnSortService.class, ServiceLoader.load(IOnSortService.class)); services.forEach(service -> service.onCreate(this)); } @@ -99,8 +100,9 @@ private void onCreate() */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnSortService.class, ServiceLoader.load(IOnSortService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnSortService.class, ServiceLoader.load(IOnSortService.class)); services.forEach(service -> service.onCall(this)); } diff --git a/src/main/java/com/jwebmp/core/events/spin/SpinAdapter.java b/src/main/java/com/jwebmp/core/events/spin/SpinAdapter.java index 174740185..6048a4576 100644 --- a/src/main/java/com/jwebmp/core/events/spin/SpinAdapter.java +++ b/src/main/java/com/jwebmp/core/events/spin/SpinAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.spin; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,7 +82,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnSpinService.class, ServiceLoader.load(IOnSpinService.class)); services.forEach(service -> service.onCall(this)); } @@ -102,8 +103,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnSpinService.class, ServiceLoader.load(IOnSpinService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnSpinService.class, ServiceLoader.load(IOnSpinService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/start/StartAdapter.java b/src/main/java/com/jwebmp/core/events/start/StartAdapter.java index 1f0ae4186..b5f555976 100644 --- a/src/main/java/com/jwebmp/core/events/start/StartAdapter.java +++ b/src/main/java/com/jwebmp/core/events/start/StartAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.start; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -80,7 +81,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnStartService.class, ServiceLoader.load(IOnStartService.class)); services.forEach(service -> service.onCall(this)); } @@ -101,8 +102,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnStartService.class, ServiceLoader.load(IOnStartService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnStartService.class, ServiceLoader.load(IOnStartService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/stop/StopAdapter.java b/src/main/java/com/jwebmp/core/events/stop/StopAdapter.java index b0eb9f058..f1ca21798 100644 --- a/src/main/java/com/jwebmp/core/events/stop/StopAdapter.java +++ b/src/main/java/com/jwebmp/core/events/stop/StopAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.stop; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -80,7 +81,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnStopService.class, ServiceLoader.load(IOnStopService.class)); services.forEach(service -> service.onCall(this)); } @@ -101,8 +102,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnStopService.class, ServiceLoader.load(IOnStopService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnStopService.class, ServiceLoader.load(IOnStopService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/submit/SubmitAdapter.java b/src/main/java/com/jwebmp/core/events/submit/SubmitAdapter.java index 9243a1a80..85f9bef8c 100644 --- a/src/main/java/com/jwebmp/core/events/submit/SubmitAdapter.java +++ b/src/main/java/com/jwebmp/core/events/submit/SubmitAdapter.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.events.submit; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -94,8 +94,8 @@ public void fireEvent(AjaxCall call, AjaxResponse response) @SuppressWarnings({"rawtypes", "unchecked"}) private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnSubmitService.class, ServiceLoader.load(IOnSubmitService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnSubmitService.class, ServiceLoader.load(IOnSubmitService.class)); services.forEach(service -> service.onCall(this)); } @@ -117,8 +117,8 @@ public void preConfigure() private void onCreate() { @SuppressWarnings({"rawtypes", "unchecked"}) - Set services = GuiceContext.instance() - .getLoader(IOnSubmitService.class, ServiceLoader.load(IOnSubmitService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnSubmitService.class, ServiceLoader.load(IOnSubmitService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/unselected/UnselectedAdapter.java b/src/main/java/com/jwebmp/core/events/unselected/UnselectedAdapter.java index 412914d40..0842363cf 100644 --- a/src/main/java/com/jwebmp/core/events/unselected/UnselectedAdapter.java +++ b/src/main/java/com/jwebmp/core/events/unselected/UnselectedAdapter.java @@ -16,7 +16,8 @@ */ package com.jwebmp.core.events.unselected; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,7 +82,7 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() + Set services = IGuiceContext.instance() .getLoader(IOnUnSelectedService.class, ServiceLoader.load(IOnUnSelectedService.class)); services.forEach(service -> service.onCall(this)); } @@ -102,8 +103,9 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnUnSelectedService.class, ServiceLoader.load(IOnUnSelectedService.class)); + Set services = IGuiceContext + .instance() + .getLoader(IOnUnSelectedService.class, ServiceLoader.load(IOnUnSelectedService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/events/update/UpdateAdapter.java b/src/main/java/com/jwebmp/core/events/update/UpdateAdapter.java index 696d7fbdc..3f38b4388 100644 --- a/src/main/java/com/jwebmp/core/events/update/UpdateAdapter.java +++ b/src/main/java/com/jwebmp/core/events/update/UpdateAdapter.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.events.update; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -81,8 +81,8 @@ public void fireEvent(AjaxCall call, AjaxResponse response) */ private void onCall() { - Set services = GuiceContext.instance() - .getLoader(IOnUpdateService.class, ServiceLoader.load(IOnUpdateService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnUpdateService.class, ServiceLoader.load(IOnUpdateService.class)); services.forEach(service -> service.onCall(this)); } @@ -102,8 +102,8 @@ public void preConfigure() @SuppressWarnings("unchecked") private void onCreate() { - Set services = GuiceContext.instance() - .getLoader(IOnUpdateService.class, ServiceLoader.load(IOnUpdateService.class)); + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnUpdateService.class, ServiceLoader.load(IOnUpdateService.class)); services.forEach(service -> service.onCreate(this)); } } diff --git a/src/main/java/com/jwebmp/core/generics/CompassPoints.java b/src/main/java/com/jwebmp/core/generics/CompassPoints.java deleted file mode 100644 index abc8c9c1e..000000000 --- a/src/main/java/com/jwebmp/core/generics/CompassPoints.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.generics; - -/** - * Specifies all the 8 point Compass Points - * - * @author MMagon - *

- * History : Previously Resize Handler Points - * @version 1.0 - * @since 2014/05/16 - */ - -public enum CompassPoints -{ - /** - * North - */ - N, - /** - * East - */ - E, - /** - * South - */ - S, - /** - * West - */ - W, - /** - * North-East - */ - NE, - /** - * South-East - */ - SE, - /** - * South West - */ - SW, - /** - * North West - */ - NW, - /** - * All Handles - */ - ALL; - - /** - * Returns the name of this Resize Handler - * - * @return Lowercase Name - */ - @Override - public String toString() - { - return name().toLowerCase(); - - } -} diff --git a/src/main/java/com/jwebmp/core/generics/Direction.java b/src/main/java/com/jwebmp/core/generics/Direction.java deleted file mode 100644 index a2f1aee62..000000000 --- a/src/main/java/com/jwebmp/core/generics/Direction.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.generics; - -/** - * Horizontal or Vertical - *

- * - * @author MMagon - *

- *

- * @since Directions - */ -public enum Direction -{ - - /** - * A Horizontal Direction - */ - Horizontal, - /** - * A Vertical Direction - */ - Vertical; - - @Override - public String toString() - { - return super.toString() - .toLowerCase(); - } - -} diff --git a/src/main/java/com/jwebmp/core/generics/HorizontalOrVertical.java b/src/main/java/com/jwebmp/core/generics/HorizontalOrVertical.java deleted file mode 100644 index fe58e3bf0..000000000 --- a/src/main/java/com/jwebmp/core/generics/HorizontalOrVertical.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.jwebmp.core.generics; - -public enum HorizontalOrVertical -{ - Horizontal, - Vertical; - - @Override - public String toString() - { - return name().toLowerCase(); - } -} diff --git a/src/main/java/com/jwebmp/core/generics/LatitudeLongitueArray.java b/src/main/java/com/jwebmp/core/generics/LatitudeLongitueArray.java deleted file mode 100644 index 654f94fa2..000000000 --- a/src/main/java/com/jwebmp/core/generics/LatitudeLongitueArray.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.generics; - -/** - * A lat long array [lat,long] - * - * @author GedMarc - * @since 10 Jun 2017 - */ -public class LatitudeLongitueArray - extends XYObject -{ - - - /* - * Constructs a new LatitudeLongitueArray. X is latitude usually - */ - public LatitudeLongitueArray() - { - //Nothing needed - } - - /** - * Sets the parameters - * - * @param X - * Latitude - * @param Y - * Longitude - */ - public LatitudeLongitueArray(Double X, Double Y) - { - super(X, Y); - } -} diff --git a/src/main/java/com/jwebmp/core/generics/LeftOrRight.java b/src/main/java/com/jwebmp/core/generics/LeftOrRight.java deleted file mode 100644 index 5082bcd24..000000000 --- a/src/main/java/com/jwebmp/core/generics/LeftOrRight.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.generics; - -/** - * Left or Right - * - * @author GedMarc - * @since 09 Jun 2017 - */ -public enum LeftOrRight -{ - Left, - Right; - /** - * Any sub data - */ - private String data; - - /** - * A new LeftOrRight - */ - LeftOrRight() - { - - } - - /** - * Returns the name or the data contained within - * - * @return - */ - @Override - public String toString() - { - if (data != null && !data.isEmpty()) - { - return data; - } - else - { - return name().toLowerCase(); - } - } -} diff --git a/src/main/java/com/jwebmp/core/generics/Pair.java b/src/main/java/com/jwebmp/core/generics/Pair.java deleted file mode 100644 index a771ddd45..000000000 --- a/src/main/java/com/jwebmp/core/generics/Pair.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.generics; - -import com.jwebmp.core.base.html.interfaces.NamedPair; - -import java.util.Comparator; - -/** - * Denotes a pair of anything. Left side master right side is slave - * - * @param - * Left Side Type - * @param - * Right Side Type - * - * @author MMagon - */ -public class Pair - implements NamedPair, Comparable, Comparator -{ - - - private static boolean leftOnly = true; - /** - * The left side - */ - protected L left; - /** - * The right side - */ - protected R right; - - public Pair() - { - } - - /** - * Constructs a new pair - * - * @param left - * @param right - */ - public Pair(L left, R right) - { - this.left = left; - this.right = right; - } - - /** - * Returns if this pair is set to validate on the left field only - *

- * - * @return - */ - public static boolean isLeftOnly() - { - return leftOnly; - } - - /** - * Sets if this pair should validate on the left pair only - *

- * - * @param leftOnly - */ - public static void setLeftOnly(boolean leftOnly) - { - Pair.leftOnly = leftOnly; - } - - @Override - public int compare(Pair o1, Pair o2) - { - return o1.left.toString() - .compareTo(o2.left.toString()); - } - - @Override - public int compareTo(Pair o) - { - if (o == null) - { - return -1; - } - return left.toString() - .compareTo(o.left.toString()); - } - - @Override - public int hashCode() - { - return left.hashCode() ^ right.hashCode(); - } - - @Override - public boolean equals(Object o) - { - if (o == null) - { - return false; - } - if (!(o instanceof Pair)) - { - return false; - } - Pair pairo = (Pair) o; - return left.equals(pairo.getLeft()) && right.equals(pairo.getRight()); - } - - /** - * Gets the left side - * - * @return - */ - @Override - public L getLeft() - { - return left; - } - - public void setLeft(L left) - { - this.left = left; - } - - /** - * Gets the right side - * - * @return - */ - @Override - public R getRight() - { - return right; - } - - public void setRight(R right) - { - this.right = right; - } - -} diff --git a/src/main/java/com/jwebmp/core/generics/Positions.java b/src/main/java/com/jwebmp/core/generics/Positions.java deleted file mode 100644 index d9d7ff8c5..000000000 --- a/src/main/java/com/jwebmp/core/generics/Positions.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.generics; - -/** - * Top bottom right and left - * - * @author GedMarc - * @since 13 Jun 2017 - */ -public enum Positions -{ - Top, - Bottom, - Right, - Left; - /** - * Any sub data - */ - private String data; - - /** - * A new Positions - */ - Positions() - { - - } - - /** - * Returns the name or the data contained within - * - * @return - */ - @Override - public String toString() - { - if (data != null && !data.isEmpty()) - { - return data; - } - else - { - return name().toLowerCase(); - } - } -} diff --git a/src/main/java/com/jwebmp/core/generics/TopOrBottom.java b/src/main/java/com/jwebmp/core/generics/TopOrBottom.java deleted file mode 100644 index a95f1e5d7..000000000 --- a/src/main/java/com/jwebmp/core/generics/TopOrBottom.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.generics; - -/** - * Top or Bottom - * - * @author GedMarc - * @since 09 Jun 2017 - */ -public enum TopOrBottom -{ - Top, - Bottom; - /** - * Any sub data - */ - private String data; - - /** - * A new LeftOrRight - */ - TopOrBottom() - { - - } - - /** - * Returns the name or the data contained within - * - * @return - */ - @Override - public String toString() - { - if (data != null && !data.isEmpty()) - { - return data; - } - else - { - return name().toLowerCase(); - } - } -} diff --git a/src/main/java/com/jwebmp/core/generics/WebReference.java b/src/main/java/com/jwebmp/core/generics/WebReference.java deleted file mode 100644 index 3641195aa..000000000 --- a/src/main/java/com/jwebmp/core/generics/WebReference.java +++ /dev/null @@ -1,728 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.generics; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.guicedee.services.jsonrepresentation.json.StaticStrings; -import com.jwebmp.core.SessionHelper; -import com.jwebmp.core.base.html.interfaces.NamedPair; -import com.jwebmp.core.base.servlets.enumarations.RequirementsPriority; -import jakarta.validation.constraints.NotNull; -import lombok.extern.java.Log; - -import java.io.Serializable; -import java.util.*; -import java.util.logging.Level; - -/** - * Denotes a specific Web Reference, either remotely or locally - * - * @param The type implementation - * @author MMagon - *

- * 2.0 Added Sorting - * @version 2.0 - * @since Forever - */ -@SuppressWarnings("unused") -@Log -public class WebReference> - implements NamedPair, Serializable, Comparator, Comparable -{ - - /** - * If the reference is local - */ - private static boolean isLocal = true; - /** - * To use min at the end or not - */ - private static boolean useMinAtEndOfExtension = false; - /** - * If the version number should be appended for caching - */ - private static boolean useVersionIdentifier = false; - /** - * The left side - */ - @JsonIgnore - private String left; - /** - * The right side - */ - @JsonIgnore - private String right; - /** - * If this must reference with the left side only - */ - @JsonIgnore - private boolean leftOnly = true; - /** - * The ridiculous sort order - */ - @JsonIgnore - private Integer sortOrder; - /** - * The default priority - */ - @JsonIgnore - private RequirementsPriority priority = RequirementsPriority.DontCare; - /** - * If the client can minify at the remote source - */ - @JsonIgnore - private boolean canMinifyAtRemote = true; - /** - * If this reference is a cordova reference, e.g. does it render in the dynamic site loader - */ - private boolean cordovaRequired = false; - /** - * The name of the reference - */ - private String name; - /** - * The specified version - */ - private Double version; - /** - * The local reference - */ - @JsonIgnore - private String localReference; - /** - * The remote reference - */ - @JsonIgnore - private String remoteReference; - /** - * A specified class name that can identify these classes on the html - */ - private String specifiedClassName; - /** - * Any additional options to be rendered with the reference - */ - private Set additionalOptions; - - private String linkId; - private final Map additionalAttributes = new LinkedHashMap<>(); - - /** - * Sets this JavaScript Reference with the Name, the Version - * - * @param name The Name of the Plugin - * @param version The version of the Plugin - * @param localReference The local Reference - * @param remoteReference The Remote Reference - */ - public WebReference(String name, Double version, String localReference, String remoteReference) - { - this(name, version, localReference, remoteReference, 500000); - } - - /** - * Sets this JavaScript Reference with the Name, the Version - * - * @param name The Name of the Plugin - * @param version The version of the Plugin - * @param localReference The local Reference - * @param remoteReference The Remote Reference - * @param sortOrder The Sorting Order for the Reference - */ - public WebReference(String name, Double version, String localReference, String remoteReference, int sortOrder) - { - left = localReference; - right = remoteReference; - - this.name = name; - this.version = version; - this.localReference = localReference; - this.remoteReference = remoteReference; - - this.sortOrder = sortOrder; - } - - /** - * Sets whether or not to use "min.js" or use a folder for the min directory - * - * @return if min is used - */ - public static boolean isUseMinAtEndOfExtension() - { - return useMinAtEndOfExtension; - } - - /** - * Sets whether or not to append min into the filename - * - * @param useMinAtEndOfExtension if min is used - */ - public static void setUseMinAtEndOfExtension(boolean useMinAtEndOfExtension) - { - WebReference.useMinAtEndOfExtension = useMinAtEndOfExtension; - } - - /** - * Sorts an Array List of References - * - * @param arrayList The list to apply - * @return the sorted list - */ - public static List> sort(List> arrayList) - { - arrayList.sort(WebReference::compareTo); - return arrayList; - } - - /** - * Gets the local reference - * - * @return A dummy sortable - */ - @Override - public String getLeft() - { - return localReference; - } - - /** - * Sets the local reference - * - * @param left Left side, local reference - * @return Always this - */ - @NotNull - @SuppressWarnings("unchecked") - public J setLeft(String left) - { - this.left = left; - localReference = left; - return (J) this; - } - - /** - * Sets the local reference - * - * @return Right side remote reference - */ - @Override - public String getRight() - { - return remoteReference; - } - - /** - * Sets the remote reference - * - * @param right The remote reference - * @return Always this - */ - @NotNull - @SuppressWarnings("unchecked") - public J setRight(String right) - { - this.right = right; - remoteReference = right; - return (J) this; - } - - /** - * Returns if this pair is set to validate on the left field only - * - * @return Local only - */ - public boolean isLeftOnly() - { - return leftOnly; - } - - /** - * Sets if this pair should validate on the left pair only - * - * @param leftOnly if local only - * @return always this - */ - @NotNull - @SuppressWarnings("unchecked") - public J setLeftOnly(boolean leftOnly) - { - this.leftOnly = leftOnly; - return (J) this; - } - - /** - * Gets the double version of this reference - * - * @return the version double - */ - public Double getVersion() - { - return version; - } - - /** - * Sets the double version of this reference - * - * @param version the version of the reference - * @return Always this - */ - @NotNull - @SuppressWarnings("unchecked") - public J setVersion(Double version) - { - this.version = version; - return (J) this; - } - - /** - * Compares two references to each other on sort order - * - * @param o1 Compares - * @param o2 Copmares - * @return 0,-1,or 1 - */ - @Override - public int compare(WebReference o1, WebReference o2) - { - if (o1.getSortOrder() - .compareTo(o2.getSortOrder()) == 0) - { - return o1.toString() - .compareTo(o2.toString()); - } - return o1.getSortOrder() - .compareTo(o2.getSortOrder()); - } - - /** - * Default Sort Order - *

- * 0 - Root (JQuery) - * 5 - Core - * 10 - Core Accompanied - * 15 - Stand Alone Components - * 20 - Complex Components - * 500k - Default - * 600k - Atmosphere Reserved - * - * @return The current sort order - */ - public Integer getSortOrder() - { - return sortOrder; - } - - /** - * Default Sort Order - *

- * 0 - Root (JQuery) 5 - Core 10 - Core Accompanied 15 - Stand Alone Components 20 - Complex Components 500k - Default 600k - - * Atmosphere Reserved - *

- * - * @param sortOrder The sort order to apply - * @return Always this - */ - @NotNull - @SuppressWarnings("unchecked") - public final J setSortOrder(Integer sortOrder) - { - this.sortOrder = sortOrder; - return (J) this; - } - - /** - * Returns either the local or remote reference depending on configuration - *

- * - * @return Always this - */ - @Override - @JsonProperty("reference") - public final String toString() - { - StringBuilder sb = new StringBuilder(); - if (isIsLocal()) - { - sb.append(getLocalReference()); - if (useMinAtEndOfExtension && !sb.toString() - .contains(".min.")) - { - sb.insert(sb.lastIndexOf(StaticStrings.STRING_DOT), ".min"); - } - - try - { - if ((!(sb.toString() - .toLowerCase() - .startsWith("http://") || sb.toString() - .toLowerCase() - .startsWith("https://") || sb.toString() - .startsWith("//")))) - { - sb = renderUrlString(sb); - } - - } - catch (NoClassDefFoundError | Exception e) - { - log.log(Level.WARNING, "Error in getting url to append to the web reference", e); - } - } - else - { - sb.append(getRemoteReference()); - if (useMinAtEndOfExtension && isCanMinifyAtRemote() && !sb.toString() - .contains(".min.")) - { - sb.insert(sb.lastIndexOf(StaticStrings.STRING_DOT), ".min"); - } - } - sb.append("?"); - if (isUseVersionIdentifier()) - { - sb.append("v=") - .append(version); - } - - return sb.toString(); - } - - /** - * Whether or not to return the local reference or the remote reference - * - * @return Always this - */ - @JsonProperty("local") - public static boolean isIsLocal() - { - return isLocal; - } - - /** - * Sets whether this reference should be local or remote - * - * @param isLocal If local references must be used - */ - public static void setIsLocal(boolean isLocal) - { - WebReference.isLocal = isLocal; - } - - /** - * Gets the physical local reference - * - * @return The local reference - */ - public String getLocalReference() - { - return localReference; - } - - /** - * Sets the physical local reference - * - * @param localReference The local reference - * @return Always this - */ - @NotNull - @SuppressWarnings({"unchecked", "UnusedReturnValue"}) - public J setLocalReference(String localReference) - { - setLeft(localReference); - this.localReference = localReference; - return (J) this; - } - - /** - * Renders the actual URL String - * - * @param sb The string builder - * @return The url to build - */ - private StringBuilder renderUrlString(StringBuilder sb) - { - try - { - String url = SessionHelper.getServerPath(); - if (url == null) - { - url = StaticStrings.STRING_EMPTY; - } - else - { - url += StaticStrings.STRING_EMPTY; - } - sb = sb.insert(0, url); - return sb; - } - catch (Exception e) - { - log.log(Level.WARNING, "Error in getting url reference", e); - } - return sb; - } - - /** - * Gets the physical remote reference - * - * @return The remote reference - */ - public String getRemoteReference() - { - return remoteReference; - } - - /** - * Sets the remote physical reference - * - * @param remoteReference The remote reference - * @return Always this - */ - @NotNull - @SuppressWarnings({"unchecked", "UnusedReturnValue"}) - public J setRemoteReference(String remoteReference) - { - setRight(remoteReference); - this.remoteReference = remoteReference; - return (J) this; - } - - /** - * Specifies if the remote has a min file - * - * @return if minify with remote reference is allowed - */ - @SuppressWarnings("WeakerAccess") - public boolean isCanMinifyAtRemote() - { - return canMinifyAtRemote; - } - - /** - * If the version number should be appended for caching - * - * @return if version identification is enabled - */ - @SuppressWarnings("WeakerAccess") - public static boolean isUseVersionIdentifier() - { - return useVersionIdentifier; - } - - /** - * If the version number should be appended for caching - * - * @param useVersionIdentifier If version identification is enabled - */ - public static void setUseVersionIdentifier(boolean useVersionIdentifier) - { - WebReference.useVersionIdentifier = useVersionIdentifier; - } - - /** - * Specifies if the remote has a min file - * - * @param canMinifyAtRemote If verifying on remote is allowed - * @return Always this - */ - @NotNull - @SuppressWarnings({"unchecked", "UnusedReturnValue"}) - public J setCanMinifyAtRemote(boolean canMinifyAtRemote) - { - this.canMinifyAtRemote = canMinifyAtRemote; - return (J) this; - } - - /** - * Return the priority of the reference - * - * @return The current priority - */ - public RequirementsPriority getPriority() - { - return priority; - } - - /** - * Sets the priority of the reference - * - * @param priority The given priority to apply - * @return Always this - */ - @NotNull - @SuppressWarnings("unchecked") - public J setPriority(RequirementsPriority priority) - { - this.priority = priority; - return (J) this; - } - - /** - * If this reference is a cordova reference, e.g. does it render in the dynamic site loader - *

- * if cordova is required - */ - public boolean isCordovaRequired() - { - return cordovaRequired; - } - - /** - * If this reference is a cordova reference, e.g. does it render in the dynamic site loader - * - * @param cordovaRequired If cordova is requierd - * @return Always this - */ - @NotNull - @SuppressWarnings("unchecked") - public J setCordovaRequired(boolean cordovaRequired) - { - this.cordovaRequired = cordovaRequired; - return (J) this; - } - - /** - * A specified class name that can identify these classes on the html - * - * @return A name to apply to the "class" attribute - */ - public String getSpecifiedClassName() - { - return specifiedClassName; - } - - /** - * A specified class name that can identify these classes on the html - * - * @param specifiedClassName A class string to add - */ - @SuppressWarnings("unchecked") - @NotNull - public J setSpecifiedClassName(String specifiedClassName) - { - this.specifiedClassName = specifiedClassName; - return (J) this; - } - - @Override - @SuppressWarnings("all") - public int compareTo(WebReference o) - { - if (o == null) - { - return 1; - } - if (getSortOrder().compareTo(o.getSortOrder()) == 0) - { - return getName().compareTo(o.getName()); - } - return getSortOrder().compareTo(o.getSortOrder()); - } - - /** - * Gets the name of this reference - * - * @return the name of this reference - */ - public String getName() - { - return name; - } - - /** - * Sets the name of this reference - * - * @param name The name of this reference - * @return Always this - */ - @NotNull - @SuppressWarnings("unchecked") - public J setName(String name) - { - this.name = name; - return (J) this; - } - - /** - * Returns any additional items in the tag that should be rendered - * - * @return The set - */ - @NotNull - public Set getAdditionalOptions() - { - if (additionalOptions == null) - { - additionalOptions = new LinkedHashSet<>(); - } - return additionalOptions; - } - - /** - * Sets the options to something specific - * - * @param additionalOptions The options to add to the tag - * @return The tag - */ - @NotNull - public WebReference setAdditionalOptions(Set additionalOptions) - { - this.additionalOptions = additionalOptions; - return this; - } - - /** - * Gets the id that must be applied to the link that is generated - * - * @return - */ - public String getLinkId() - { - return linkId; - } - - /** - * Sets the link id that must be applied when it is generated - * - * @param linkId - * @return - */ - @SuppressWarnings("unchecked") - public J setLinkId(String linkId) - { - this.linkId = linkId; - return (J) this; - } - - /** - * Adds a new attribute to be rendered - * @param key - * @param value - * @return - */ - @SuppressWarnings("unchecked") - public J addAttribute(String key, String value) - { - additionalAttributes.put(key, value); - return (J)this; - } - - public Map getAdditionalAttributes() - { - return additionalAttributes; - } -} diff --git a/src/main/java/com/jwebmp/core/generics/XYObject.java b/src/main/java/com/jwebmp/core/generics/XYObject.java deleted file mode 100644 index ac69f416d..000000000 --- a/src/main/java/com/jwebmp/core/generics/XYObject.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.generics; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonRawValue; -import com.fasterxml.jackson.annotation.JsonValue; -import com.guicedee.services.jsonrepresentation.json.StaticStrings; -import org.apache.commons.lang3.StringUtils; - -import java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * This Class is basic XY Co-Ordinates - * - * @param - * x Co-Ordinate Class - * @param - * y Co-Ordinate class - * - * @author GedMarc - * @since 25 Dec 2015 - */ -public class XYObject - -{ - - - private final SimpleDateFormat outputFormat; - - @JsonIgnore - private X X; - @JsonIgnore - private Y Y; - - /** - * Constructs a blank XY Object - */ - public XYObject() - { - outputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - } - - /** - * Constructs with this XY Object - * - * @param X - * @param Y - */ - public XYObject(X X, Y Y) - { - outputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - this.X = X; - this.Y = Y; - } - - /** - * An Array Representation [X,Y] - * - * @return - */ - @Override - @JsonValue - @JsonRawValue - public String toString() - { - if (getX() != null && getY() != null) - { - if (!StringUtils.isNumericSpace(getX().toString())) - { - if (getX() instanceof Date) - { - return "['" + outputFormat.format((Date) getX()) + "'," + getY() + "]"; - } - else if (getX() instanceof String) - { - return "['" + getX() + "'," + getY() + "]"; - } - } - return "[" + getX() + StaticStrings.STRING_COMMNA + getY() + "]"; - } - return "[]"; - } - - /** - * Returns X - * - * @return - */ - public X getX() - { - return X; - } - - /** - * Sets X - * - * @param X - */ - public void setX(X X) - { - this.X = X; - } - - /** - * Returns Y - * - * @return - */ - public Y getY() - { - return Y; - } - - /** - * Sets Y - * - * @param Y - */ - public void setY(Y Y) - { - this.Y = Y; - } - -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/CSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/CSS.java index c00a0504b..4ecef5d5a 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/CSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/CSS.java @@ -1,7 +1,7 @@ package com.jwebmp.core.htmlbuilder.css; import com.jwebmp.core.htmlbuilder.css.animatable.AnimateCSS; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.backgrounds.BackgroundCSS; import com.jwebmp.core.htmlbuilder.css.borders.BorderCSS; import com.jwebmp.core.htmlbuilder.css.displays.DisplayCSS; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSDetail.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSDetail.java index e56b49b97..47c0af3a8 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSDetail.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSDetail.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSEnumeration.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSEnumeration.java deleted file mode 100644 index 4a0d0377f..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSEnumeration.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2016 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.htmlbuilder.css; - -import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; - -/** - * Defines an enumeration as CSS - * Fills all the information required for a CSS Field - * - * @author GedMarc - * @since 17 Jan 2016 - */ -@CSSAnnotationType -public interface CSSEnumeration -{ - - /** - * Returns the Enumeration Name in its clean form - * - * @return The Formatted Output for the enumeration - */ - @Override - String toString(); - - /** - * Returns the JavaScript CSS Property form - * - * @return - */ - String getJavascriptSyntax(); - - /** - * Returns the CSS Version this enumeration is compatible with - * - * @return - */ - CSSVersions getCSSVersion(); - - /** - * Returns the value of this CSS Option. - * Usually the name of the Enumeration - * - * @return - */ - String getValue(); - - /** - * Returns the default, AKA exclude render - * - * @return The member to never render, as it is the default - */ - T getDefault(); - -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSImpl.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSImpl.java index 2d41662f2..ab4664598 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSImpl.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSImpl.java @@ -17,6 +17,7 @@ package com.jwebmp.core.htmlbuilder.css; +import com.jwebmp.core.base.interfaces.*; import com.jwebmp.core.htmlbuilder.css.animatable.AnimateCSSImpl; import com.jwebmp.core.htmlbuilder.css.annotations.CSSImplementationAdapter; import com.jwebmp.core.htmlbuilder.css.annotations.CSSImplementationClass; @@ -45,7 +46,7 @@ */ public class CSSImpl extends CSSImplementationAdapter - implements CSSImplementationClass + implements CSSImplementationClass, ICSSImpl { diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSPropertiesFactory.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSPropertiesFactory.java index 5d16c68e3..69e21785d 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSPropertiesFactory.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/CSSPropertiesFactory.java @@ -19,13 +19,13 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.google.common.collect.Lists; import com.guicedee.services.jsonrepresentation.json.StaticStrings; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.annotations.CSSImplementationClass; import com.jwebmp.core.htmlbuilder.css.colours.ColourCSSImpl; import com.jwebmp.core.htmlbuilder.css.composer.CSSBlock; import com.jwebmp.core.htmlbuilder.css.composer.CSSBlockIdentifier; import com.jwebmp.core.htmlbuilder.css.composer.CSSLine; -import com.jwebmp.core.htmlbuilder.css.enumarations.CSSTypes; +import com.jwebmp.core.htmlbuilder.css.enumarations.*; import com.jwebmp.core.htmlbuilder.css.image.ImageCSS; import com.jwebmp.core.htmlbuilder.css.interfaces.CSSShortHand; import com.jwebmp.core.htmlbuilder.css.measurement.MeasurementCSS; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/animatable/AnimateCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/animatable/AnimateCSS.java index 273b25be4..e3c83bfc7 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/animatable/AnimateCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/animatable/AnimateCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.animatable; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/annotations/CSSAnnotationType.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/annotations/CSSAnnotationType.java deleted file mode 100644 index 4a025ca56..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/annotations/CSSAnnotationType.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.htmlbuilder.css.annotations; - -import java.lang.annotation.*; - -/** - * Class that registers the Annotation Type as a CSS Reader - * - * @author GedMarc - * @since 2016/01/17 - */ -@Target({ElementType.FIELD, ElementType.TYPE, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE, ElementType.METHOD, ElementType.TYPE_PARAMETER, ElementType.TYPE_USE}) -@Retention(RetentionPolicy.RUNTIME) -@Inherited -@Documented -public @interface CSSAnnotationType -{ - -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/annotations/CSSImplementationAdapter.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/annotations/CSSImplementationAdapter.java index 0ced7a70f..12256ed5e 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/annotations/CSSImplementationAdapter.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/annotations/CSSImplementationAdapter.java @@ -20,8 +20,9 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; +import com.guicedee.client.*; import com.jwebmp.core.htmlbuilder.css.CSSPropertiesFactory; -import com.guicedee.guicedinjection.GuiceContext; + import lombok.extern.java.Log; @@ -129,11 +130,12 @@ public String toString() { try { - return GuiceContext.get(ObjectMapper.class) - .writer() - .withoutFeatures(SerializationFeature.INDENT_OUTPUT) - .withoutFeatures(WRITE_ENUMS_USING_TO_STRING) - .writeValueAsString(this); + return IGuiceContext + .get(ObjectMapper.class) + .writer() + .withoutFeatures(SerializationFeature.INDENT_OUTPUT) + .withoutFeatures(WRITE_ENUMS_USING_TO_STRING) + .writeValueAsString(this); } catch (Exception e) { diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/annotations/CustomCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/annotations/CustomCSS.java index 3545e24b8..88a40c051 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/annotations/CustomCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/annotations/CustomCSS.java @@ -17,6 +17,7 @@ package com.jwebmp.core.htmlbuilder.css.annotations; +import com.jwebmp.core.htmlbuilder.css.enumarations.*; import com.jwebmp.core.htmlbuilder.css.interfaces.NameValuePairCSS; import java.lang.annotation.*; @@ -26,7 +27,7 @@ * * @author mmagon */ -@com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType +@CSSAnnotationType @Target( { ElementType.FIELD, ElementType.TYPE, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE, ElementType.METHOD, ElementType.TYPE_PARAMETER, ElementType.TYPE_USE diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/Background.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/Background.java index f81f235bb..95501f2ba 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/Background.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/Background.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.backgrounds; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.colours.ColourCSS; import com.jwebmp.core.htmlbuilder.css.colours.ColourNames; import com.jwebmp.core.htmlbuilder.css.enumarations.Repeats; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundAttachments.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundAttachments.java index cdc857a11..bbc41f0cc 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundAttachments.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundAttachments.java @@ -17,7 +17,7 @@ package com.jwebmp.core.htmlbuilder.css.backgrounds; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; /** * Definition and Usage diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundBlendMode.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundBlendMode.java index 5ab3cc9a1..a6dbfab9f 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundBlendMode.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundBlendMode.java @@ -17,7 +17,7 @@ package com.jwebmp.core.htmlbuilder.css.backgrounds; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; import com.guicedee.services.jsonrepresentation.json.StaticStrings; /** diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundCSS.java index cf92bb38f..ad22ab71f 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.backgrounds; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.colours.ColourCSS; import com.jwebmp.core.htmlbuilder.css.colours.ColourNames; import com.jwebmp.core.htmlbuilder.css.enumarations.Repeats; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundClip.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundClip.java index c191be220..77923ba61 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundClip.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundClip.java @@ -17,7 +17,7 @@ package com.jwebmp.core.htmlbuilder.css.backgrounds; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; import com.guicedee.services.jsonrepresentation.json.StaticStrings; /** diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundOrigins.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundOrigins.java index 7569ccbca..13ade3fba 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundOrigins.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundOrigins.java @@ -17,7 +17,7 @@ package com.jwebmp.core.htmlbuilder.css.backgrounds; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; import com.guicedee.services.jsonrepresentation.json.StaticStrings; /** diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundPositions.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundPositions.java index 88a541922..beadabb54 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundPositions.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundPositions.java @@ -17,8 +17,8 @@ package com.jwebmp.core.htmlbuilder.css.backgrounds; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.guicedee.services.jsonrepresentation.json.StaticStrings; /** diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundSizes.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundSizes.java index fdee3e3b6..216d5a4ba 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundSizes.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/backgrounds/BackgroundSizes.java @@ -17,7 +17,7 @@ package com.jwebmp.core.htmlbuilder.css.backgrounds; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; import com.jwebmp.core.htmlbuilder.css.animatable.AnimateCSS; /** diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/Border.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/Border.java index a5e37dec3..f4bd78fe7 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/Border.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/Border.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.borders; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderBottomCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderBottomCSS.java index acddd3d35..e7be14ffd 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderBottomCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderBottomCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.borders; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.colours.ColourCSS; import com.jwebmp.core.htmlbuilder.css.colours.ColourNames; import com.jwebmp.core.htmlbuilder.css.enumarations.BorderStyles; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderCSS.java index 3ad859df0..62f947e6b 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.borders; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.colours.ColourCSS; import com.jwebmp.core.htmlbuilder.css.colours.ColourNames; import com.jwebmp.core.htmlbuilder.css.enumarations.BorderStyles; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderLeftCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderLeftCSS.java index c6999332f..a2be51d2c 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderLeftCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderLeftCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.borders; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.colours.ColourCSS; import com.jwebmp.core.htmlbuilder.css.colours.ColourNames; import com.jwebmp.core.htmlbuilder.css.enumarations.BorderStyles; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderRightCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderRightCSS.java index d2fdc302f..bb72485ad 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderRightCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderRightCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.borders; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.colours.ColourCSS; import com.jwebmp.core.htmlbuilder.css.colours.ColourNames; import com.jwebmp.core.htmlbuilder.css.enumarations.BorderStyles; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderTopCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderTopCSS.java index 1a33085e6..8c29aa8da 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderTopCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderTopCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.borders; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.colours.ColourCSS; import com.jwebmp.core.htmlbuilder.css.colours.ColourNames; import com.jwebmp.core.htmlbuilder.css.enumarations.BorderStyles; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourCSS.java index 7c88205b8..4af985dea 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourCSS.java @@ -1,6 +1,6 @@ package com.jwebmp.core.htmlbuilder.css.colours; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourNames.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourNames.java index 3fca1705a..cfb750430 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourNames.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourNames.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.colours; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; /** * Standard HTML Colours Based on the list referenced at http://www.w3schools.com/HTML/html_colornames.asp diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourRGB.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourRGB.java index da9be0bae..00fe8e78c 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourRGB.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourRGB.java @@ -1,6 +1,6 @@ package com.jwebmp.core.htmlbuilder.css.colours; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourRGBA.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourRGBA.java index 8ac7b18ba..69b5fbd95 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourRGBA.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/ColourRGBA.java @@ -17,7 +17,7 @@ package com.jwebmp.core.htmlbuilder.css.colours; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import java.lang.annotation.Documented; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/CssColour.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/CssColour.java index 786e6ca5d..b27130a6c 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/CssColour.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/colours/CssColour.java @@ -17,8 +17,8 @@ package com.jwebmp.core.htmlbuilder.css.colours; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; /** * @author GedMarc diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Cursors.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Cursors.java index f379e5ce4..803bf5763 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Cursors.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Cursors.java @@ -18,8 +18,8 @@ package com.jwebmp.core.htmlbuilder.css.displays; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; /** * Specifies the type of cursor to be displayed diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/DisplayCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/DisplayCSS.java index 9981a1df3..a413b93b3 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/DisplayCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/DisplayCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.displays; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.measurement.MeasurementCSS; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Displays.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Displays.java index 55890b242..b8e134dc6 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Displays.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Displays.java @@ -18,8 +18,8 @@ package com.jwebmp.core.htmlbuilder.css.displays; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; /** * Definition and Usage diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Floats.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Floats.java index cc2a49baa..2207dc355 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Floats.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Floats.java @@ -1,7 +1,7 @@ package com.jwebmp.core.htmlbuilder.css.displays; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; /** * The float property specifies whether or not an element should float. diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Overflows.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Overflows.java index e1c66ad10..da827aada 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Overflows.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Overflows.java @@ -18,8 +18,8 @@ package com.jwebmp.core.htmlbuilder.css.displays; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; /** * Definition and Usage diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Positions.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Positions.java index 70e3302a6..9e5aa2018 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Positions.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/displays/Positions.java @@ -18,8 +18,8 @@ package com.jwebmp.core.htmlbuilder.css.displays; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; /** * Definition and Usage diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/BorderStyles.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/BorderStyles.java deleted file mode 100644 index 945072f99..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/BorderStyles.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.jwebmp.core.htmlbuilder.css.enumarations; - -import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; - -/** - * Definition and Usage - *

- * The border-bottom-style property sets the style of an element's bottom border. - * Default value: not specified - * Inherited: no - * Version: CSS1 - * JavaScript syntax: object.style.borderBottomStyle="dotted" - *

- * - * @author GedMarc - */ -public enum BorderStyles - implements CSSEnumeration -{ - - /** - * Specifies no border - */ - None, - /** - * Specifies a dotted border - */ - Dotted, - /** - * Specifies a dashed border - */ - Dashed, - /** - * Specifies a solid border - */ - Solid, - /** - * Specifies a double border - */ - Double, - /** - * Specifies a 3d groove border - */ - Groove, - /** - * Specifies a 3D ridged border. The effect depends on the border-color value - */ - Ridge, - /** - * Specifies a 3D inset border. The effect depends on the border-color value - */ - Inset, - /** - * Specifies a 3D outset border. The effect depends on the border-color value - */ - Outset, - Unset; - - @Override - public String toString() - { - return super.toString() - .toLowerCase(); - } - - @Override - public String getJavascriptSyntax() - { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public CSSVersions getCSSVersion() - { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public String getValue() - { - return name(); - } - - @Override - public BorderStyles getDefault() - { - return Unset; - } - -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/CSSTypePosition.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/CSSTypePosition.java deleted file mode 100644 index 9413b9dd6..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/CSSTypePosition.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2016 ged_m - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.htmlbuilder.css.enumarations; - -/** - * Where to place the CSS Type name - * - * @author GedMarc - * @since 22 May 2016 - */ -public enum CSSTypePosition -{ - Before, - Middle, - After, - Wrap, - /** - * Sets this field as not set - */ - Unset -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/CSSTypes.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/CSSTypes.java deleted file mode 100644 index 062a25bda..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/CSSTypes.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.jwebmp.core.htmlbuilder.css.enumarations; - -/** - * Defines a specific CSS Type - * - * @author GedMarc - */ -public enum CSSTypes -{ - /** - * Specifies don't render any additional details - */ - None(1.0, "", CSSTypePosition.After), - /** - * Formats the CSS for a link object. - */ - Link(1.0, ":link", CSSTypePosition.After), - /** - * Formats the CSS for a link object. - */ - Visited(1.0, ":visited", CSSTypePosition.After), - /** - * Formats the CSS for a link object. - */ - Active(1.0, ":active", CSSTypePosition.After), - /** - * Formats the CSS for a link object. - */ - Hover(1.0, ":hover", CSSTypePosition.After), - /** - * The first letter of anything - */ - First_Letter(1.0, "::first-letter", CSSTypePosition.After), - /** - * The first line of anything - */ - First_Line(1.0, "::first-line", CSSTypePosition.After), - /** - * Everything - */ - Asterix(2.0, "*", CSSTypePosition.Before), - /** - * ::after p::after Insert something after the content of each p element - */ - After(2.0, "::after", CSSTypePosition.After), - /** - * ::before p::before Insert something before the content of each p element - */ - Before(2.0, "::before", CSSTypePosition.After), - /** - * :first-child p:first-child Selects every p element that is the first child of its parent - */ - First_Child(2.0, ":first-child", CSSTypePosition.After), - /** - * :focus input:focus Selects the input element which has focus - */ - Focus(2.0, "*", CSSTypePosition.After); - /** - * Where to place the position - */ - private final CSSTypePosition cssPosition; - /** - * The physical version of this CSS - */ - private double cssVersion; - /** - * The name to represent - */ - private String cssName; - - /** - * Constructs a new CSS Render Type - * - * @param cssVersion - * The version the CSS Render type works on - * @param cssName - * The physical display name of the selector - * @param cssPosition - * Where to place the type - */ - CSSTypes(double cssVersion, String cssName, CSSTypePosition cssPosition) - { - this.cssVersion = cssVersion; - this.cssName = cssName; - this.cssPosition = cssPosition; - } - - /** - * Returns the capable CSS Version - * - * @return - */ - public double getCssVersion() - { - return cssVersion; - } - - /** - * Sets the capable CSS Version - * - * @param cssVersion - */ - public void setCssVersion(double cssVersion) - { - this.cssVersion = cssVersion; - } - - /** - * Returns the CSS Name of this type - * - * @return - */ - public String getCssName() - { - return cssName; - } - - /** - * Returns the CSS Name of this type - * - * @param cssName - */ - public void setCssName(String cssName) - { - this.cssName = cssName; - } - - /** - * Returns where this CSS name type is placed - * - * @return - */ - public CSSTypePosition getCssPosition() - { - return cssPosition; - } -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/CssSelectorChainItem.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/CssSelectorChainItem.java deleted file mode 100644 index f879f7ac8..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/CssSelectorChainItem.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.jwebmp.core.htmlbuilder.css.enumarations; - -/** - * Defines a specific CSS Type - * - * @author GedMarc - */ -public enum CssSelectorChainItem -{ - /** - * element element div p Selects all p elements where the parent is a div element - */ - Parent(2.0, ">", CSSTypePosition.Middle), - /** - * [attribute] [target] Selects all elements with a target attribute - */ - Attribute(2.0, "[]", CSSTypePosition.Wrap), - /** - * [attribute=value] [target=_blank] Selects all elements with target="_blank" - */ - AttributeEquals(2.0, "=", CSSTypePosition.Middle), - /** - * [attribute~=value] [title~=flower] Selects all elements with a title attribute containing the word "flower" - */ - AttributeContaining(2.0, "~=", CSSTypePosition.Middle), - /** - * [attribute|=value] [lang|=en] Selects all elements with a lang attribute value starting with "en" - */ - AttributeStartsWith(2.0, "|=", CSSTypePosition.Middle),; - - /** - * Where to place the position - */ - private final CSSTypePosition cssPosition; - /** - * The physical version of this CSS - */ - private double cssVersion; - /** - * The name to represent - */ - private String cssName; - - CssSelectorChainItem(double cssVersion, String cssName, CSSTypePosition cssPosition) - { - this.cssVersion = cssVersion; - this.cssName = cssName; - this.cssPosition = cssPosition; - } - - /** - * Returns the capable CSS Version - * - * @return - */ - public double getCssVersion() - { - return cssVersion; - } - - /** - * Sets the capable CSS Version - * - * @param cssVersion - */ - public void setCssVersion(double cssVersion) - { - this.cssVersion = cssVersion; - } - - /** - * Returns the CSS Name of this type - * - * @return - */ - public String getCssName() - { - return cssName; - } - - /** - * Returns the CSS Name of this type - * - * @param cssName - */ - public void setCssName(String cssName) - { - this.cssName = cssName; - } - - /** - * Returns where this CSS name type is placed - * - * @return - */ - public CSSTypePosition getCssPosition() - { - return cssPosition; - } -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/MarginSetting.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/MarginSetting.java deleted file mode 100644 index 6dcb1c760..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/MarginSetting.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.jwebmp.core.htmlbuilder.css.enumarations; - -import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; - -/** - * @author MMagon - * @version 1.0 - * @since 24 Sep 2013 - */ -public enum MarginSetting - implements CSSEnumeration -{ - /** - * Sets to auto, use to center items - */ - Auto, - /** - * Inherit from parent - */ - Inherit, - /** - * None - */ - None, - - Unset; - - @Override - public String getJavascriptSyntax() - { - return "style.margin"; - } - - @Override - public CSSVersions getCSSVersion() - { - return CSSVersions.CSS3; - } - - @Override - public String getValue() - { - return name().toLowerCase(); - } - - @Override - public MarginSetting getDefault() - { - return Unset; - } -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/Repeats.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/Repeats.java deleted file mode 100644 index 3ec80147a..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/enumarations/Repeats.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.htmlbuilder.css.enumarations; - -import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; -import com.guicedee.services.jsonrepresentation.json.StaticStrings; - -/** - * Definition and Usage - *

- * The background-repeat property sets if/how a background image will be repeated. - *

- * By default, a background-image is repeated both vertically and horizontally.

- * Tip: The background image is placed according to the background-position property. - *

- * If no background-position is specified, the image is always placed at the element's top left corner. - *

- * Default value: repeat - *

- * Inherited: no - *

- * Animatable: no. Read about animatable - *

- * Version: CSS1 - *

- * JavaScript syntax: object.style.backgroundRepeat="repeat-x" - *

- * Try it - *

- * Browser Support - *

- *

- * The numbers in the table specify the first browser version that fully supports the property. - *

- * Property - *

- * background-repeat 1.0 12.0 4.0 1.0 1.0 3.5 - * - * @author GedMarc - * @since 17 Jan 2016 - */ -public enum Repeats - implements CSSEnumeration -{ - /** - * The background image will be repeated both vertically and horizontally. This is default - */ - Repeat, - /** - * The background image will be repeated only horizontally - */ - Repeat_x, - /** - * The background image will be repeated only vertically - */ - Repeat_y, - /** - * The background-image will not be repeated - */ - No_Repeat, - /** - * Sets this property to its default value - *

- * see http://www.w3schools.com/cssref/css_initial.asp - */ - Initial, - /** - * Inherits this property from its parent element. - *

- * see http://www.w3schools.com/cssref/css_inherit.asp - */ - Inherit, - Unset; - - @Override - public String toString() - { - return name().toLowerCase() - .replace(StaticStrings.CHAR_UNDERSCORE, StaticStrings.CHAR_DASH); - } - - @Override - public String getJavascriptSyntax() - { - return "style.backgroundRepeat"; - } - - @Override - public CSSVersions getCSSVersion() - { - return CSSVersions.CSS1; - } - - @Override - public String getValue() - { - return name(); - } - - @Override - public CSSEnumeration getDefault() - { - return Unset; - } -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontFamilies.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontFamilies.java index 464bad7a5..d06f1a480 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontFamilies.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontFamilies.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.fonts; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; import com.guicedee.services.jsonrepresentation.json.StaticStrings; /** diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontStyles.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontStyles.java index c265ab5b3..7943c69f3 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontStyles.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontStyles.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.fonts; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; /** * Definition and Usage diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontVariants.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontVariants.java index a911376da..645faa457 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontVariants.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontVariants.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.fonts; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; import com.guicedee.services.jsonrepresentation.json.StaticStrings; /** diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontWeights.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontWeights.java index fd1225419..44777ec12 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontWeights.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontWeights.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.fonts; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; /** * Definition and Usage diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontsCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontsCSS.java index 41795c77a..46198007e 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontsCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/fonts/FontsCSS.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.fonts; import com.jwebmp.core.htmlbuilder.css.CSSPropertiesFactory; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.measurement.MeasurementCSS; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/heightwidth/HeightSetting.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/heightwidth/HeightSetting.java index dae92b679..93cf9dfcc 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/heightwidth/HeightSetting.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/heightwidth/HeightSetting.java @@ -17,7 +17,7 @@ package com.jwebmp.core.htmlbuilder.css.heightwidth; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; /** * Available Height Settings diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/heightwidth/HeightWidthCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/heightwidth/HeightWidthCSS.java index 820e44a7b..4fab2c5ec 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/heightwidth/HeightWidthCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/heightwidth/HeightWidthCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.heightwidth; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.measurement.MeasurementCSS; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/heightwidth/WidthSetting.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/heightwidth/WidthSetting.java index 6c39d22de..480218733 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/heightwidth/WidthSetting.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/heightwidth/WidthSetting.java @@ -17,7 +17,7 @@ package com.jwebmp.core.htmlbuilder.css.heightwidth; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; /** * Available Width Settings diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/image/ImageCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/image/ImageCSS.java index eb2e0d3b6..9c4613215 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/image/ImageCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/image/ImageCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.image; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/image/ImagesCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/image/ImagesCSS.java index 9375c2be7..389a7d7e8 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/image/ImagesCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/image/ImagesCSS.java @@ -17,7 +17,7 @@ package com.jwebmp.core.htmlbuilder.css.image; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/interfaces/ICss.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/interfaces/ICss.java index 2466fea84..49c5ecf11 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/interfaces/ICss.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/interfaces/ICss.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.interfaces; import com.jwebmp.core.htmlbuilder.css.CSS; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; /** * @author GedMarc diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/interfaces/LinkCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/interfaces/LinkCSS.java index 632394b84..0c808e29a 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/interfaces/LinkCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/interfaces/LinkCSS.java @@ -1,7 +1,7 @@ package com.jwebmp.core.htmlbuilder.css.interfaces; import com.jwebmp.core.htmlbuilder.css.CSS; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/interfaces/NameValuePairCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/interfaces/NameValuePairCSS.java index 46c5d57b3..c7ec92576 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/interfaces/NameValuePairCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/interfaces/NameValuePairCSS.java @@ -17,7 +17,7 @@ package com.jwebmp.core.htmlbuilder.css.interfaces; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/lists/ListCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/lists/ListCSS.java index be6bfc9fd..b996d5830 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/lists/ListCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/lists/ListCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.lists; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.image.ImageCSS; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/lists/ListStylePosition.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/lists/ListStylePosition.java index f83d58fef..496c3c207 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/lists/ListStylePosition.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/lists/ListStylePosition.java @@ -17,7 +17,7 @@ package com.jwebmp.core.htmlbuilder.css.lists; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; /** * @author GedMarc diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/lists/ListStyleType.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/lists/ListStyleType.java index 0b42b27f1..7346fb69a 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/lists/ListStyleType.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/lists/ListStyleType.java @@ -17,7 +17,7 @@ package com.jwebmp.core.htmlbuilder.css.lists; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; import com.guicedee.services.jsonrepresentation.json.StaticStrings; /** diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/margins/Margin.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/margins/Margin.java index ee993bca6..896fe2fb8 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/margins/Margin.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/margins/Margin.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.margins; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.enumarations.MarginSetting; import com.jwebmp.core.htmlbuilder.css.measurement.MeasurementCSS; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/margins/MarginsCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/margins/MarginsCSS.java index 84dce2c04..39bbb5df6 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/margins/MarginsCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/margins/MarginsCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.margins; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.enumarations.MarginSetting; import com.jwebmp.core.htmlbuilder.css.measurement.MeasurementCSS; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/measurement/MeasurementCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/measurement/MeasurementCSS.java index def518589..54b13106d 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/measurement/MeasurementCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/measurement/MeasurementCSS.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.measurement; import com.jwebmp.core.htmlbuilder.css.CSSPropertiesFactory; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/measurement/MeasurementTypes.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/measurement/MeasurementTypes.java index 367a0e4eb..44b8fd30a 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/measurement/MeasurementTypes.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/measurement/MeasurementTypes.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.measurement; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; /** * @author GedMarc diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/outline/OutlineCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/outline/OutlineCSS.java index 6cb7b6f52..2b3b30222 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/outline/OutlineCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/outline/OutlineCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.outline; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.colours.ColourCSS; import com.jwebmp.core.htmlbuilder.css.colours.ColourNames; import com.jwebmp.core.htmlbuilder.css.enumarations.BorderStyles; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/padding/Padding.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/padding/Padding.java index 7ecf0845b..ee7558f6b 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/padding/Padding.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/padding/Padding.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.padding; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.measurement.MeasurementCSS; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/padding/PaddingCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/padding/PaddingCSS.java index 2ee46ef8e..7d53ca589 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/padding/PaddingCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/padding/PaddingCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.padding; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.measurement.MeasurementCSS; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/padding/PaddingSetting.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/padding/PaddingSetting.java index 61a45d855..d1d984ef3 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/padding/PaddingSetting.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/padding/PaddingSetting.java @@ -1,7 +1,7 @@ package com.jwebmp.core.htmlbuilder.css.padding; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; /** * @author MMagon diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableBorderCollapse.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableBorderCollapse.java index 1660294b5..9d79e3b01 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableBorderCollapse.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableBorderCollapse.java @@ -17,8 +17,8 @@ package com.jwebmp.core.htmlbuilder.css.tables; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; /** * Definition and Usage diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableCSS.java index bf47b5c0d..da43690c5 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.tables; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.measurement.MeasurementCSS; import java.lang.annotation.*; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableCaptionSides.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableCaptionSides.java index bc3d2f21e..1716cd24b 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableCaptionSides.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableCaptionSides.java @@ -17,8 +17,8 @@ package com.jwebmp.core.htmlbuilder.css.tables; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; /** * @author GedMarc diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableEmptyCells.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableEmptyCells.java index 6ebd60bf7..d2a17c2e4 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableEmptyCells.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableEmptyCells.java @@ -17,8 +17,8 @@ package com.jwebmp.core.htmlbuilder.css.tables; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; /** * Definition and Usage diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableLayouts.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableLayouts.java index 57176ea2d..36bf1c793 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableLayouts.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/tables/TableLayouts.java @@ -17,8 +17,8 @@ package com.jwebmp.core.htmlbuilder.css.tables; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; /** * Definition and Usage diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextAlignments.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextAlignments.java index 2f2b26f85..51be1e529 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextAlignments.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextAlignments.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.text; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; /** * Definition and Usage

diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextCSS.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextCSS.java index dd376d6d6..5ab5dc55f 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextCSS.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextCSS.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.text; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.colours.ColourCSS; import com.jwebmp.core.htmlbuilder.css.colours.ColourNames; import com.jwebmp.core.htmlbuilder.css.measurement.MeasurementCSS; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextDecorations.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextDecorations.java index deb5a3f89..01187b252 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextDecorations.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextDecorations.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.text; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; import com.guicedee.services.jsonrepresentation.json.StaticStrings; /** diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextDirections.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextDirections.java index aec9c6f2e..2e6ae852f 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextDirections.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextDirections.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.text; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; /** * Definition and Usage diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextShadows.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextShadows.java index fafd4421e..4f0d51912 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextShadows.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextShadows.java @@ -16,7 +16,7 @@ */ package com.jwebmp.core.htmlbuilder.css.text; -import com.jwebmp.core.htmlbuilder.css.annotations.CSSAnnotationType; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSAnnotationType; import com.jwebmp.core.htmlbuilder.css.colours.ColourCSS; import com.jwebmp.core.htmlbuilder.css.measurement.MeasurementCSS; diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextTransforms.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextTransforms.java index a5f2f6feb..22dbf4085 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextTransforms.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/TextTransforms.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.text; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; /** * @author GedMarc diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/UnicodeBidis.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/UnicodeBidis.java index bef5c6047..8d4d8294e 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/UnicodeBidis.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/UnicodeBidis.java @@ -17,7 +17,7 @@ package com.jwebmp.core.htmlbuilder.css.text; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; import com.guicedee.services.jsonrepresentation.json.StaticStrings; /** diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/VerticalAlignments.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/VerticalAlignments.java index b9ef64549..3b66b1b8d 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/VerticalAlignments.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/VerticalAlignments.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.text; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; import com.guicedee.services.jsonrepresentation.json.StaticStrings; /** diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/WhiteSpacing.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/WhiteSpacing.java index 1bb7f10ce..039fa74f4 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/text/WhiteSpacing.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/css/text/WhiteSpacing.java @@ -18,7 +18,7 @@ package com.jwebmp.core.htmlbuilder.css.text; import com.jwebmp.core.base.client.CSSVersions; -import com.jwebmp.core.htmlbuilder.css.CSSEnumeration; +import com.jwebmp.core.htmlbuilder.css.enumarations.CSSEnumeration; import com.guicedee.services.jsonrepresentation.json.StaticStrings; /** diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/themes/ITheme.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/themes/ITheme.java deleted file mode 100644 index 3deda5068..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/themes/ITheme.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.jwebmp.core.htmlbuilder.css.themes; - -import com.jwebmp.core.base.references.CSSReference; -import com.jwebmp.core.base.references.JavascriptReference; - -import java.util.List; - -/** - * Provides the base required to enable Theming - * - * @author GedMarc - * @version 1.0 - * @since 2012/10/01 - */ -public interface ITheme -{ - - /** - * The Actual Class Name for the Theme - * - * @return - */ - String getClassName(); - - /** - * A list of CSS files associated with the theme - * - * @return ArrayList of String - */ - List getCssReferences(); - - /** - * Returns a list of all the JavaScript references - * - * @return An array list of JavaScript references - */ - List getJavascriptReferences(); - - /** - * Returns the URL of the size 30 icon - * - * @return The Size 30 Icon URL - */ - String getSize30Icon(); - - /** - * Returns the URL of the size 630 icon - * - * @return The Size 60 Icon URL - */ - String getSize60Icon(); - - /** - * Returns the URL of the size 90 icon - * - * @return The Size 90 Icon URL - */ - String getSize90Icon(); - - /** - * Gets the name of this theme - * - * @return String theme class name - */ - String getName(); -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/css/themes/Theme.java b/src/main/java/com/jwebmp/core/htmlbuilder/css/themes/Theme.java deleted file mode 100644 index 0a9518681..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/css/themes/Theme.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.jwebmp.core.htmlbuilder.css.themes; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.jwebmp.core.base.references.CSSReference; -import com.jwebmp.core.base.references.JavascriptReference; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; - -/** - * Base class for defining a Theme Includes an icon image for Pretties sake - * - * @author GedMarc - * @version 2.0 - * @since 2.0 on 20140705 - */ -public abstract class Theme - implements ITheme, Comparator, Serializable -{ - private final String name; - private final String cssClassName; - private final String icon30; - private final String icon60; - private final String icon90; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List cssRefs; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List javascriptRefs; - private boolean renderClassName = true; - - /** - * Loads a theme with the default icons. This cannot be changed later on - * - * @param name - * The Theme Name - */ - protected Theme(String name) - { - this(name, null); - } - - /** - * Loads a theme with the default icons. This cannot be changed later on - * - * @param name - * The Theme Name - * @param cssClassName - * The CSS Class Associated with the Theme as generated by Theme Roller - */ - protected Theme(String name, String cssClassName) - { - this(name, cssClassName, null, null, null); - } - - /** - * Constructs a new theme object with all specified lines if available - * - * @param name - * The Theme Name - * @param cssClassName - * The CSS Class Associated with the Theme as generated by Theme Roller - * @param icon30 - * The location of the size 30 icon for the theme - * @param icon60 - * The location of the size 60 icon for the theme - * @param icon90 - * The location of the size 90 icon for the theme - */ - public Theme(String name, String cssClassName, String icon30, String icon60, String icon90) - { - this.name = name; - this.cssClassName = cssClassName; - this.icon30 = icon30; - this.icon60 = icon60; - this.icon90 = icon90; - } - - /** - * Returns this theme's class name - * - * @return - */ - @Override - public final String getClassName() - { - return cssClassName; - } - - /** - * Returns all the CSS References used by this theme - *

- * - * @return - */ - @Override - public final List getCssReferences() - { - if (cssRefs == null) - { - cssRefs = new ArrayList<>(); - } - return cssRefs; - } - - /** - * Returns all JavaScript references used by this theme - *

- * - * @return - */ - @Override - public final List getJavascriptReferences() - { - if (javascriptRefs == null) - { - javascriptRefs = new ArrayList<>(); - } - return javascriptRefs; - } - - /** - * Returns a size 30x30 icon if present - *

- * - * @return - */ - @Override - public final String getSize30Icon() - { - return icon30; - } - - /** - * Returns a size 60x60 icon if present - *

- * - * @return - */ - @Override - public final String getSize60Icon() - { - return icon60; - } - - /** - * Returns a size 90x90 icon if present - *

- * - * @return - */ - @Override - public final String getSize90Icon() - { - return icon90; - } - - /** - * Returns the CSS Class name for this theme - * - * @return - */ - @Override - public final String getName() - { - return name; - } - - /** - * Compares themes via their name - * - * @param o1 - * Theme 1 - * @param o2 - * Theme 2 - * - * @return -1 to 1 on sorting - */ - @Override - public int compare(Theme o1, Theme o2) - { - return o1.getName() - .compareTo(o2.getName()); - } - - /** - * Sets if the class name should be rendered - * - * @return - */ - public boolean isRenderClassName() - { - return renderClassName; - } - - /** - * Sets if the class name should be rendered - * - * @param renderClassName - */ - public void setRenderClassName(Boolean renderClassName) - { - this.renderClassName = renderClassName; - } - - @Override - public int hashCode() - { - return super.hashCode(); - } - - /** - * Equals for themes - * - * @param obj - * - * @return - */ - @Override - public boolean equals(Object obj) - { - return super.equals(obj); - } - - /** - * Returns this object Java class name - * - * @return - */ - @Override - public final String toString() - { - return getName(); - } - -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/FunctionPart.java b/src/main/java/com/jwebmp/core/htmlbuilder/javascript/FunctionPart.java deleted file mode 100644 index a3cb78273..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/FunctionPart.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.htmlbuilder.javascript; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonInclude; - -/** - * This Class - * - * @author GedMarc - * @since 25 Dec 2015 - */ -@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, - getterVisibility = JsonAutoDetect.Visibility.NONE, - setterVisibility = JsonAutoDetect.Visibility.NONE) -@JsonInclude(JsonInclude.Include.NON_EMPTY) -public abstract class FunctionPart - extends JavascriptLiteralFunction -{ - - - /** - * Constructs a new literal function part - */ - public FunctionPart() - { - //Nothing needed - } - -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JSONPart.java b/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JSONPart.java deleted file mode 100644 index c88ac7a09..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JSONPart.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2015 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.htmlbuilder.javascript; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonInclude; - -/** - * This Class - * - * @author GedMarc - * @since 25 Dec 2015 - */ -@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, - getterVisibility = JsonAutoDetect.Visibility.NONE, - setterVisibility = JsonAutoDetect.Visibility.NONE) -@JsonInclude(JsonInclude.Include.NON_EMPTY) -public class JSONPart - extends JavaScriptPart -{ - - - public JSONPart() - { - //No configuration needed - } - - @Override - public String toString() - { - return super.toString(); - } - -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavaScriptPart.java b/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavaScriptPart.java deleted file mode 100644 index e3410ff71..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavaScriptPart.java +++ /dev/null @@ -1,436 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.htmlbuilder.javascript; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectReader; -import com.fasterxml.jackson.databind.ObjectWriter; -import com.google.common.base.CaseFormat; -import com.google.inject.Key; -import com.google.inject.name.Names; -import com.guicedee.guicedinjection.GuiceContext; -import com.guicedee.services.jsonrepresentation.IJsonRepresentation; -import lombok.extern.java.Log; - -import java.io.Serializable; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.logging.Level; - -import static com.guicedee.guicedinjection.interfaces.ObjectBinderKeys.*; - -/** - * Defines a section of a JavaScript part e.g. Position - *

- * - * @author mmagon - * @since 2014/07/09 - */ -@SuppressWarnings({"MissingClassJavaDoc", "unused", "unchecked"}) -@JsonInclude(JsonInclude.Include.NON_EMPTY) -@JsonIgnoreProperties(ignoreUnknown = true) -@Log -public class JavaScriptPart> - implements Serializable, IJsonRepresentation -{ - /** - * A reference id that can be returned with a given variable - */ - private String referenceId; - /** - * if empty braces should be rendered - */ - private boolean renderEmptyBraces = false; - - /** - * Constructs a new javascript part - */ - public JavaScriptPart() - { - //No configuration needed - } - - /** - * Returns the object presented as a JSON strong - * - * @param o - * An object to represent - * - * @return the string - */ - public String objectAsString(Object o) - { - try - { - if (GuiceContext.buildingInjector) - { - return new ObjectMapper().writeValueAsString(o) - .replace("\r\n", "\n"); - } - ObjectWriter writer = GuiceContext.get(JSONObjectWriter); - return writer.writeValueAsString(o) - .replace("\r\n", "\n"); - } - catch (JsonProcessingException ex) - { - JavaScriptPart.log.log(Level.FINER, "Unable to Serialize as JSON Json Processing Exception", ex); - return ""; - } - catch (Exception ex) - { - JavaScriptPart.log.log(Level.SEVERE, "Unable to Serialize as JSON", ex); - return ""; - } - - } - - /** - * Returns the JSON Renderer - * - * @return - */ - @JsonIgnore - public ObjectReader getJsonObjectReader() - { - return GuiceContext.get(JSONObjectReader); - } - - /** - * Returns the raw function renderer - * - * @return - */ - @JsonIgnore - public ObjectMapper getFunctionObjectMapper() - { - return GuiceContext.get(Key.get(ObjectMapper.class, Names.named("JSFUNCTION"))); - } - - /** - * Method render ... - * - * @return String - */ - public String render() - { - return toString(); - } - - /** - * Returns the section of string to be applied to the JavaScript part - *

- * - * @return The string to be added to the JavaScript - */ - @Override - @JsonIgnore - public String toString() - { - String s = null; - switch (getJavascriptType()) - { - case Javascript: - { - try - { - s = getJavascriptObjectMapper().writeValueAsString(this); - } - catch (com.fasterxml.jackson.databind.JsonMappingException mapException) - { - JavaScriptPart.log.log(Level.SEVERE, "JSON Mapping Exception!", mapException); - } - catch (JsonProcessingException ex) - { - JavaScriptPart.log.log(Level.SEVERE, "Error Writing as Javascript!", ex); - } - break; - } - case JSON: - { - try - { - s = getJsonObjectMapper().writeValueAsString(this); - } - catch (JsonProcessingException ex) - { - JavaScriptPart.log.log(Level.SEVERE, "Error Writing as JSON Data!", ex); - } - break; - } - case Function: - { - try - { - s = getJavascriptObjectMapper().writeValueAsString(this); - } - catch (JsonProcessingException ex) - { - JavaScriptPart.log.log(Level.SEVERE, "Error Writing as Javascript Function!", ex); - } - break; - } - default: - { - try - { - s = getJsonObjectMapper().writeValueAsString(this); - } - catch (JsonProcessingException ex) - { - JavaScriptPart.log.log(Level.SEVERE, "Error Writing as Default!", ex); - } - break; - } - } - if (s != null) - { - if ("{ }".equals(s) && !isRenderEmptyBraces()) - { - return ""; - } - } - else - { - return ""; - } - return s.replace("\r\n", "\n"); - } - - /** - * Set the render type - *

- * - * @return - */ - @JsonIgnore - public JavascriptPartType getJavascriptType() - { - return JavascriptPartType.Javascript; - } - - /** - * Returns the JavaScript renderer - * - * @return - */ - @JsonIgnore - public ObjectWriter getJavascriptObjectMapper() - { - try - { - return GuiceContext.get(JSONObjectWriter); - } - catch (NullPointerException e) - { - JavaScriptPart.log.log(Level.SEVERE, "Cant find javascript object mapper, returning default", e); - return null; - } - } - - /** - * Returns the JSON Renderer - * - * @return - */ - @JsonIgnore - public ObjectWriter getJsonObjectMapper() - { - return GuiceContext.get(Key.get(ObjectWriter.class, Names.named("JSON"))); - } - - /** - * Method isRenderEmptyBraces returns the renderEmptyBraces of this JavaScriptPart object. - *

- * if empty braces should be rendered - * - * @return the renderEmptyBraces (type boolean) of this JavaScriptPart object. - */ - @JsonIgnore - public boolean isRenderEmptyBraces() - { - return renderEmptyBraces; - } - - /** - * If this part should render when its just empty braces - * - * @param renderEmptyBraces - * - * @return - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public J setRenderEmptyBraces(boolean renderEmptyBraces) - { - this.renderEmptyBraces = renderEmptyBraces; - return (J) this; - } - - @JsonIgnore - public ObjectReader getJavascriptObjectReader() - { - try - { - return GuiceContext.get(JSONObjectReader); - } - catch (NullPointerException e) - { - JavaScriptPart.log.log(Level.SEVERE, "Cant find javascript object mapper, returning default", e); - return null; - } - } - - /** - * Renders the fields (getDeclaredFields()) as a map of html attributes - * - * @return - */ - @SuppressWarnings("rawtypes") - public Map toAttributes() - { - Map map = new LinkedHashMap<>(); - - Field[] fields = getClass().getDeclaredFields(); - for (Field field : fields) - { - if (Modifier.isFinal(field.getModifiers()) || Modifier.isStatic(field.getModifiers())) - { - continue; - } - field.setAccessible(true); - try - { - Object result = field.get(this); - if (result != null) - { - if (JavaScriptPart.class.isAssignableFrom(result.getClass())) - { - map.put(CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_HYPHEN, field.getName()), ((JavaScriptPart) result) - .toString(true)); - } - else - { - map.put(CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_HYPHEN, field.getName()), result.toString()); - } - } - } - catch (Exception e) - { - JavaScriptPart.log.log(Level.WARNING, "Cant format as attributes", e); - } - } - return map; - } - - /** - * Renders the output in tiny format - * - * @param tiny - * - * @return - */ - @JsonIgnore - public String toString(@SuppressWarnings("unused") boolean tiny) - { - String output = null; - try - { - output = GuiceContext.get(JSONObjectWriterTiny) - .writeValueAsString(this); - } - catch (Exception e) - { - JavaScriptPart.log.log(Level.WARNING, "Cant render tiny", e); - } - return output; - } - - /** - * Sets the JW ID to send if necessary - * - * @return - */ - @JsonProperty(value = "$jwid") - public String getReferenceId() - { - return referenceId; - } - - /** - * Sets the JW ID to send if necessary - * - * @param referenceId - */ - @JsonProperty(value = "$jwid") - public void setReferenceId(String referenceId) - { - this.referenceId = referenceId; - } - - /** - * Method isConfigured returns the configured of this JavaScriptPart object. - * - * @return the configured (type boolean) of this JavaScriptPart object. - */ - @JsonIgnore - public boolean isConfigured() - { - return true; - } - - /** - * Method isInitialized returns the initialized of this JavaScriptPart object. - * - * @return the initialized (type boolean) of this JavaScriptPart object. - */ - @JsonIgnore - public boolean isInitialized() - { - return true; - } - - /** - * Method init ... - */ - public void init() - { - //No configuration needed - } - - /** - * Method preConfigure ... - */ - public void preConfigure() - { - //No configuration needed - } - - /** - * Method destroy ... - */ - public void destroy() - { - //No configuration needed - } -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptFunction.java b/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptFunction.java deleted file mode 100644 index 0a2cd52a5..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptFunction.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.htmlbuilder.javascript; - -import com.fasterxml.jackson.annotation.JsonRawValue; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * This Class renders the given function as the result for a given json property - * - * @author GedMarc - * @since 14 Dec 2015 - */ -public abstract class JavascriptFunction> - extends JavaScriptPart -{ - - - /** - * Constructs a new function - */ - public JavascriptFunction() - { - //Nothing needed - } - - /** - * Renders the to function method as the JSON Value - * - * @return - */ - @JsonValue - @JsonRawValue - @Override - public String toString() - { - return renderFunction(); - } - - /** - * Render the full function including function(){}; - * - * @return - */ - public abstract String renderFunction(); -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptLiteralFunction.java b/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptLiteralFunction.java deleted file mode 100644 index 27483a2d0..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptLiteralFunction.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.htmlbuilder.javascript; - -import com.jwebmp.core.Component; - -import java.util.ArrayList; -import java.util.List; - -/** - * This Class renders a base function with sections denoted for dynamic building - * - * @author GedMarc - * @since 30 Dec 2015 - */ -public abstract class JavascriptLiteralFunction> - extends JavascriptFunction -{ - - - /** - * The closing string '}' - */ - private final StringBuilder literalFunctionEndingString = new StringBuilder("}"); - /** - * The first rendered starting string - */ - private StringBuilder literalFunctionStartingString; - /** - * Any arguments to be passed into the function - */ - private List functionArugments; - - /** - * An actual function - */ - public JavascriptLiteralFunction() - { - - } - - /** - * Adds the component, and all of its children's JavaScript into this function - * - * @param c - * The root component to start at - */ - public void addComponentsJavascript(Component c) - { - addComponentsJavascript(c, true); - } - - /** - * Adds the component, and all of its children's JavaScript into this function - * - * @param c - * The root component to start at - * @param includeChildren - * Whether or not to include children - */ - @SuppressWarnings("unused") - public void addComponentsJavascript(Component c, boolean includeChildren) - { - StringBuilder sb = new StringBuilder(); - sb.append(c.renderJavascriptAll()); - getLiteralFunction().append(sb); - } - - /** - * The actual string to include in the function - * - * @return - */ - public abstract StringBuilder getLiteralFunction(); - - /** - * Sets the function's ending string - * - * @return - */ - public StringBuilder getLiteralFunctionStartingString() - { - return literalFunctionStartingString; - } - - /** - * Sets the function starting string - * - * @param literalFunctionStartingString - */ - public void setLiteralFunctionStartingString(StringBuilder literalFunctionStartingString) - { - this.literalFunctionStartingString = literalFunctionStartingString; - } - - /** - * Gets any functional argument that may be required - * - * @return - */ - public final List getFunctionArugments() - { - if (functionArugments == null) - { - functionArugments = new ArrayList<>(); - } - return functionArugments; - } - - /** - * Sets any functional arguments required - * - * @param functionArugments - */ - public final void setFunctionArugments(List functionArugments) - { - this.functionArugments = functionArugments; - } - - /** - * Returns this functions output string - * - * @return - */ - @Override - public String toString() - { - return renderFunction(); - } - - /** - * Renders this function (calls to string) - * - * @return - */ - @Override - public String renderFunction() - { - StringBuilder returnable = new StringBuilder(); - literalFunctionStartingString = new StringBuilder("function (" + functionArugments.toString() - .replace("[", "") - .replace("]", "") + ") {"); - returnable.append(literalFunctionStartingString); - returnable.append(getLiteralFunction()); - returnable.append(literalFunctionEndingString); - return returnable.toString(); - } - -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptPartType.java b/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptPartType.java deleted file mode 100644 index b602571f9..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptPartType.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.htmlbuilder.javascript; - -/** - * @author GedMarc - * @version 1.0 - * /** - * Determines how to display the key to the object - * @since 31 Aug 2015 - */ -public enum JavascriptPartType -{ - - /** - * Don't use quotes around the key - */ - Javascript, - /** - * Use quotes around the key - */ - JSON, - /** - * As a Function - */ - Function - -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptTypes.java b/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptTypes.java deleted file mode 100644 index 81f594700..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/JavascriptTypes.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.jwebmp.core.htmlbuilder.javascript; - -/** - * @author GedMarc - */ -public enum JavascriptTypes -{ - Header, - Component, - Link, - InlineAttribute -} diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/events/enumerations/EventTypes.java b/src/main/java/com/jwebmp/core/htmlbuilder/javascript/events/enumerations/EventTypes.java index 668021080..dccc7d4d3 100644 --- a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/events/enumerations/EventTypes.java +++ b/src/main/java/com/jwebmp/core/htmlbuilder/javascript/events/enumerations/EventTypes.java @@ -54,7 +54,7 @@ * @author GedMarc */ public enum EventTypes - implements Comparable + implements Comparable, com.jwebmp.core.services.IEventTypes { /** @@ -278,6 +278,7 @@ public enum EventTypes * * @return Get the class type that this AJAX event type is matched to */ + @Override public Class getClassType() { return classType; @@ -288,11 +289,18 @@ public Class getClassType() * * @return Gets the Ajax Event Types that this event is linked to */ + @Override public Class getAjaxOptionsReturn() { return ajaxOptionsReturn; } - + + @Override + public Enum from(String s) + { + return valueOf(s); + } + @Override @JsonValue public String toString() diff --git a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/events/interfaces/IEvent.java b/src/main/java/com/jwebmp/core/htmlbuilder/javascript/events/interfaces/IEvent.java deleted file mode 100644 index 6b77d5aa5..000000000 --- a/src/main/java/com/jwebmp/core/htmlbuilder/javascript/events/interfaces/IEvent.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.jwebmp.core.htmlbuilder.javascript.events.interfaces; - -import com.jwebmp.core.base.ajax.AjaxCall; -import com.jwebmp.core.base.ajax.AjaxResponse; -import com.jwebmp.core.base.html.interfaces.GlobalFeatures; -import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; -import com.jwebmp.core.base.servlets.interfaces.IFeature; - -/** - * The interface denoting an event type - *

- * - * @author GedMarc - */ -public interface IEvent> - extends IFeature, - GlobalEvents -{ - /** - * The method that is fired on call - * - * @param call The component that made the call - * @param response The Response Object Being Returned - */ - void fireEvent(AjaxCall call, AjaxResponse response); -} diff --git a/src/main/java/com/jwebmp/core/implementations/JWebMPDynamicScriptRenderer.java b/src/main/java/com/jwebmp/core/implementations/JWebMPDynamicScriptRenderer.java index 4b8c29562..e14e494c8 100644 --- a/src/main/java/com/jwebmp/core/implementations/JWebMPDynamicScriptRenderer.java +++ b/src/main/java/com/jwebmp/core/implementations/JWebMPDynamicScriptRenderer.java @@ -2,23 +2,23 @@ import com.google.common.base.Strings; import com.google.inject.*; -import com.guicedee.guicedinjection.*; +import com.guicedee.client.*; import com.jwebmp.core.FileTemplates; import com.jwebmp.core.Page; import com.jwebmp.core.SessionHelper; import com.jwebmp.core.base.html.Script; +import com.jwebmp.core.base.html.attributes.*; import com.jwebmp.core.base.servlets.JWScriptServlet; -import com.jwebmp.core.services.IDynamicRenderingServlet; +import com.jwebmp.core.services.*; import com.guicedee.services.jsonrepresentation.json.StaticStrings; import jakarta.servlet.http.HttpServletRequest; -import static com.guicedee.guicedinjection.GuiceContext.*; +import static com.guicedee.client.IGuiceContext.*; -public class JWebMPDynamicScriptRenderer - implements IDynamicRenderingServlet +public class JWebMPDynamicScriptRenderer implements IDynamicRenderingServlet { @Override - public String getScriptLocation(Page page) + public String getScriptLocation(IPage page) { String queryParams = ""; try @@ -30,39 +30,32 @@ public String getScriptLocation(Page page) { } - return JWebMPSiteBinder.getJWScriptLocation() - .replaceAll(StaticStrings.STRING_FORWARD_SLASH, StaticStrings.STRING_EMPTY) + "?" + Strings.nullToEmpty(queryParams); + return JWebMPSiteBinder + .getJWScriptLocation() + .replaceAll(StaticStrings.STRING_FORWARD_SLASH, StaticStrings.STRING_EMPTY) + "?" + Strings.nullToEmpty(queryParams); } - + @Override - public Script renderScript(Page page) + public Script renderScript(IPage page) { return getSiteLoaderScript(); } - - private static final String[] HEADERS_TO_TRY = { - "X-Forwarded-For", - "Proxy-Client-IP", - "WL-Proxy-Client-IP", - "HTTP_X_FORWARDED_FOR", - "HTTP_X_FORWARDED", - "HTTP_X_CLUSTER_CLIENT_IP", - "HTTP_CLIENT_IP", - "HTTP_FORWARDED_FOR", - "HTTP_FORWARDED", - "HTTP_VIA", - "REMOTE_ADDR" }; - - private String getClientIpAddress(HttpServletRequest request) { - for (String header : HEADERS_TO_TRY) { + + private static final String[] HEADERS_TO_TRY = {"X-Forwarded-For", "Proxy-Client-IP", "WL-Proxy-Client-IP", "HTTP_X_FORWARDED_FOR", "HTTP_X_FORWARDED", "HTTP_X_CLUSTER_CLIENT_IP", "HTTP_CLIENT_IP", "HTTP_FORWARDED_FOR", "HTTP_FORWARDED", "HTTP_VIA", "REMOTE_ADDR"}; + + private String getClientIpAddress(HttpServletRequest request) + { + for (String header : HEADERS_TO_TRY) + { String ip = request.getHeader(header); - if (ip != null && ip.length() != 0 && !"unknown".equalsIgnoreCase(ip)) { + if (ip != null && ip.length() != 0 && !"unknown".equalsIgnoreCase(ip)) + { return ip; } } return request.getRemoteAddr(); } - + /** * Method getSiteLoaderScript returns the siteLoaderScript of this ScriptsDynamicPageConfigurator object. * @@ -71,62 +64,83 @@ private String getClientIpAddress(HttpServletRequest request) { private Script getSiteLoaderScript() { FileTemplates.getFileTemplate(JWScriptServlet.class, JWScriptServlet.FILE_TEMPLATE_NAME, "siteloader"); - FileTemplates.getTemplateVariables() - .put("SITEADDRESSINSERT", new StringBuilder(SessionHelper.getServerPath())); - FileTemplates.getTemplateVariables() - .put("ROOTADDRESSINSERT", new StringBuilder(SessionHelper.getServerRootPath())); + FileTemplates + .getTemplateVariables() + .put("SITEADDRESSINSERT", new StringBuilder(SessionHelper.getServerPath())); + FileTemplates + .getTemplateVariables() + .put("ROOTADDRESSINSERT", new StringBuilder(SessionHelper.getServerRootPath())); try { - FileTemplates.getTemplateVariables() - .put("PAGECLASS", new StringBuilder(GuiceContext.get(Page.class) - .getClass() - .getCanonicalName())); + FileTemplates + .getTemplateVariables() + .put("PAGECLASS", + new StringBuilder(IGuiceContext + .get(Page.class) + .getClass() + .getCanonicalName())); } catch (ProvisionException | OutOfScopeException e) { - FileTemplates.getTemplateVariables() - .put("PAGECLASS", new StringBuilder()); + FileTemplates + .getTemplateVariables() + .put("PAGECLASS", new StringBuilder()); } try { HttpServletRequest hsr = get(HttpServletRequest.class); - FileTemplates.getTemplateVariables() + FileTemplates + .getTemplateVariables() .put("%USERAGENT%", new StringBuilder(hsr.getHeader("user-agent"))); - + String ipAddress = getClientIpAddress(hsr); - if ("[::1]".equals(ipAddress)) { - ipAddress= "localhost"; + if ("[::1]".equals(ipAddress)) + { + ipAddress = "localhost"; } - if ("127.0.0.1".equals(ipAddress)) { - ipAddress= "localhost"; + if ("127.0.0.1".equals(ipAddress)) + { + ipAddress = "localhost"; } - if ("[0:0:0:0:0:0:0:1]".equals(ipAddress)) { - ipAddress= "localhost"; + if ("[0:0:0:0:0:0:0:1]".equals(ipAddress)) + { + ipAddress = "localhost"; } - FileTemplates.getTemplateVariables() + FileTemplates + .getTemplateVariables() .put("%MYIP%", new StringBuilder(ipAddress)); - - FileTemplates.getTemplateVariables() + + FileTemplates + .getTemplateVariables() .put("%REFERER%", new StringBuilder(hsr.getHeader("referer"))); } catch (Throwable T) { - + } - + StringBuilder jsScript = FileTemplates.renderTemplateScripts(JWScriptServlet.FILE_TEMPLATE_NAME); - if (!jsScript.toString() - .trim() - .isEmpty()) + if (!jsScript + .toString() + .trim() + .isEmpty()) { return newScript(jsScript.toString()); } return new Script<>().setText("could not find site loader script"); } - + + public Script newScript(String contents) + { + Script s = new Script<>(); + s.addAttribute(ScriptAttributes.Type, StaticStrings.HTML_HEADER_JAVASCRIPT); + s.setText(contents); + return s; + } + /** * Default Sort Order INTEGER.MAX - 1000 * @@ -137,7 +151,7 @@ public Integer sortOrder() { return Integer.MAX_VALUE - 1000; } - + @Override public boolean enabled() { diff --git a/src/main/java/com/jwebmp/core/implementations/JWebMPJavaScriptDynamicScriptRenderer.java b/src/main/java/com/jwebmp/core/implementations/JWebMPJavaScriptDynamicScriptRenderer.java index 288923531..ccb471499 100644 --- a/src/main/java/com/jwebmp/core/implementations/JWebMPJavaScriptDynamicScriptRenderer.java +++ b/src/main/java/com/jwebmp/core/implementations/JWebMPJavaScriptDynamicScriptRenderer.java @@ -3,19 +3,20 @@ import com.google.common.base.Strings; import com.jwebmp.core.Page; import com.jwebmp.core.base.html.Script; -import com.jwebmp.core.services.IDynamicRenderingServlet; +import com.jwebmp.core.base.html.attributes.*; +import com.jwebmp.core.services.*; import com.guicedee.services.jsonrepresentation.json.StaticStrings; import jakarta.servlet.http.HttpServletRequest; -import static com.guicedee.guicedinjection.GuiceContext.*; +import static com.guicedee.client.IGuiceContext.*; -public class JWebMPJavaScriptDynamicScriptRenderer - implements IDynamicRenderingServlet + +public class JWebMPJavaScriptDynamicScriptRenderer implements IDynamicRenderingServlet { public static boolean renderJavascript = true; - + @Override - public String getScriptLocation(Page page) + public String getScriptLocation(IPage page) { String queryParams = ""; try @@ -27,25 +28,35 @@ public String getScriptLocation(Page page) { } - return JWebMPSiteBinder.getJavaScriptLocation() - .replaceAll(StaticStrings.STRING_FORWARD_SLASH, StaticStrings.STRING_EMPTY) + "?" + Strings.nullToEmpty(queryParams); + return JWebMPSiteBinder + .getJavaScriptLocation() + .replaceAll(StaticStrings.STRING_FORWARD_SLASH, StaticStrings.STRING_EMPTY) + "?" + Strings.nullToEmpty(queryParams); } @Override - public Script renderScript(Page page) + public Script renderScript(IPage page) { return getJavascriptScript(page); } + public Script newScript(String contents) + { + Script s = new Script<>(); + s.addAttribute(ScriptAttributes.Type, StaticStrings.HTML_HEADER_JAVASCRIPT); + s.setText(contents); + return s; + } /** * Method getJavascriptScript ... * * @return Script */ - private Script getJavascriptScript(Page page) + private Script getJavascriptScript(IPage pager) { - if(renderJavascript) { + Page page = (Page)pager; + if (renderJavascript) + { StringBuilder js = page.renderJavascript(); return newScript(page.getNewLine() + js); } diff --git a/src/main/java/com/jwebmp/core/services/JWebMPServicesBindings.java b/src/main/java/com/jwebmp/core/implementations/JWebMPServicesBindings.java similarity index 82% rename from src/main/java/com/jwebmp/core/services/JWebMPServicesBindings.java rename to src/main/java/com/jwebmp/core/implementations/JWebMPServicesBindings.java index 489a1f6ac..a1338997c 100644 --- a/src/main/java/com/jwebmp/core/services/JWebMPServicesBindings.java +++ b/src/main/java/com/jwebmp/core/implementations/JWebMPServicesBindings.java @@ -1,11 +1,13 @@ -package com.jwebmp.core.services; +package com.jwebmp.core.implementations; import com.google.inject.AbstractModule; import com.google.inject.Key; import com.google.inject.Singleton; import com.google.inject.TypeLiteral; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.guicedee.guicedinjection.interfaces.IGuiceModule; +import com.jwebmp.core.services.*; import java.util.ServiceLoader; import java.util.Set; @@ -28,32 +30,33 @@ public void configure() { //noinspection unchecked bind(JWebMPServicesBindings.IPageConfiguratorsKey) - .toProvider(() -> GuiceContext.instance() + .toProvider(() -> IGuiceContext.instance() .getLoader(IPageConfigurator.class, ServiceLoader.load(IPageConfigurator.class))) .in(Singleton.class); bind(JWebMPServicesBindings.RenderAfterScriptsKey) - .toProvider(() -> GuiceContext.instance() + .toProvider(() -> IGuiceContext.instance() .getLoader(RenderAfterScripts.class, ServiceLoader.load(RenderAfterScripts.class))) .in(Singleton.class); bind(JWebMPServicesBindings.RenderAfterDynamicScriptsKey) - .toProvider(() -> GuiceContext.instance() + .toProvider(() -> IGuiceContext.instance() .getLoader(RenderAfterDynamicScripts.class, ServiceLoader.load(RenderAfterDynamicScripts.class))) .in(Singleton.class); bind(JWebMPServicesBindings.RenderBeforeScriptsKey) - .toProvider(() -> GuiceContext.instance() + .toProvider(() -> IGuiceContext.instance() .getLoader(RenderBeforeScripts.class, ServiceLoader.load(RenderBeforeScripts.class))) .in(Singleton.class); bind(JWebMPServicesBindings.RenderBeforeDynamicScriptsKey) - .toProvider(() -> GuiceContext.instance() + .toProvider(() -> IGuiceContext.instance() .getLoader(RenderBeforeDynamicScripts.class, ServiceLoader.load(RenderBeforeDynamicScripts.class))) .in(Singleton.class); bind(JWebMPServicesBindings.RenderBeforeLinksKey) - .toProvider(() -> GuiceContext.instance() + .toProvider(() -> IGuiceContext.instance() .getLoader(RenderBeforeLinks.class, ServiceLoader.load(RenderBeforeLinks.class))) .in(Singleton.class); bind(JWebMPServicesBindings.RenderAfterLinksKey) - .toProvider(() -> GuiceContext.instance() - .getLoader(RenderAfterLinks.class, ServiceLoader.load(RenderAfterLinks.class))) + .toProvider(() -> IGuiceContext + .instance() + .getLoader(RenderAfterLinks.class, ServiceLoader.load(RenderAfterLinks.class))) .in(Singleton.class); } } diff --git a/src/main/java/com/jwebmp/core/implementations/JWebMPSiteBinder.java b/src/main/java/com/jwebmp/core/implementations/JWebMPSiteBinder.java index 23fed82c0..fa7316ed2 100644 --- a/src/main/java/com/jwebmp/core/implementations/JWebMPSiteBinder.java +++ b/src/main/java/com/jwebmp/core/implementations/JWebMPSiteBinder.java @@ -18,7 +18,8 @@ import com.google.inject.TypeLiteral; import com.google.inject.servlet.ServletModule; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.guicedee.guicedinjection.interfaces.IGuiceModule; import com.guicedee.guicedservlets.services.GuiceSiteInjectorModule; import com.guicedee.guicedservlets.servlets.services.scopes.CallScope; @@ -305,7 +306,7 @@ else if (!pc.ignore()) public static Set getPages() { - return GuiceContext.instance() + return IGuiceContext.instance() .getLoader(IPage.class, true, ServiceLoader.load(IPage.class)); } @@ -314,8 +315,9 @@ public static Map> getPageConfigurations() Map> pagesMap = new HashMap<>(); @SuppressWarnings("rawtypes") - Set pages = GuiceContext.instance() - .getLoader(IPage.class, true, ServiceLoader.load(IPage.class)); + Set pages = IGuiceContext + .instance() + .getLoader(IPage.class, true, ServiceLoader.load(IPage.class)); for (IPage page : pages) { PageConfiguration pc = page.getClass() diff --git a/src/main/java/com/jwebmp/core/implementations/PageProvider.java b/src/main/java/com/jwebmp/core/implementations/PageProvider.java index ce701d0cd..d512bbb21 100644 --- a/src/main/java/com/jwebmp/core/implementations/PageProvider.java +++ b/src/main/java/com/jwebmp/core/implementations/PageProvider.java @@ -1,21 +1,16 @@ package com.jwebmp.core.implementations; -import com.google.common.base.Strings; -import com.google.inject.OutOfScopeException; -import com.google.inject.Provider; -import com.google.inject.ProvisionException; -import com.guicedee.guicedinjection.GuiceContext; -import com.guicedee.guicedservlets.GuicedServletKeys; -import com.guicedee.services.jsonrepresentation.json.StaticStrings; -import com.jwebmp.core.Page; -import com.jwebmp.core.base.ajax.AjaxCall; -import com.jwebmp.core.services.IPage; -import jakarta.servlet.http.HttpServletRequest; +import com.google.common.base.*; +import com.google.inject.*; +import com.guicedee.client.*; +import com.guicedee.guicedservlets.*; +import com.guicedee.services.jsonrepresentation.json.*; +import com.jwebmp.core.*; +import com.jwebmp.core.base.ajax.*; +import com.jwebmp.core.services.*; +import jakarta.servlet.http.*; -import java.util.HashMap; -import java.util.Map; -import java.util.ServiceLoader; -import java.util.Set; +import java.util.*; @SuppressWarnings("rawtypes") public class PageProvider @@ -28,17 +23,17 @@ public Page get() { try { - AjaxCall call = GuiceContext.get(AjaxCall.class); + AjaxCall call = IGuiceContext.get(AjaxCall.class); if (call.getHeaders() .getAppClassName() != null && !Strings.isNullOrEmpty(call.getHeaders() .getAppClassName())) { String className = call.getHeaders() .getAppClassName(); - Class pageClass = GuiceContext.instance() + Class pageClass = IGuiceContext.instance() .getScanResult() .loadClass(className, true); - return (Page) GuiceContext.get(pageClass); + return (Page) IGuiceContext.get(pageClass); } } catch (ProvisionException | OutOfScopeException e) @@ -46,7 +41,7 @@ public Page get() } - HttpServletRequest request = GuiceContext.get(GuicedServletKeys.getHttpServletRequestKey()); + HttpServletRequest request = IGuiceContext.get(GuicedServletKeys.getHttpServletRequestKey()); String pathInfo = request.getRequestURI(); if (pathInfo == null) { @@ -55,12 +50,12 @@ public Page get() pathInfo = pathInfo.toLowerCase(); if (urlToClass.containsKey(pathInfo)) { - return (Page) GuiceContext.get(urlToClass.get(pathInfo)); + return (Page) IGuiceContext.get(urlToClass.get(pathInfo)); } pathInfo = pathInfo.substring(0, pathInfo.lastIndexOf('/') + 1); if (urlToClass.containsKey(pathInfo)) { - return (Page) GuiceContext.get(urlToClass.get(pathInfo)); + return (Page) IGuiceContext.get(urlToClass.get(pathInfo)); } @@ -76,7 +71,7 @@ public Page get() public static Set> getPages() { @SuppressWarnings("UnnecessaryLocalVariable") - Set pages = GuiceContext.instance() + Set pages = IGuiceContext.instance() .getLoader(IPage.class, ServiceLoader.load(IPage.class)); return pages; } diff --git a/src/main/java/com/jwebmp/core/implementations/ReadableUserAgentProvider.java b/src/main/java/com/jwebmp/core/implementations/ReadableUserAgentProvider.java index c98fce46e..aa765f4c0 100644 --- a/src/main/java/com/jwebmp/core/implementations/ReadableUserAgentProvider.java +++ b/src/main/java/com/jwebmp/core/implementations/ReadableUserAgentProvider.java @@ -2,12 +2,12 @@ import com.google.common.base.*; import com.google.inject.*; -import com.guicedee.guicedinjection.*; +import com.guicedee.client.*; import com.jwebmp.core.base.ajax.*; import jakarta.servlet.http.*; import net.sf.uadetector.*; -import static com.guicedee.services.jsonrepresentation.json.StaticStrings.*; +import static com.guicedee.services.jsonrepresentation.json.StaticStrings.STRING_EMPTY; public class ReadableUserAgentProvider implements Provider { @@ -20,7 +20,7 @@ public ReadableUserAgent get() { try { - HttpServletRequest request = GuiceContext.get(HttpServletRequest.class); + HttpServletRequest request = IGuiceContext.get(HttpServletRequest.class); String headerInformation = request.getHeader("User-Agent"); if (!Strings.isNullOrEmpty(headerInformation)) { @@ -33,7 +33,7 @@ public ReadableUserAgent get() { try { - AjaxCall call = GuiceContext.get(AjaxCall.class); + AjaxCall call = IGuiceContext.get(AjaxCall.class); HeadersDTO headers = call.getHeaders(); if (!Strings.isNullOrEmpty(headers.useragent)) { diff --git a/src/main/java/com/jwebmp/core/services/DefaultRenderer.java b/src/main/java/com/jwebmp/core/services/DefaultRenderer.java deleted file mode 100644 index e22698168..000000000 --- a/src/main/java/com/jwebmp/core/services/DefaultRenderer.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.jwebmp.core.services; - -import com.guicedee.guicedinjection.interfaces.IDefaultService; -import com.jwebmp.core.Page; - -import java.util.Comparator; - -/** - * Default implementation for renderers - * - * @param - * A default render type for tree sorting etc - */ -@FunctionalInterface -public interface DefaultRenderer> - extends IDefaultService -{ - /** - * Renders for the given page - * - * @return The generated string - */ - StringBuilder render(Page page); -} diff --git a/src/main/java/com/jwebmp/core/services/IDynamicRenderingServlet.java b/src/main/java/com/jwebmp/core/services/IDynamicRenderingServlet.java deleted file mode 100644 index f160ceadf..000000000 --- a/src/main/java/com/jwebmp/core/services/IDynamicRenderingServlet.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.jwebmp.core.services; - -import com.jwebmp.core.Page; -import com.jwebmp.core.base.html.Script; -import com.jwebmp.core.base.html.attributes.ScriptAttributes; -import com.guicedee.services.jsonrepresentation.json.StaticStrings; -import com.guicedee.guicedinjection.interfaces.IDefaultService; -import com.guicedee.guicedinjection.interfaces.IServiceEnablement; - -/** - * Renders a script that can be done dynamically through a servlet or placed directly into the page at a location (sort order) - */ -public interface IDynamicRenderingServlet> - extends IDefaultService, IServiceEnablement -{ - /** - * Returns the script location - * - * @return The script - */ - String getScriptLocation(Page page); - - /** - * Render the script that can be dynamically built - * - * @return The string builder for the script - */ - Script renderScript(Page page); - - /** - * Method newScript ... - * - * @param contents - * of type String - * - * @return Script - */ - default Script newScript(String contents) - { - Script s = new Script<>(); - s.addAttribute(ScriptAttributes.Type, StaticStrings.HTML_HEADER_JAVASCRIPT); - s.setText(contents); - return s; - } -} diff --git a/src/main/java/com/jwebmp/core/services/IErrorPage.java b/src/main/java/com/jwebmp/core/services/IErrorPage.java deleted file mode 100644 index ae95d0a95..000000000 --- a/src/main/java/com/jwebmp/core/services/IErrorPage.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.jwebmp.core.services; - -import com.guicedee.guicedinjection.interfaces.IDefaultService; -import com.jwebmp.core.Page; - -/** - * Designates an error page - */ -@SuppressWarnings("MissingClassJavaDoc") -@FunctionalInterface -public interface IErrorPage extends IDefaultService -{ - /** - * Renders the page - * - * @return The completed string to send back to the client - */ - @SuppressWarnings("unused") - Page renderPage(Throwable T); -} diff --git a/src/main/java/com/jwebmp/core/services/IPage.java b/src/main/java/com/jwebmp/core/services/IPage.java deleted file mode 100644 index f732a3784..000000000 --- a/src/main/java/com/jwebmp/core/services/IPage.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.services; - -import com.guicedee.guicedinjection.interfaces.IDefaultService; -import com.jwebmp.core.PageOptions; -import com.jwebmp.core.base.ajax.AjaxCall; -import com.jwebmp.core.base.ajax.AjaxResponse; -import com.jwebmp.core.base.html.DocumentType; -import com.jwebmp.core.base.servlets.enumarations.*; -import jakarta.validation.constraints.NotNull; -import net.sf.uadetector.ReadableUserAgent; - -/** - * Defines a page for use with IPage - * - * @author GedMarc - * @since Nov 21, 2016 - */ -public interface IPage> - extends IDefaultService -{ - - DevelopmentEnvironments getRunningEnvironment(); - /** - * Returns the document type that will be rendered with this HTML page real-time - *

- * - * @return Document Type - */ - @SuppressWarnings("unused") - DocumentType getDocumentType(); - - @SuppressWarnings("unused") - @NotNull AjaxResponse onConnect(AjaxCall call, AjaxResponse response); - - /** - * Returns the fields available for entry on this page - * - * @return The Page Fields object - */ - PageOptions getOptions(); - - - /** - * If the page is currently in mobile or smart tablet - * - * @return If the page is mobile or smart tablet - */ - boolean isMobileOrSmartTablet(); - - /** - * Renders the pages HTML - * - * @param renderHtml - * If to render the html, just a place holder, must always render - * - * @return The output HTML for this page - */ - String toString(boolean renderHtml); -} diff --git a/src/main/java/com/jwebmp/core/services/IPageConfigurator.java b/src/main/java/com/jwebmp/core/services/IPageConfigurator.java deleted file mode 100644 index f6d66fcc2..000000000 --- a/src/main/java/com/jwebmp/core/services/IPageConfigurator.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.jwebmp.core.services; - -import com.jwebmp.core.Page; -import com.guicedee.guicedinjection.interfaces.IDefaultService; -import com.guicedee.guicedinjection.interfaces.IServiceEnablement; - -import jakarta.validation.constraints.NotNull; - -/** - * A service for configuration built pages - */ -public interface IPageConfigurator> - extends IDefaultService, IServiceEnablement -{ - /** - * Configures the given page for the parameters - * - * @param page - * The page incoming - * - * @return The original page incoming or a new page, never null - */ - @NotNull - Page configure(Page page); -} diff --git a/src/main/java/com/jwebmp/core/services/IRegularExpressions.java b/src/main/java/com/jwebmp/core/services/IRegularExpressions.java deleted file mode 100644 index 45a531f8c..000000000 --- a/src/main/java/com/jwebmp/core/services/IRegularExpressions.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.jwebmp.core.services; - -import com.guicedee.guicedinjection.interfaces.IDefaultService; - -import java.util.Map; -import java.util.regex.Pattern; - -/** - * Marks default regular expressions to add to the DTO, used with a Service Locator - */ -@FunctionalInterface -public interface IRegularExpressions> - extends IDefaultService -{ - /** - * Returns a map of patterns to add - * - * @return - */ - Map addPatterns(); -} diff --git a/src/main/java/com/jwebmp/core/services/RenderAfterDynamicScripts.java b/src/main/java/com/jwebmp/core/services/RenderAfterDynamicScripts.java deleted file mode 100644 index b58081681..000000000 --- a/src/main/java/com/jwebmp/core/services/RenderAfterDynamicScripts.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.services; - -/** - * Renders before the dynamic script section - * - * @author GedMarc - * @since 30 May 2017 - */ -public interface RenderAfterDynamicScripts - extends DefaultRenderer -{ - -} diff --git a/src/main/java/com/jwebmp/core/services/RenderAfterLinks.java b/src/main/java/com/jwebmp/core/services/RenderAfterLinks.java deleted file mode 100644 index c5b469fc0..000000000 --- a/src/main/java/com/jwebmp/core/services/RenderAfterLinks.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.services; - -/** - * @author GedMarc - * @since 30 May 2017 - */ -public interface RenderAfterLinks - extends DefaultRenderer -{ - -} diff --git a/src/main/java/com/jwebmp/core/services/RenderAfterScripts.java b/src/main/java/com/jwebmp/core/services/RenderAfterScripts.java deleted file mode 100644 index 516de0b66..000000000 --- a/src/main/java/com/jwebmp/core/services/RenderAfterScripts.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.services; - -/** - * Inject text after the scripts section - * - * @author GedMarc - * @since 30 May 2017 - */ -public interface RenderAfterScripts - extends DefaultRenderer -{ - -} diff --git a/src/main/java/com/jwebmp/core/services/RenderBeforeDynamicScripts.java b/src/main/java/com/jwebmp/core/services/RenderBeforeDynamicScripts.java deleted file mode 100644 index ea8dd21d4..000000000 --- a/src/main/java/com/jwebmp/core/services/RenderBeforeDynamicScripts.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.services; - -/** - * Renders before the dynamic script section - * - * @author GedMarc - * @since 30 May 2017 - */ -public interface RenderBeforeDynamicScripts - extends DefaultRenderer -{ -} diff --git a/src/main/java/com/jwebmp/core/services/RenderBeforeLinks.java b/src/main/java/com/jwebmp/core/services/RenderBeforeLinks.java deleted file mode 100644 index 052eb4232..000000000 --- a/src/main/java/com/jwebmp/core/services/RenderBeforeLinks.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.services; - -/** - * @author GedMarc - * @since 30 May 2017 - */ -public interface RenderBeforeLinks - extends DefaultRenderer -{ - -} diff --git a/src/main/java/com/jwebmp/core/services/RenderBeforeScripts.java b/src/main/java/com/jwebmp/core/services/RenderBeforeScripts.java deleted file mode 100644 index 749e39751..000000000 --- a/src/main/java/com/jwebmp/core/services/RenderBeforeScripts.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.services; - -/** - * Inject text after the scripts section - * - * @author GedMarc - * @since 30 May 2017 - */ -public interface RenderBeforeScripts - extends DefaultRenderer -{ -} diff --git a/src/main/java/com/jwebmp/core/utilities/regex/RegularExpressionsDTO.java b/src/main/java/com/jwebmp/core/utilities/regex/RegularExpressionsDTO.java index 5f7a1609a..f3b5e3d3d 100644 --- a/src/main/java/com/jwebmp/core/utilities/regex/RegularExpressionsDTO.java +++ b/src/main/java/com/jwebmp/core/utilities/regex/RegularExpressionsDTO.java @@ -20,7 +20,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonValue; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.jwebmp.core.htmlbuilder.javascript.JavaScriptPart; import com.jwebmp.core.services.IRegularExpressions; import lombok.extern.java.Log; @@ -69,8 +70,9 @@ public RegularExpressionsDTO() public RegularExpressionsDTO addDefaults() { Map patterns = new LinkedHashMap<>(); - Set regess = GuiceContext.instance() - .getLoader(IRegularExpressions.class, ServiceLoader.load(IRegularExpressions.class)); + Set regess = IGuiceContext + .instance() + .getLoader(IRegularExpressions.class, ServiceLoader.load(IRegularExpressions.class)); regess.forEach(regexConfig -> { RegularExpressionsDTO.log.finer("Regex Config Found [" + regexConfig.getClass() diff --git a/src/main/java/com/jwebmp/interception/JWebMPInterceptionBinder.java b/src/main/java/com/jwebmp/interception/JWebMPInterceptionBinder.java index 4ba3283bf..dec051c47 100644 --- a/src/main/java/com/jwebmp/interception/JWebMPInterceptionBinder.java +++ b/src/main/java/com/jwebmp/interception/JWebMPInterceptionBinder.java @@ -4,7 +4,8 @@ import com.google.inject.Key; import com.google.inject.Singleton; import com.google.inject.TypeLiteral; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.*; import com.guicedee.guicedinjection.interfaces.IGuiceModule; import com.jwebmp.interception.services.AjaxCallIntercepter; import com.jwebmp.interception.services.DataCallIntercepter; @@ -26,17 +27,18 @@ public class JWebMPInterceptionBinder public void configure() { bind(JWebMPInterceptionBinder.AjaxCallInterceptorKey) - .toProvider(() -> GuiceContext.instance() - .getLoader(AjaxCallIntercepter.class, ServiceLoader.load(AjaxCallIntercepter.class))) + .toProvider(() -> IGuiceContext + .instance() + .getLoader(AjaxCallIntercepter.class, ServiceLoader.load(AjaxCallIntercepter.class))) .in(Singleton.class); bind(JWebMPInterceptionBinder.DataCallInterceptorKey) - .toProvider(() -> GuiceContext.instance() + .toProvider(() -> IGuiceContext.instance() .getLoader(DataCallIntercepter.class, ServiceLoader.load(DataCallIntercepter.class))) .in(Singleton.class); bind(JWebMPInterceptionBinder.SiteCallInterceptorKey) - .toProvider(() -> GuiceContext.instance() + .toProvider(() -> IGuiceContext.instance() .getLoader(SiteCallIntercepter.class, ServiceLoader.load(SiteCallIntercepter.class))) .in(Singleton.class); } diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 501a79f45..175334170 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -1,20 +1,18 @@ import com.guicedee.guicedinjection.interfaces.IGuiceModule; import com.jwebmp.core.implementations.JWebMPSiteBinder; -import com.jwebmp.core.services.JWebMPServicesBindings; +import com.jwebmp.core.implementations.JWebMPServicesBindings; import com.jwebmp.interception.JWebMPInterceptionBinder; module com.jwebmp.core { requires static lombok; - requires transitive com.guicedee.guicedinjection; + requires transitive com.guicedee.client; requires transitive com.guicedee.guicedservlets; requires transitive jakarta.validation; requires transitive jakarta.servlet; requires transitive com.google.guice.extensions.servlet; - - requires transitive com.guicedee.client; - + requires net.sf.uadetector.core; requires net.sf.uadetector.resources; @@ -34,30 +32,31 @@ requires org.apache.commons.io; requires org.apache.commons.lang3; requires org.apache.commons.text; - - exports com.jwebmp.core; + requires com.jwebmp.client; + + exports com.jwebmp.core; exports com.jwebmp.core.base; - exports com.jwebmp.core.base.ajax; + //exports com.jwebmp.core.base.ajax; - exports com.jwebmp.core.base.client; - exports com.jwebmp.core.services; + // exports com.jwebmp.core.base.client; + // exports com.jwebmp.core.services; exports com.jwebmp.core.base.html; - exports com.jwebmp.core.base.html.attributes; + // exports com.jwebmp.core.base.html.attributes; exports com.jwebmp.core.base.html.inputs; - exports com.jwebmp.core.base.html.interfaces; - exports com.jwebmp.core.base.html.interfaces.children; - exports com.jwebmp.core.base.html.interfaces.children.generics; - exports com.jwebmp.core.base.html.interfaces.events; + // exports com.jwebmp.core.base.html.interfaces; + // exports com.jwebmp.core.base.html.interfaces.children; + // exports com.jwebmp.core.base.html.interfaces.children.generics; + // exports com.jwebmp.core.base.html.interfaces.events; - exports com.jwebmp.core.base.interfaces; + // exports com.jwebmp.core.base.interfaces; exports com.jwebmp.core.base.page; exports com.jwebmp.core.base.servlets; - exports com.jwebmp.core.base.servlets.enumarations; - exports com.jwebmp.core.base.servlets.interfaces; + // exports com.jwebmp.core.base.servlets.enumarations; + // exports com.jwebmp.core.base.servlets.interfaces; exports com.jwebmp.core.base.servlets.options; exports com.jwebmp.core.databind; @@ -117,7 +116,7 @@ exports com.jwebmp.core.exceptions; - exports com.jwebmp.core.generics; + // exports com.jwebmp.core.generics; exports com.jwebmp.core.annotations; @@ -129,7 +128,7 @@ exports com.jwebmp.core.htmlbuilder.css.colours; exports com.jwebmp.core.htmlbuilder.css.composer; exports com.jwebmp.core.htmlbuilder.css.displays; - exports com.jwebmp.core.htmlbuilder.css.enumarations; + // exports com.jwebmp.core.htmlbuilder.css.enumarations; exports com.jwebmp.core.htmlbuilder.css.fonts; exports com.jwebmp.core.htmlbuilder.css.heightwidth; exports com.jwebmp.core.htmlbuilder.css.image; @@ -141,15 +140,15 @@ exports com.jwebmp.core.htmlbuilder.css.padding; exports com.jwebmp.core.htmlbuilder.css.tables; exports com.jwebmp.core.htmlbuilder.css.text; - exports com.jwebmp.core.htmlbuilder.css.themes; + // exports com.jwebmp.core.htmlbuilder.css.themes; exports com.jwebmp.interception.services; exports com.jwebmp.interception; - exports com.jwebmp.core.htmlbuilder.javascript; + // exports com.jwebmp.core.htmlbuilder.javascript; exports com.jwebmp.core.htmlbuilder.javascript.events.commandevent; exports com.jwebmp.core.htmlbuilder.javascript.events.enumerations; - exports com.jwebmp.core.htmlbuilder.javascript.events.interfaces; + // exports com.jwebmp.core.htmlbuilder.javascript.events.interfaces; exports com.jwebmp.core.plugins; @@ -159,7 +158,7 @@ // exports com.jwebmp.core.services.scopes; - exports com.jwebmp.core.base.references; + // exports com.jwebmp.core.base.references; uses com.jwebmp.interception.services.AjaxCallIntercepter; uses com.jwebmp.interception.services.DataCallIntercepter; @@ -252,9 +251,9 @@ opens com.jwebmp.core.base.servlets to com.google.guice, com.fasterxml.jackson.databind; opens com.jwebmp.core.base.page to com.google.guice; - opens com.jwebmp.core.base.ajax to com.fasterxml.jackson.databind; + // opens com.jwebmp.core.base.ajax to com.fasterxml.jackson.databind; opens com.jwebmp.core.base.html to com.fasterxml.jackson.databind; - opens com.jwebmp.core.htmlbuilder.javascript to com.fasterxml.jackson.databind; + // opens com.jwebmp.core.htmlbuilder.javascript to com.fasterxml.jackson.databind; opens com.jwebmp.core.base to com.fasterxml.jackson.databind; opens com.jwebmp.core to com.google.guice, com.fasterxml.jackson.databind; @@ -270,7 +269,7 @@ opens com.jwebmp.core.htmlbuilder.css.colours to com.fasterxml.jackson.databind; opens com.jwebmp.core.htmlbuilder.css.composer to com.fasterxml.jackson.databind; opens com.jwebmp.core.htmlbuilder.css.displays to com.fasterxml.jackson.databind; - opens com.jwebmp.core.htmlbuilder.css.enumarations to com.fasterxml.jackson.databind; + // opens com.jwebmp.core.htmlbuilder.css.enumarations to com.fasterxml.jackson.databind; opens com.jwebmp.core.htmlbuilder.css.fonts to com.fasterxml.jackson.databind; opens com.jwebmp.core.htmlbuilder.css.heightwidth to com.fasterxml.jackson.databind; opens com.jwebmp.core.htmlbuilder.css.image to com.fasterxml.jackson.databind; @@ -281,11 +280,11 @@ opens com.jwebmp.core.htmlbuilder.css.padding to com.fasterxml.jackson.databind; opens com.jwebmp.core.htmlbuilder.css.tables to com.fasterxml.jackson.databind; opens com.jwebmp.core.htmlbuilder.css.text to com.fasterxml.jackson.databind; - opens com.jwebmp.core.htmlbuilder.css.themes to com.fasterxml.jackson.databind; + // opens com.jwebmp.core.htmlbuilder.css.themes to com.fasterxml.jackson.databind; - opens com.jwebmp.core.base.client to com.fasterxml.jackson.databind; + // opens com.jwebmp.core.base.client to com.fasterxml.jackson.databind; - opens com.jwebmp.core.base.servlets.interfaces to com.fasterxml.jackson.databind; + // opens com.jwebmp.core.base.servlets.interfaces to com.fasterxml.jackson.databind; opens com.jwebmp.core.base.servlets.options to com.fasterxml.jackson.databind; opens com.jwebmp.core.utilities.regex to com.fasterxml.jackson.databind; diff --git a/src/main/resources/META-INF/services/com.guicedee.guicedinjection.interfaces.IGuiceDefaultBinder b/src/main/resources/META-INF/services/com.guicedee.guicedinjection.interfaces.IGuiceDefaultBinder index a95009e67..f4e879e6f 100644 --- a/src/main/resources/META-INF/services/com.guicedee.guicedinjection.interfaces.IGuiceDefaultBinder +++ b/src/main/resources/META-INF/services/com.guicedee.guicedinjection.interfaces.IGuiceDefaultBinder @@ -1,2 +1,2 @@ -com.jwebmp.core.services.JWebMPServicesBindings +com.jwebmp.core.implementations.JWebMPServicesBindings com.jwebmp.interception.JWebMPInterceptionBinder diff --git a/src/main/resources/META-INF/services/com.guicedee.guicedinjection.interfaces.IGuiceModule b/src/main/resources/META-INF/services/com.guicedee.guicedinjection.interfaces.IGuiceModule index db33e10be..1d61d79ec 100644 --- a/src/main/resources/META-INF/services/com.guicedee.guicedinjection.interfaces.IGuiceModule +++ b/src/main/resources/META-INF/services/com.guicedee.guicedinjection.interfaces.IGuiceModule @@ -1,3 +1,3 @@ -com.jwebmp.core.services.JWebMPServicesBindings +com.jwebmp.core.implementations.JWebMPServicesBindings com.jwebmp.interception.JWebMPInterceptionBinder com.jwebmp.core.implementations.JWebMPSiteBinder \ No newline at end of file diff --git a/src/test/java/com/jwebmp/BaseTestClass.java b/src/test/java/com/jwebmp/BaseTestClass.java index 97a518856..69fc72fd4 100644 --- a/src/test/java/com/jwebmp/BaseTestClass.java +++ b/src/test/java/com/jwebmp/BaseTestClass.java @@ -16,9 +16,10 @@ */ package com.jwebmp; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Feature; import com.jwebmp.core.Page; -import com.guicedee.guicedinjection.GuiceContext; + import com.jwebmp.testing.BaseTest; import static com.jwebmp.core.base.servlets.enumarations.DevelopmentEnvironments.*; @@ -30,33 +31,34 @@ * @since 13 Jan 2016 */ public class BaseTestClass - extends BaseTest + extends BaseTest { - public BaseTestClass() - { - } - - public Feature getFeature() - { - Feature f = new Feature("Test Feature") - { - @Override - public void assignFunctionsToComponent() - { - addQuery(new StringBuilder("Query Added")); - } - }; - f.setID("featureTest"); - return f; - } + public BaseTestClass() + { + } - public Page getInstance() - { + public Feature getFeature() + { + Feature f = new Feature("Test Feature") + { + @Override + public void assignFunctionsToComponent() + { + addQuery(new StringBuilder("Query Added")); + } + }; + f.setID("featureTest"); + return f; + } - GuiceContext.destroy(); - GuiceContext.inject(); + public Page getInstance() + { + IGuiceContext.instance() + .destroy(); + IGuiceContext.instance() + .inject(); - return new Page<>().setTiny(false) - .setRunningEnvironment(Development); - } + return new Page<>().setTiny(false) + .setRunningEnvironment(Development); + } } diff --git a/src/test/java/com/jwebmp/PlaceHolderTest.java b/src/test/java/com/jwebmp/PlaceHolderTest.java index 95b3d54eb..c9b451a15 100644 --- a/src/test/java/com/jwebmp/PlaceHolderTest.java +++ b/src/test/java/com/jwebmp/PlaceHolderTest.java @@ -17,16 +17,18 @@ package com.jwebmp; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.IGuiceContext; import org.junit.jupiter.api.Test; class PlaceHolderTest - extends BaseTestClass + extends BaseTestClass { - @Test - public void testGuice() - { - GuiceContext.inject(); - } + @Test + public void testGuice() + { + IGuiceContext.instance() + .inject(); + } } diff --git a/src/test/java/com/jwebmp/core/base/ajax/AjaxCallTest.java b/src/test/java/com/jwebmp/core/base/ajax/AjaxCallTest.java deleted file mode 100644 index 9262a6e7d..000000000 --- a/src/test/java/com/jwebmp/core/base/ajax/AjaxCallTest.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.jwebmp.core.base.ajax; - -import com.jwebmp.BaseTestClass; -import com.jwebmp.core.CSSComponent; -import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -import jakarta.validation.constraints.NotNull; -import java.util.Date; - -public class AjaxCallTest - extends BaseTestClass -{ - @Test - public void fromCall() - { - AjaxCall call = new AjaxCall(); - call.setComponent(new CSSComponent("TestComponent")); - call.setComponentId("ComponentID"); - call.setDatetime(new Date(2017, 11, 18)); - call.setEventType(EventTypes.undefined); - call.getParameters() - .put("Test", "value"); - call.setClassName("classname"); - System.out.println(call.toString()); - - Assertions.assertEquals( - "{\n" + - " \"componentId\" : \"ComponentID\",\n" + - " \"datetime\" : 61471692000000,\n" + - " \"eventType\" : \"undefined\",\n" + - " \"parameters\" : {\n" + - " \"Test\" : \"value\"\n" + - " },\n" + - " \"className\" : \"classname\"\n" + - "}", - call.toString()); - } - -} diff --git a/src/test/java/com/jwebmp/core/base/ajax/AjaxResponseTest.java b/src/test/java/com/jwebmp/core/base/ajax/AjaxResponseTest.java deleted file mode 100644 index f4ed21bd2..000000000 --- a/src/test/java/com/jwebmp/core/base/ajax/AjaxResponseTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.jwebmp.core.base.ajax; - -import com.jwebmp.core.base.html.DivSimple; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public class AjaxResponseTest -{ - @Test - public void testResponse() - { - AjaxResponse ar = new AjaxResponse<>(); - ar.setSuccess(false); - ar.addReaction(new AjaxResponseReaction<>("Title", "Data", ReactionType.DialogDisplay, AjaxResponseType.Warning)); - System.out.println(ar); - Assertions.assertEquals( - "{\n" + " \"success\" : false,\n" + " \"reactions\" : [ {\n" + " \"actionTimeout\" : 0,\n" + " \"reactionTitle\" : \"Title\",\n" + " \"reactionMessage\" : \"Data\",\n" + " \"reactionType\" : \"DialogDisplay\",\n" + " \"type\" : \"Warning\"\n" + " } ]\n" + "}", - ar.toString()); - } - - @Test - public void testResponseFull() - { - AjaxResponse ar = new AjaxResponse<>(); - ar.setSuccess(false); - ar.addReaction(new AjaxResponseReaction<>("Title", "Data", ReactionType.DialogDisplay, AjaxResponseType.Warning)); - - //ar.addComponent(new DivSimple<>().setID("id")); - ar.getLocalStorage() - .put("local", "storage"); - ar.getSessionStorage() - .put("session", "storage"); - - // ar.addDto("Dto", new AjaxResponse<>()); - // ar. - - System.out.println(ar); - Assertions.assertEquals( - "{\n" + " \"localStorage\" : {\n" + " \"local\" : \"storage\"\n" + " },\n" + " \"sessionStorage\" : {\n" + " \"session\" : \"storage\"\n" + " },\n" + " \"success\" : false,\n" + " \"variables\" : [ {\n" + " \"variableName\" : \"Dto\",\n" + " \"variable\" : {\n" + " \"success\" : true\n" + " }\n" + " } ],\n" + " \"reactions\" : [ {\n" + " \"actionTimeout\" : 0,\n" + " \"reactionTitle\" : \"Title\",\n" + " \"reactionMessage\" : \"Data\",\n" + " \"reactionType\" : \"DialogDisplay\",\n" + " \"type\" : \"Warning\"\n" + " } ],\n" + " \"components\" : [ {\n" + " \"html\" : \"

\",\n" + " \"id\" : \"id\",\n" + " \"insertType\" : \"Replace\"\n" + " } ]\n" + "}", - ar.toString()); - } -} diff --git a/src/test/java/com/jwebmp/core/base/references/JavascriptReferenceTest.java b/src/test/java/com/jwebmp/core/base/references/JavascriptReferenceTest.java deleted file mode 100644 index f3153d419..000000000 --- a/src/test/java/com/jwebmp/core/base/references/JavascriptReferenceTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jwebmp.core.base.references; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.*; - -class JavascriptReferenceTest -{ - - @Test - void setDefer() - { - JavascriptReference jr = new JavascriptReference("Name",1.0,"LocalReference/LocalRef.js"); - System.out.println(jr); - } - - @Test - void setAsync() - { - } - - @Test - void getAdditionalOptions() - { - } -} diff --git a/src/test/java/com/jwebmp/core/htmlbuilder/javascript/JavaScriptPartImpl.java b/src/test/java/com/jwebmp/core/htmlbuilder/javascript/JavaScriptPartImpl.java deleted file mode 100644 index 010089ddc..000000000 --- a/src/test/java/com/jwebmp/core/htmlbuilder/javascript/JavaScriptPartImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.jwebmp.core.htmlbuilder.javascript; - -public class JavaScriptPartImpl - extends JavaScriptPart -{ - private String name = "name"; - - public JavaScriptPartImpl() - { - - } - - public String getName() - { - return name; - } - - public void setName(String name) - { - this.name = name; - } -} diff --git a/src/test/java/com/jwebmp/core/htmlbuilder/javascript/JavaScriptPartTest.java b/src/test/java/com/jwebmp/core/htmlbuilder/javascript/JavaScriptPartTest.java deleted file mode 100644 index 14801cee5..000000000 --- a/src/test/java/com/jwebmp/core/htmlbuilder/javascript/JavaScriptPartTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2015 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.htmlbuilder.javascript; - -import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.jupiter.api.Test; - -/** - * @author GedMarc - */ -public class JavaScriptPartTest -{ - - public JavaScriptPartTest() - { - } - - @Test - public void testDisplay() throws JsonProcessingException - { - Tutorial tut = new Tutorial(8L, "title", "language"); - System.out.println(new JavaScriptPart().getJavascriptObjectMapper() - .writeValueAsString(tut)); - JavaScriptPartImpl bean = new JavaScriptPartImpl(); - System.out.println(bean.toString()); - System.out.println(bean.toString(true)); - } - - -} diff --git a/src/test/java/com/jwebmp/core/htmlbuilder/javascript/Tutorial.java b/src/test/java/com/jwebmp/core/htmlbuilder/javascript/Tutorial.java deleted file mode 100644 index c7d0ae30a..000000000 --- a/src/test/java/com/jwebmp/core/htmlbuilder/javascript/Tutorial.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.jwebmp.core.htmlbuilder.javascript; - -public class Tutorial - extends JavaScriptPart -{ - - private Long id; - - private String title; - - private String language; - - public Tutorial(Long id, String title, String language) - { - this.id = id; - this.title = title; - this.language = language; - } - - public String getUsedLanguage() - { - return language; - } - - public Long getId() - { - return id; - } - - public Tutorial setId(Long id) - { - this.id = id; - return this; - } - - public String getTitle() - { - return title; - } - - public Tutorial setTitle(String title) - { - this.title = title; - return this; - } - - public String getLanguage() - { - return language; - } - - public Tutorial setLanguage(String language) - { - this.language = language; - return this; - } -} diff --git a/src/test/java/com/jwebmp/implementations/InstanceManagementPageTest.java b/src/test/java/com/jwebmp/implementations/InstanceManagementPageTest.java index cbc9dd52f..6e4085582 100644 --- a/src/test/java/com/jwebmp/implementations/InstanceManagementPageTest.java +++ b/src/test/java/com/jwebmp/implementations/InstanceManagementPageTest.java @@ -1,6 +1,7 @@ package com.jwebmp.implementations; -import com.guicedee.guicedinjection.GuiceContext; + +import com.guicedee.client.IGuiceContext; import com.jwebmp.BaseTestClass; import com.jwebmp.testing.BaseTest; import com.jwebmp.testing.services.ITestInstanceDestroyService; @@ -8,36 +9,38 @@ import com.jwebmp.testing.services.ITestInstanceResetService; public class InstanceManagementPageTest> - implements ITestInstanceResetService, ITestInstanceDestroyService, ITestInstanceInitializerService + implements ITestInstanceResetService, ITestInstanceDestroyService, ITestInstanceInitializerService { - @Override - public void reset(BaseTest testInstance) - { - destroy(testInstance); - initialize(testInstance); - } + @Override + public void reset(BaseTest testInstance) + { + destroy(testInstance); + initialize(testInstance); + } - @Override - public void destroy(BaseTest testInstance) - { - if (BaseTestClass.class.isAssignableFrom(testInstance.getClass())) - { - BaseTestClass.class.cast(testInstance) - .getInstance() - .destroy(); - } - GuiceContext.destroy(); - } + @Override + public void destroy(BaseTest testInstance) + { + if (BaseTestClass.class.isAssignableFrom(testInstance.getClass())) + { + BaseTestClass.class.cast(testInstance) + .getInstance() + .destroy(); + } + IGuiceContext.instance() + .destroy(); + } - @Override - public void initialize(BaseTest testInstance) - { - GuiceContext.inject(); - } + @Override + public void initialize(BaseTest testInstance) + { + IGuiceContext.instance() + .inject(); + } - @Override - public Integer sortOrder() - { - return Integer.MIN_VALUE + 1000; - } + @Override + public Integer sortOrder() + { + return Integer.MIN_VALUE + 1000; + } }