Skip to content

Commit

Permalink
Merge pull request #756 from amitjoy/refactoring
Browse files Browse the repository at this point in the history
Refactoring
  • Loading branch information
amitjoy authored Sep 10, 2024
2 parents 28ad757 + ba337db commit 129d39d
Show file tree
Hide file tree
Showing 29 changed files with 910 additions and 218 deletions.
11 changes: 0 additions & 11 deletions cnf/maven/build.maven
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
# Google

com.google.mug:mug:8.0

# bnd

biz.aQute.bnd:biz.aQute.bnd.util:7.0.0
biz.aQute.bnd:biz.aQute.bndlib:7.0.0
biz.aQute.bnd:biz.aQute.launchpad:7.0.0
biz.aQute.bnd:biz.aQute.remote.agent:7.0.0
biz.aQute.bnd:biz.aQute.resolve:7.0.0

# Apache

org.apache.commons:commons-exec:1.4.0
org.apache.felix:org.apache.felix.healthcheck.api:2.0.4

# Font Awesome FX

de.jensd:fontawesomefx:8.9

# OSGi R6 (Required for Remote Agent)

org.osgi:osgi.cmpn:6.0.0
org.osgi:osgi.core:6.0.0

# OSGi R8 (Required for RCP Application)

org.osgi:org.osgi.application:1.0.0
org.osgi:org.osgi.namespace.contract:1.0.0
org.osgi:org.osgi.namespace.extender:1.0.1
Expand Down Expand Up @@ -54,24 +48,19 @@ org.osgi:osgi.annotation:8.1.0
org.osgi:osgi.core:8.0.0

# TilesFx

eu.hansolo:tilesfx:21.0.3
eu.hansolo:toolbox:21.0.5
eu.hansolo:toolboxfx:21.0.3

# FormsFx

com.dlsc.formsfx:formsfx-core:11.6.0

# JGraphT

org.jgrapht:jgrapht-core:1.5.2
org.jgrapht:jgrapht-io:1.5.2

# Required for Tic-Tac-Toe Sample Extension

eu.lestard:advanced-bindings:0.4.0

# Logging Facade

com.j256.simplelogging:simplelogging:3.0
24 changes: 9 additions & 15 deletions cnf/maven/runtime.maven
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# UI

com.google.code.gson:gson:2.11.0

# Apache

# Apache Utilities
commons-io:commons-io:2.16.1
org.apache.aries.component-dsl:org.apache.aries.component-dsl.component-dsl:1.2.2
org.apache.commons:commons-lang3:3.14.0
org.apache.commons:commons-text:1.12.0

# JSON
# Apache OSGi Component Management
org.apache.aries.component-dsl:org.apache.aries.component-dsl.component-dsl:1.2.2

# JSON Processing
org.glassfish:jakarta.json:2.0.1
com.google.code.gson:gson:2.11.0

# Felix

# Felix (OSGi)
org.apache.felix:org.apache.felix.cm.json:2.0.6
org.apache.felix:org.apache.felix.configadmin:1.9.26
org.apache.felix:org.apache.felix.configurator:1.0.18
Expand All @@ -25,16 +24,14 @@ org.apache.felix:org.apache.felix.eventadmin:1.6.4
org.apache.felix:org.apache.felix.metatype:1.2.4
org.apache.felix:org.apache.felix.scr:2.2.10

# OSGi

# OSGi Core Services
org.osgi:org.osgi.service.component:1.5.1
org.osgi:org.osgi.service.prefs:1.1.2
org.osgi:org.osgi.util.function:1.2.0
org.osgi:org.osgi.util.promise:1.3.0
org.osgi:org.osgi.util.pushstream:1.1.0

# Equinox

# Equinox (OSGi)
org.eclipse.platform:org.eclipse.equinox.app:1.7.0
org.eclipse.platform:org.eclipse.equinox.bidi:1.5.0
org.eclipse.platform:org.eclipse.equinox.common:3.19.0
Expand All @@ -53,7 +50,6 @@ org.eclipse.platform:org.eclipse.osgi:3.19.0
org.eclipse.platform:org.eclipse.osgi.services:3.12.0

# Eclipse e4

org.eclipse.platform:org.eclipse.e4.core.commands:1.1.300
org.eclipse.platform:org.eclipse.e4.core.contexts:1.12.500
org.eclipse.platform:org.eclipse.e4.core.di:1.9.300
Expand All @@ -67,8 +63,7 @@ org.eclipse.platform:org.eclipse.e4.ui.model.workbench:2.4.200
org.eclipse.platform:org.eclipse.e4.ui.services:1.6.300
org.eclipse.platform:org.eclipse.e4.ui.workbench:1.15.100

# Eclipse Platform

# Eclipse Platform Core
org.eclipse.platform:org.eclipse.core.commands:3.12.0
org.eclipse.platform:org.eclipse.core.contenttype:3.9.300
org.eclipse.platform:org.eclipse.core.databinding:1.13.200
Expand All @@ -84,7 +79,6 @@ org.eclipse.platform:org.eclipse.core.runtime:3.31.0
org.eclipse.platform:org.eclipse.core.variables:3.6.300

# OSGi Logging

org.apache.sling:org.apache.sling.commons.log:5.5.0
org.apache.sling:org.apache.sling.commons.logservice:1.1.0
org.slf4j:slf4j-api:1.7.36
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* Copyright 2021-2024 Amit Kumar Mondal
*
* 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
* 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
* 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
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
******************************************************************************/
Expand All @@ -21,9 +21,25 @@
import org.osgi.service.cdi.runtime.dto.ContainerDTO;
import org.osgi.service.cdi.runtime.dto.template.ContainerTemplateDTO;

