@Service(name = "rollback-transaction") @TargetType({CommandTarget.DAS,CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTERED_INSTANCE}) @ExecuteOn(RuntimeType.INSTANCE) @PerLookup @I18n("rollback.transaction") public class RollbackTransaction implements AdminCommand { private static StringManager localStrings = StringManager.getManager(RollbackTransaction.class); @Param(optional = true) String target = SystemPropertyConstants.DEFAULT_SERVER_INSTANCE_NAME; @Param(name = "transaction_id") String txnId; @Inject JavaEETransactionManager transactionMgr;
public String getUsageText() { if (i18n!=null) { return localStrings.getLocalString(i18n.value()+".usagetext", null); } else { return null; } }
@Service(name = "list-nodes") @Scoped(PerLookup.class) @CommandLock(CommandLock.LockType.NONE) @I18n("list.nodes.command") public class ListNodesCommand implements AdminCommand{ private Nodes nodes; @Param(optional = true, defaultValue = "false", name="long", shortName="l") private boolean long_opt; @Param(optional = true) private boolean terse;
@Service(name="list-lifecycle-modules") @I18n("list.lifecycle.modules") @Scoped(PerLookup.class) @CommandLock(CommandLock.LockType.NONE) @ExecuteOn(value={RuntimeType.DAS}) @TargetType(value={CommandTarget.DOMAIN, CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER}) public class ListLifecycleModulesCommand implements AdminCommand { @Param(primary=true, optional=true) public String target = "server"; @Param(optional=true, defaultValue="false", shortName="t") public Boolean terse = false;
/** * * @author Jerome Dochez */ @Service(name="list-applications") @I18n("list.applications") @Scoped(PerLookup.class) @CommandLock(CommandLock.LockType.NONE) @ExecuteOn(value={RuntimeType.DAS}) @TargetType(value={CommandTarget.DOMAIN, CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER}) public class ListApplicationsCommand extends ListComponentsCommand { public void execute(AdminCommandContext context) { super.execute(context); } }
/** * * The managed scheduled executor service manager allows you to create and * delete the managed-scheduled-executor-service config element */ @Service (name=ServerTags.MANAGED_SCHEDULED_EXECUTOR_SERVICE) @I18n("managed.executor.scheduled.service.manager") @ConfiguredBy(Resources.class) public class ManagedScheduledExecutorServiceManager extends ManagedExecutorServiceBaseManager { public String getResourceType () { return ServerTags.MANAGED_SCHEDULED_EXECUTOR_SERVICE; } protected ManagedExecutorServiceBase createConfigBean(Resources param, Properties properties) throws PropertyVetoException, TransactionFailure { ManagedScheduledExecutorService managedExecutorService = param.createChild(ManagedScheduledExecutorService.class); setAttributesOnConfigBean(managedExecutorService, properties); return managedExecutorService; } }
@Create(value="create-server-pool-user", resolver = ServerPoolResolver.class, i18n = @I18n("org.glassfish.virtualization.create-machine")) void setUser(VirtUser user);
@Service(name = "list-nodes-config") @Scoped(PerLookup.class) @CommandLock(CommandLock.LockType.NONE) @I18n("list.nodes.config.command") public class ListNodesConfigCommand implements AdminCommand{ private Nodes nodes; @Param(optional = true, defaultValue = "false", name="long", shortName="l") private boolean long_opt; @Param(optional = true) private boolean terse;
@Service(name = "list-supported-cipher-suites") @Scoped(PerLookup.class) @CommandLock(CommandLock.LockType.NONE) @I18n("list.supported.cipher.suites") @ExecuteOn({RuntimeType.DAS}) @TargetType({CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTERED_INSTANCE}) public class ListSupportedCipherSuites implements AdminCommand { @Param(optional = true, primary = true, defaultValue = SystemPropertyConstants.DEFAULT_SERVER_INSTANCE_NAME) private String target;
/** * * deploydir command * */ @Service(name="deploydir") @Scoped(PerLookup.class) @I18n("deploydir.command") @ExecuteOn(value={RuntimeType.DAS}) @TargetType(value={CommandTarget.DOMAIN, CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER}) public class DeployDirCommand extends DeployCommand implements AdminCommand { final private static LocalStringManagerImpl localStrings = new LocalStringManagerImpl(DeployDirCommand.class); /** * Executes the command. * * @param context information */ public void execute(AdminCommandContext context) { final ActionReport report = context.getActionReport(); ActionReport.MessagePart msgPart = report.getTopMessagePart(); msgPart.setChildrenType("WARNING"); ActionReport.MessagePart childPart = msgPart.addChild(); String commandName = getClass().getAnnotation(Service.class).name(); childPart.setMessage(localStrings.getLocalString("deploydir.command.deprecated", "{0} command deprecated. Please use {1} command instead.", commandName, "deploy")); super.execute(context); } }
/** * * @author PRASHANTH ABBAGANI * * Factory class which returns the appropriate ResourceManager */ @Service(name="resource-factory") @Scoped(PerLookup.class) @I18n("add.resources") public class ResourceFactory { @Inject private Habitat habitat; public ResourceManager getResourceManager(Resource resource) { String resourceType = resource.getType(); ResourceManager resourceManager = null; for (ResourceManager rm : habitat.getAllByContract(ResourceManager.class)) { if ((rm.getResourceType()).equals(resourceType)) { resourceManager = rm; break; } } return resourceManager; } }
@Create(value="create-template-user", resolver = TemplateResolver.class, i18n = @I18n("org.glassfish.virtualization.create-machine")) void setUser(VirtUser user);
@Service(name = "list-nodes-config") @PerLookup @CommandLock(CommandLock.LockType.NONE) @I18n("list.nodes.config.command") @RestEndpoints({ @RestEndpoint(configBean=Domain.class, opType=RestEndpoint.OpType.GET, public class ListNodesConfigCommand implements AdminCommand{ @Inject Servers servers; @Inject private Nodes nodes; @Param(optional = true, defaultValue = "false", name="long", shortName="l") private boolean long_opt; @Param(optional = true) private boolean terse;
@Service(name = "list-nodes-ssh") @Scoped(PerLookup.class) @CommandLock(CommandLock.LockType.NONE) @I18n("list.nodes.ssh.command") public class ListNodesSshCommand implements AdminCommand{ private Nodes nodes; @Param(optional = true, defaultValue = "false", name="long", shortName="l") private boolean long_opt; @Param(optional = true) private boolean terse;
@Element @Create(value="enable-secure-admin-principal", decorator=SecureAdminPrincipal.CrDecorator.class, i18n=@I18n("enable.secure.admin.principal.command")) @Delete(value="disable-secure-admin-principal", resolver=SecureAdminPrincipal.Resolver.class, i18n=@I18n("disable.secure.admin.principal.command")) @Listing(value="list-secure-admin-principals", resolver=SecureAdminPrincipal.Resolver.class, i18n=@I18n("list.secure.admin.principals.command")) public List<SecureAdminPrincipal> getSecureAdminPrincipal();
@Override public String getUsageText() { if (i18n!=null) { return localStrings.getLocalString(i18n.value()+".usagetext", null); } else { return null; } }
@Service(name = "_create-node-implicit") @I18n("create.node.implicit") @PerLookup @ExecuteOn({RuntimeType.DAS}) @RestEndpoints({ @RestEndpoint(configBean=Domain.class, opType=RestEndpoint.OpType.POST, public class CreateNodeImplicitCommand implements AdminCommand { @Inject Nodes nodes; @Inject private CommandRunner cr; @Param(name="name", optional= true) String name; @Param(name="nodedir", optional = true) String nodedir; @Param(name="nodehost", primary = true) String nodehost;
@Element @Create(value="enable-secure-admin-internal-user", decorator=SecureAdminInternalUser.CrDecorator.class, i18n=@I18n("enable.secure.admin.internal.user.command")) @Delete(value="disable-secure-admin-internal-user", resolver=TypeAndNameResolver.class, i18n=@I18n("disable.secure.admin.internal.user.command")) @Listing(value="list-secure-admin-internal-users", resolver=TypeAndNameResolver.class, i18n=@I18n("list.secure.admin.internal.user.command")) public List<SecureAdminInternalUser> getSecureAdminInternalUser();