Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
package com.fortify.cli.generic_action._main.cli.cmd;

import com.fortify.cli.common.cli.cmd.AbstractContainerCommand;
import com.fortify.cli.common.cli.util.ModuleType;
import com.fortify.cli.common.cli.util.ProductModule;
import com.fortify.cli.generic_action.action.cli.cmd.GenericActionAsciidocCommand;
import com.fortify.cli.generic_action.action.cli.cmd.GenericActionGetCommand;
import com.fortify.cli.generic_action.action.cli.cmd.GenericActionHelpCommand;
Expand All @@ -24,6 +26,7 @@

import picocli.CommandLine.Command;

@ProductModule(ModuleType.OTHER)
@Command(
name = "action",
resourceBundle = "com.fortify.cli.generic_action.i18n.GenericActionMessages",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@
import com.fortify.cli.aviator.ssc.cli.cmd.AviatorSSCCommands;
import com.fortify.cli.aviator.token.cli.cmd.AviatorTokenCommands;
import com.fortify.cli.common.cli.cmd.AbstractContainerCommand;
import com.fortify.cli.common.cli.util.ModuleType;
import com.fortify.cli.common.cli.util.ProductModule;
import com.fortify.cli.common.cli.util.RelatedModules;

import picocli.CommandLine.Command;

@ProductModule(ModuleType.PRODUCT)
@RelatedModules({"ssc"})
@Command(
name = "aviator",
resourceBundle = "com.fortify.cli.aviator.i18n.AviatorMessages",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright 2021-2026 Open Text.
*
* The only warranties for products and services of Open Text
* and its affiliates and licensors ("Open Text") are as may
* be set forth in the express warranty statements accompanying
* such products and services. Nothing herein should be construed
* as constituting an additional warranty. Open Text shall not be
* liable for technical or editorial errors or omissions contained
* herein. The information contained herein is subject to change
* without notice.
*/
package com.fortify.cli.common.cli.util;

/**
* Enum that holds the type of a module as a product module (SSC, FoD, Aviator, SC-SAST, SC-DAST)
* or a non-product/other module (util, tool, license, actions, config, ...)
*
* @author Sangamesh Vijaykumar
*/

public enum ModuleType {
PRODUCT, // SSC, FoD, Aviator, SC-SAST, SC-DAST
OTHER // util, tool, license, actions, config, ...
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright 2021-2026 Open Text.
*
* The only warranties for products and services of Open Text
* and its affiliates and licensors ("Open Text") are as may
* be set forth in the express warranty statements accompanying
* such products and services. Nothing herein should be construed
* as constituting an additional warranty. Open Text shall not be
* liable for technical or editorial errors or omissions contained
* herein. The information contained herein is subject to change
* without notice.
*/
package com.fortify.cli.common.cli.util;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

/**
* Marks a module as a product module (SSC, FoD, Aviator, SC-SAST, SC-DAST)
* or a non-product/other module (util, tool, license, actions, config, ...).
*
* @author Sangamesh Vijaykumar
*/
@Retention(RUNTIME)
@Target(ElementType.TYPE)
public @interface ProductModule {
ModuleType value();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright 2021-2026 Open Text.
*
* The only warranties for products and services of Open Text
* and its affiliates and licensors ("Open Text") are as may
* be set forth in the express warranty statements accompanying
* such products and services. Nothing herein should be construed
* as constituting an additional warranty. Open Text shall not be
* liable for technical or editorial errors or omissions contained
* herein. The information contained herein is subject to change
* without notice.
*/
package com.fortify.cli.common.cli.util;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Defines which base modules a module is related to.
* Example: @RelatedModules({"ssc","fod"}) on the tool/util module.
*
* @author Sangamesh Vijaykumar
*/

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface RelatedModules {
String[] value(); // base modules this module is related to, e.g. {"ssc","fod"}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
package com.fortify.cli.config._main.cli.cmd;

import com.fortify.cli.common.cli.cmd.AbstractContainerCommand;
import com.fortify.cli.common.cli.util.ModuleType;
import com.fortify.cli.common.cli.util.ProductModule;
import com.fortify.cli.config.language.cli.cmd.LanguageCommands;
import com.fortify.cli.config.proxy.cli.cmd.ProxyCommands;
import com.fortify.cli.config.publickey.cli.cmd.PublicKeyCommands;
import com.fortify.cli.config.truststore.cli.cmd.TrustStoreCommands;

import picocli.CommandLine.Command;

@ProductModule(ModuleType.OTHER)
@Command(
name = "config",
aliases = "cfg",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
package com.fortify.cli.fod._main.cli.cmd;

import com.fortify.cli.common.cli.cmd.AbstractContainerCommand;
import com.fortify.cli.common.cli.util.ModuleType;
import com.fortify.cli.common.cli.util.ProductModule;
import com.fortify.cli.fod._common.session.cli.cmd.FoDSessionCommands;
import com.fortify.cli.fod.access_control.cli.cmd.FoDAccessControlCommands;
import com.fortify.cli.fod.action.cli.cmd.FoDActionCommands;
Expand All @@ -30,6 +32,7 @@

import picocli.CommandLine.Command;

@ProductModule(ModuleType.PRODUCT)
@Command(
name = "fod",
resourceBundle = "com.fortify.cli.fod.i18n.FoDMessages",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
package com.fortify.cli.license._main.cli.cmd;

import com.fortify.cli.common.cli.cmd.AbstractContainerCommand;
import com.fortify.cli.common.cli.util.ModuleType;
import com.fortify.cli.common.cli.util.ProductModule;
import com.fortify.cli.license.msp_report.cli.cmd.MspReportCommands;
import com.fortify.cli.license.ncd_report.cli.cmd.NcdReportCommands;

import picocli.CommandLine.Command;

@ProductModule(ModuleType.OTHER)
@Command(
name = "license",
resourceBundle = "com.fortify.cli.license.i18n.LicenseMessages",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
package com.fortify.cli.sc_dast._main.cli.cmd;

import com.fortify.cli.common.cli.cmd.AbstractContainerCommand;
import com.fortify.cli.common.cli.util.ModuleType;
import com.fortify.cli.common.cli.util.ProductModule;
import com.fortify.cli.common.cli.util.RelatedModules;
import com.fortify.cli.sc_dast.rest.cli.cmd.SCDastRestCommands;
import com.fortify.cli.sc_dast.scan.cli.cmd.SCDastScanCommands;
import com.fortify.cli.sc_dast.scan_policy.cli.cmd.SCDastScanPolicyCommands;
Expand All @@ -21,6 +24,8 @@

import picocli.CommandLine.Command;

@ProductModule(ModuleType.PRODUCT)
@RelatedModules({"ssc"})
@Command(
name = "sc-dast",
resourceBundle = "com.fortify.cli.sc_dast.i18n.SCDastMessages",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@
package com.fortify.cli.sc_sast._main.cli.cmd;

import com.fortify.cli.common.cli.cmd.AbstractContainerCommand;
import com.fortify.cli.common.cli.util.ModuleType;
import com.fortify.cli.common.cli.util.ProductModule;
import com.fortify.cli.common.cli.util.RelatedModules;
import com.fortify.cli.sc_sast.rest.cli.cmd.SCSastRestCommands;
import com.fortify.cli.sc_sast.scan.cli.cmd.SCSastScanCommands;
import com.fortify.cli.sc_sast.sensor.cli.cmd.SCSastSensorCommands;
import com.fortify.cli.sc_sast.sensor_pool.cli.cmd.SCSastSensorPoolCommands;

import picocli.CommandLine.Command;

@ProductModule(ModuleType.PRODUCT)
@RelatedModules({"ssc"})
@Command(
name = "sc-sast",
resourceBundle = "com.fortify.cli.sc_sast.i18n.SCSastMessages",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
package com.fortify.cli.ssc._main.cli.cmd;

import com.fortify.cli.common.cli.cmd.AbstractContainerCommand;
import com.fortify.cli.common.cli.util.ModuleType;
import com.fortify.cli.common.cli.util.ProductModule;
import com.fortify.cli.ssc._common.session.cli.cmd.SSCSessionCommands;
import com.fortify.cli.ssc.access_control.cli.cmd.SSCAccessControlCommands;
import com.fortify.cli.ssc.action.cli.cmd.SSCActionCommands;
Expand All @@ -33,6 +35,7 @@

import picocli.CommandLine.Command;

@ProductModule(ModuleType.PRODUCT)
@Command(
name = "ssc",
resourceBundle = "com.fortify.cli.ssc.i18n.SSCMessages",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
package com.fortify.cli.tool._main.cli.cmd;

import com.fortify.cli.common.cli.cmd.AbstractContainerCommand;
import com.fortify.cli.common.cli.util.ModuleType;
import com.fortify.cli.common.cli.util.ProductModule;
import com.fortify.cli.common.cli.util.RelatedModules;
import com.fortify.cli.tool.bugtracker_utility.cli.cmd.ToolBugTrackerUtilityCommands;
import com.fortify.cli.tool.debricked_cli.cli.cmd.ToolDebrickedCliCommands;
import com.fortify.cli.tool.definitions.cli.cmd.ToolDefinitionsCommands;
Expand All @@ -24,6 +27,8 @@

import picocli.CommandLine.Command;

@ProductModule(ModuleType.OTHER)
@RelatedModules({"ssc","fod"})
@Command(
name = "tool",
resourceBundle = "com.fortify.cli.tool.i18n.ToolMessages",
Expand Down
Loading
Loading