/**
* Represents the runtime state and configuration of CDI (Contexts and Dependency
* Injection) components within the OSGi framework. This class extends the
* {@link DTO} class to provide a standardized data transfer object for CDI component
* runtime information.
* <p>
* The {@code CDIComponentRuntimeDTO} class contains collections of {@link ContainerDTO}
* instances, which represent the current state of CDI containers, and
* {@link ContainerTemplateDTO} instances, which define the template configurations
* for these containers. It is used to transfer CDI component runtime data between
* different components or systems in a consistent format.
* </p>
*/
public class CDIComponentRuntimeDTO extends DTO {

public Collection<ContainerDTO> containers;
/** A collection of {@link ContainerDTO} instances representing the current state of CDI containers. */
public Collection<ContainerDTO> containers;

/** A collection of {@link ContainerTemplateDTO} instances representing the template configurations of CDI containers. */
public Collection<ContainerTemplateDTO> containerTemplates;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,70 @@
* Copyright 2021-2024 Amit Kumar Mondal
*
* 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
* 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
* 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
* 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 com.osgifx.console.agent.dto;

/**
* Represents a configuration value consisting of a key, a value, and a type.
* This class is used to encapsulate the configuration properties that can be
* serialized to JSON and transferred between components or systems.
* <p>
* Each instance of this class holds a single configuration entry, defined by
* its key, value, and type, which can be used in different contexts such as
* configuration management or data exchange.
* </p>
*/
public class ConfigValue {

public String key;
public Object value;
/** The key of the configuration entry. */
public String key;

/** The value associated with the configuration key. */
public Object value;

/** The type of the configuration value, represented by {@link XAttributeDefType}. */
public XAttributeDefType type;

/**
* Default constructor required for JSON serialization.
*/
public ConfigValue() {
// required for JSON serialization
}

/**
* Constructs a new {@code ConfigValue} instance with the specified key, value, and type.
*
* @param key the key of the configuration entry, must not be null
* @param value the value associated with the key, can be any object
* @param type the type of the configuration value, must not be null
*/
public ConfigValue(final String key, final Object value, final XAttributeDefType type) {
this.key = key;
this.key = key;
this.value = value;
this.type = type;
this.type = type;
}

/**
* Factory method to create a new {@code ConfigValue} instance.
*
* @param key the key of the configuration entry, must not be null
* @param value the value associated with the key, can be any object
* @param type the type of the configuration value, must not be null
* @return a new {@code ConfigValue} instance with the specified key, value, and type
*/
public static ConfigValue create(final String key, final Object value, final XAttributeDefType type) {
return new ConfigValue(key, value, type);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 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
* 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
Expand All @@ -15,17 +15,46 @@
******************************************************************************/
package com.osgifx.console.agent.dto;

/**
* Enum representing the different data types that can be used in a DMT (Device
* Management Tree) structure within the OSGi framework. These types are utilized
* to define the format and nature of data stored in or retrieved from a DMT node.
*/
public enum DmtDataType {

/** Base64-encoded binary data. */
BASE64,

/** Binary data. */
BINARY,

/** Boolean value (true or false). */
BOOLEAN,

/** Date value in a standardized format. */
DATE,

/** Floating-point numeric value. */
FLOAT,

/** Integer numeric value. */
INTEGER,

/** Null value, indicating the absence of data. */
NULL,

/** String value. */
STRING,

/** Time value in a standardized format. */
TIME,

/** XML-formatted data. */
XML,

/** Long numeric value. */
LONG,

/** Combined date and time value in a standardized format. */
DATE_TIME
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* Copyright 2021-2024 Amit Kumar Mondal
*
* 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
* 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
* 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
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
******************************************************************************/
Expand All @@ -18,8 +18,20 @@
import org.osgi.dto.DTO;
import org.osgi.service.http.runtime.dto.RuntimeDTO;

/**
* Represents the runtime status and configuration of an HTTP service within
* the OSGi framework. This class extends the {@link DTO} class to provide a
* standardized data transfer object for HTTP service runtime information.
* <p>
* The {@code HttpServiceRuntimeDTO} class contains a reference to a {@link RuntimeDTO}
* instance, which encapsulates details about the runtime environment of the HTTP
* service. It is used to transfer HTTP service runtime data between different
* components or systems in a consistent format.
* </p>
*/
public class HttpServiceRuntimeDTO extends DTO {

/** The runtime details of the HTTP service, represented by {@link RuntimeDTO}. */
public RuntimeDTO runtime;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* Copyright 2021-2024 Amit Kumar Mondal
*
* 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
* 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
* 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
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
******************************************************************************/
Expand All @@ -18,8 +18,20 @@
import org.osgi.dto.DTO;
import org.osgi.service.jaxrs.runtime.dto.RuntimeDTO;

/**
* Represents the runtime status and configuration of a JAX-RS service within
* the OSGi framework. This class extends the {@link DTO} class to provide a
* standardized data transfer object for JAX-RS runtime information.
* <p>
* The {@code JaxRsServiceRuntimeDTO} class contains details about the JAX-RS
* service runtime environment, encapsulated in the {@link RuntimeDTO} instance.
* It is used to transfer JAX-RS runtime data between different components or
* systems in a consistent format.
* </p>
*/
public class JaxRsServiceRuntimeDTO extends DTO {

/** The runtime details of the JAX-RS service, represented by {@link RuntimeDTO}. */
public RuntimeDTO runtime;

}
}
Loading

0 comments on commit 129d39d

Please sign in to comment.