Skip to content

Commit

Permalink
Updates to skeleton structure
Browse files Browse the repository at this point in the history
  • Loading branch information
GedMarc committed Mar 2, 2024
1 parent ea40a06 commit d94e75d
Show file tree
Hide file tree
Showing 8 changed files with 260 additions and 376 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

import java.io.Serializable;

public interface CastableComponent<J extends CastableComponent<J>> extends Serializable {
public interface CastableComponent<J extends CastableComponent<J>> extends Serializable
{


/**
* This class with the associated exposed methods
*
* @return This component type-casted
*/
default IComponentHTMLBase<?> asTagBase() {
default IComponentHTMLBase<?> asTagBase()
{
return (IComponentHTMLBase<?>) this;
}

Expand All @@ -19,7 +21,8 @@ default IComponentHTMLBase<?> asTagBase() {
*
* @return This component type-casted
*/
default IComponentEventBase<?, ?> asEventBase() {
default IComponentEventBase<?, ?> asEventBase()
{
return (IComponentEventBase<?, ?>) this;
}

Expand All @@ -28,7 +31,8 @@ default IComponentHTMLBase<?> asTagBase() {
*
* @return This component type-casted
*/
default IComponentFeatureBase<?, ?> asFeatureBase() {
default IComponentFeatureBase<?, ?> asFeatureBase()
{
return (IComponentFeatureBase<?, ?>) this;
}

Expand All @@ -37,7 +41,8 @@ default IComponentHTMLBase<?> asTagBase() {
*
* @return This component type-casted
*/
default IComponentDependencyBase<?> asDependencyBase() {
default IComponentDependencyBase<?> asDependencyBase()
{
return (IComponentDependencyBase<?>) this;
}

Expand All @@ -46,7 +51,8 @@ default IComponentDependencyBase<?> asDependencyBase() {
*
* @return This component type-casted
*/
default IComponentHierarchyBase<?, ?> asHierarchyBase() {
default IComponentHierarchyBase<?, ?> asHierarchyBase()
{
return (IComponentHierarchyBase<?, ?>) this;
}

Expand All @@ -55,7 +61,8 @@ default IComponentDependencyBase<?> asDependencyBase() {
*
* @return This component type-casted
*/
default IComponentStyleBase<?> asStyleBase() {
default IComponentStyleBase<?> asStyleBase()
{
return (IComponentStyleBase<?>) this;
}

Expand All @@ -65,7 +72,8 @@ default IComponentStyleBase<?> asStyleBase() {
*
* @return This component type-casted
*/
default IComponentBase<?> asBase() {
default IComponentBase<?> asBase()
{
return (IComponentBase<?>) this;
}

Expand All @@ -74,10 +82,23 @@ default IComponentBase<?> asBase() {
*
* @return This component type-casted
*/
default IComponentDataBindingBase<?> asAngularBase() {
default IComponentDataBindingBase<?> asAngularBase()
{
return (IComponentDataBindingBase<?>) this;
}


/**
* This class with the associated exposed methods
*
* @return This component type-casted
*/
default IComponentHTMLAttributeBase<?, ?> asAttributeBase()
{
return (IComponentHTMLAttributeBase<?, ?>) this;
}


/**
* Shortcut to adding a style attribute
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @author GedMarc
* @since Sep 26, 2016
*/
public interface IComponentDataBindingBase<J extends IComponentDataBindingBase<J>>
public interface IComponentDataBindingBase<J extends IComponentDataBindingBase<J>> extends CastableComponent<J>
{
/**
* Adds an object for watching across an application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
*/
package com.jwebmp.core.base.interfaces;

import com.jwebmp.core.base.html.attributes.*;
import com.jwebmp.core.base.html.interfaces.*;
import jakarta.validation.constraints.*;
import com.jwebmp.core.base.html.attributes.GlobalAttributes;
import com.jwebmp.core.base.html.interfaces.AttributeDefinitions;
import jakarta.validation.constraints.NotNull;

import java.util.Map;

/**
* @param <A>
Expand All @@ -27,7 +29,8 @@
* @since Sep 26, 2016
*/
public interface IComponentHTMLAttributeBase<A extends Enum<?> & AttributeDefinitions, J extends IComponentHTMLAttributeBase<A, J>>
extends CastableComponent<J> {
extends CastableComponent<J>
{
/**
* Adds an attribute value to the attribute collection, and marks it with a GlobalAttribute Enumeration.
* <p>
Expand Down Expand Up @@ -184,4 +187,18 @@ public interface IComponentHTMLAttributeBase<A extends Enum<?> & AttributeDefini
* @return A HashMap if this components local attributes. Never null
*/
Boolean getAttribute(A attributeValue, Boolean uselessInt);

/**
* Returns the attributes map
*
* @return
*/
Map<String, String> getAttributes();

/**
* A set of attributes that can be used as hard overrides for any custom attributes specified
*
* @return
*/
Map<String, String> getOverrideAttributes();
}
Loading

0 comments on commit d94e75d

Please sign in to comment.