From 867853f44c80efd0f00917b03bbca477088470dd Mon Sep 17 00:00:00 2001 From: Amit Kumar Mondal Date: Sat, 8 Jun 2024 11:24:22 +0200 Subject: [PATCH] Added comments to BundleDTO --- .../osgifx/console/agent/dto/XBundleDTO.java | 118 +++++++++++++----- 1 file changed, 88 insertions(+), 30 deletions(-) diff --git a/com.osgifx.console.agent.api/src/main/java/com/osgifx/console/agent/dto/XBundleDTO.java b/com.osgifx.console.agent.api/src/main/java/com/osgifx/console/agent/dto/XBundleDTO.java index 3ee67aa6..db67ecca 100644 --- a/com.osgifx.console.agent.api/src/main/java/com/osgifx/console/agent/dto/XBundleDTO.java +++ b/com.osgifx.console.agent.api/src/main/java/com/osgifx/console/agent/dto/XBundleDTO.java @@ -1,15 +1,15 @@ /******************************************************************************* - * Copyright 2021-2024 Amit Kumar Mondal + * 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 - * of the License at + * 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 + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. ******************************************************************************/ @@ -21,35 +21,93 @@ import org.osgi.dto.DTO; import org.osgi.framework.wiring.dto.BundleRevisionDTO; +/** + * Data Transfer Object (DTO) representing information about an OSGi bundle. + */ public class XBundleDTO extends DTO { - public long id; - public String state; - public String location; - public String category; - public int revisions; - public boolean isFragment; - public long lastModified; - public long dataFolderSize; - public String documentation; - public String vendor; - public String version; - public String description; - public int startLevel; - public int frameworkStartLevel; - public String symbolicName; - public long startDurationInMillis; - public BundleRevisionDTO bundleRevision; - public List exportedPackages; - public List importedPackages; - public List wiredBundlesAsProvider; - public List wiredBundlesAsRequirer; + /** Unique identifier of the bundle. */ + public long id; + + /** Current state of the bundle. */ + public String state; + + /** Location of the bundle. */ + public String location; + + /** Category of the bundle. */ + public String category; + + /** Number of revisions of the bundle. */ + public int revisions; + + /** Indicates if the bundle is a fragment. */ + public boolean isFragment; + + /** Timestamp of the last modification of the bundle. */ + public long lastModified; + + /** Size of the bundle's data folder. */ + public long dataFolderSize; + + /** Documentation associated with the bundle. */ + public String documentation; + + /** Vendor of the bundle. */ + public String vendor; + + /** Version of the bundle. */ + public String version; + + /** Description of the bundle. */ + public String description; + + /** Start level of the bundle. */ + public int startLevel; + + /** Framework start level of the bundle. */ + public int frameworkStartLevel; + + /** Symbolic name of the bundle. */ + public String symbolicName; + + /** Duration taken to start the bundle in milliseconds. */ + public long startDurationInMillis; + + /** Detailed information about the bundle's revision. */ + public BundleRevisionDTO bundleRevision; + + /** Packages exported by the bundle. */ + public List exportedPackages; + + /** Packages imported by the bundle. */ + public List importedPackages; + + /** Bundles wired as providers by the bundle. */ + public List wiredBundlesAsProvider; + + /** Bundles wired as requirers by the bundle. */ + public List wiredBundlesAsRequirer; + + /** Services registered by the bundle. */ public List registeredServices; - public Map manifestHeaders; + + /** Manifest headers of the bundle. */ + public Map manifestHeaders; + + /** Services used by the bundle. */ public List usedServices; - public List hostBundles; - public List fragmentsAttached; - public boolean isPersistentlyStarted; - public boolean isActivationPolicyUsed; + + /** Host bundles related to the bundle. */ + public List hostBundles; + + /** Fragments attached to the bundle. */ + public List fragmentsAttached; + + /** Indicates if the bundle is persistently started. */ + public boolean isPersistentlyStarted; + + /** Indicates if activation policy is used by the bundle. */ + public boolean isActivationPolicyUsed; }