Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring #756

Merged
merged 29 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0408f70
Added API comments to Mqtt5Publisher
amitjoy Aug 3, 2024
7960ce8
Added missing comment to Mqtt5Subscriber
amitjoy Aug 4, 2024
ee3c3f4
Improved readability of ConfigValue
amitjoy Aug 5, 2024
5545200
Enhanced DTO with proper comments
amitjoy Aug 6, 2024
f4dd4a2
Updated Service Info DTO
amitjoy Aug 7, 2024
181849f
Added necessary comments to XThreadDTO
amitjoy Aug 8, 2024
c28571a
Added missing API comments
amitjoy Aug 9, 2024
d217aff
Updated JaxRsServiceRuntimeDTO with missing API comments
amitjoy Aug 10, 2024
5258caa
Added necessary comments to CDIComponentRuntimeDTO
amitjoy Aug 11, 2024
85c7e89
Added comments to DmtDataType
amitjoy Aug 12, 2024
6668a1d
Added missing comments to RuntimeDTO
amitjoy Aug 13, 2024
97d988a
Improved HttpServiceRuntimeDTO
amitjoy Aug 14, 2024
b4a81b8
Added missing comments to ServiceComponentRuntimeDTO
amitjoy Aug 15, 2024
09d40ab
Improved XAttributeDefType with missing comments
amitjoy Aug 16, 2024
d5915de
Improved with missing comments
amitjoy Aug 17, 2024
f0fefd7
Added necessary comments to XComponentReferenceFilterDTO
amitjoy Aug 18, 2024
790de24
Enhanced XConfigurationDTO
amitjoy Aug 19, 2024
54e3ffa
Added missing comments to XHealthCheckDTO
amitjoy Aug 20, 2024
482f68f
Added suitable comments to health check result DTO
amitjoy Aug 21, 2024
3ea0585
Updated HTTP Component DTO with comments
amitjoy Aug 22, 2024
e3090c6
Added API comments to XLogEntryDTO
amitjoy Aug 23, 2024
8b49783
Added missing comments to XObjectClassDefDTO
amitjoy Aug 24, 2024
58d6012
Added necessary comments to XReferenceDTO
amitjoy Aug 25, 2024
e6fc528
Added API comments
amitjoy Aug 26, 2024
4756b64
Added missing API comments to XSatisfiedReferenceDTO
amitjoy Aug 27, 2024
d5d1c26
Enhanced MqttClient with comments
amitjoy Aug 28, 2024
d030eac
Added comments to OSGiCompendiumService
amitjoy Aug 29, 2024
3990ead
Introduce GAV formatting and grouping
amitjoy Aug 30, 2024
ba337db
Introduce GAV formatting and grouping to build.maven
amitjoy Aug 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading