Skip to content

Commit

Permalink
Gather all extensions into an extensions package
Browse files Browse the repository at this point in the history
  • Loading branch information
ultraq committed Jan 22, 2024
1 parent 8e35e1c commit 22e4b30
Show file tree
Hide file tree
Showing 16 changed files with 131 additions and 128 deletions.
@@ -1,11 +1,11 @@
moduleName = thymeleaf-layout-dialect-extensions
moduleVersion = ${moduleVersion}
extensionClasses = nz.net.ultraq.thymeleaf.layoutdialect.context.extensions.IContextExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.fragments.extensions.FragmentExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.models.extensions.IAttributeExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.models.extensions.ICloseElementTagExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.models.extensions.IModelExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.models.extensions.IProcessableElementTagExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.models.extensions.IStandaloneElementTagExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.models.extensions.ITemplateEventExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.models.extensions.ITextExtensions
extensionClasses = nz.net.ultraq.thymeleaf.layoutdialect.extensions.FragmentExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.extensions.IAttributeExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.extensions.ICloseElementTagExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.extensions.IContextExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.extensions.IModelExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.extensions.IProcessableElementTagExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.extensions.IStandaloneElementTagExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.extensions.ITemplateEventExtensions,\
nz.net.ultraq.thymeleaf.layoutdialect.extensions.ITextExtensions
@@ -1,28 +1,28 @@
/*
* Copyright 2015, Emanuel Rabina (http://www.ultraq.net.nz/)
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package nz.net.ultraq.thymeleaf.layoutdialect.fragments.extensions
package nz.net.ultraq.thymeleaf.layoutdialect.extensions

import org.thymeleaf.context.ITemplateContext
import org.thymeleaf.model.IModel
import org.thymeleaf.processor.element.IElementModelStructureHandler

/**
* Extensions to Thymeleaf for working with fragments.
*
*
* @author Emanuel Rabina
*/
class FragmentExtensions {
Expand All @@ -31,7 +31,7 @@ class FragmentExtensions {

/**
* Retrieves the fragment collection for the current context.
*
*
* @param self
* @param fromDecorator
* @return A new or existing fragment collection.
Expand All @@ -55,7 +55,7 @@ class FragmentExtensions {
/**
* Set a fragment cache to contain any existing fragments, plus the given new
* fragments, with the same scope as setting a local variable.
*
*
* @param self
* @param context
* @param fragments
Expand Down
@@ -1,26 +1,26 @@
/*
/*
* Copyright 2016, Emanuel Rabina (http://www.ultraq.net.nz/)
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package nz.net.ultraq.thymeleaf.layoutdialect.models.extensions
package nz.net.ultraq.thymeleaf.layoutdialect.extensions

import org.thymeleaf.model.IAttribute

/**
* Meta-programming extensions to the {@link IAttribute} class.
*
*
* @author Emanuel Rabina
*/
class IAttributeExtensions {
Expand All @@ -29,7 +29,7 @@ class IAttributeExtensions {
* Returns whether or not an attribute is an attribute processor of
* the given name, checks both prefix:processor and
* data-prefix-processor variants.
*
*
* @param self
* @param prefix
* @param name
Expand Down
@@ -1,33 +1,33 @@
/*
/*
* Copyright 2016, Emanuel Rabina (http://www.ultraq.net.nz/)
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package nz.net.ultraq.thymeleaf.layoutdialect.models.extensions
package nz.net.ultraq.thymeleaf.layoutdialect.extensions

import org.thymeleaf.model.ICloseElementTag

/**
* Meta-programming extensions to the {@link ICloseElementTag} class.
*
*
* @author Emanuel Rabina
*/
class ICloseElementTagExtensions {

/**
* Compares this close tag with another.
*
*
* @param self
* @param other
* @return {@code true} if this tag has the same name as the other
Expand Down
@@ -1,27 +1,27 @@
/*
/*
* Copyright 2016, Emanuel Rabina (http://www.ultraq.net.nz/)
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package nz.net.ultraq.thymeleaf.layoutdialect.context.extensions
package nz.net.ultraq.thymeleaf.layoutdialect.extensions

import org.thymeleaf.context.IContext
import org.thymeleaf.dialect.IProcessorDialect

/**
* Meta-programming extensions to the {@link IContext} class.
*
*
* @author Emanuel Rabina
*/
class IContextExtensions {
Expand All @@ -31,7 +31,7 @@ class IContextExtensions {
/**
* Enables use of the {@code value = context[key]} syntax over the context
* object, is a synonym for the {@code getVariable} method.
*
*
* @param self
* @param name Name of the variable on the context to retrieve.
* @return The variable value, or {@code null} if the variable isn't
Expand All @@ -44,7 +44,7 @@ class IContextExtensions {
/**
* Returns the configured prefix for the given dialect. If the dialect
* prefix has not been configured.
*
*
* @param self
* @param dialectClass
* @return The configured prefix for the dialect, or {@code null} if the
Expand All @@ -64,7 +64,7 @@ class IContextExtensions {
/**
* Enables use of the {@code context[key] = value} syntax over the context
* object, is a synonym for the {@code setVariable} method.
*
*
* @param self
* @param name Name of the variable to map the value to.
* @param value The value to set.
Expand Down

0 comments on commit 22e4b30

Please sign in to comment.