/** * Returns the list of registered templates for this virtualization infrastructure. Such template * are image files that can be duplicated to create virtual machines. * * @return list of registered templates */ @Element("template") @Listing(value = "list-templates", resolver = VirtResolver.class, i18n = @I18n("org.glassfish.virtualization.list-templates")) @Delete(value="remove-template", resolver = TypeAndNameResolver.class, i18n = @I18n("org.glassfish.virtualization.remove-template")) List<Template> getTemplates();
public void postConstruct() { super.postConstruct(); listing = targetMethod.getAnnotation(Listing.class); resolverType = listing.resolver(); try { // we pass false for "useAnnotations" as the @Param declarations on // the target type are not used for the List method parameters. model = new GenericCommandModel(targetType, false, null, listing.i18n(), new LocalStringManagerImpl(targetType), habitat.getComponent(DomDocument.class), commandName, listing.resolver(), null); if (logger.isLoggable(level)) { for (String paramName : model.getParametersNames()) { CommandModel.ParamModel param = model.getModelFor(paramName); logger.fine("I take " + param.getName() + " parameters"); } } } catch(Exception e) { String msg = localStrings.getLocalString(GenericCrudCommand.class, "GenericCreateCommand.command_model_exception", "Exception while creating the command model for the generic command {0} : {1}", commandName, e.getMessage()); logger.severe(msg); throw new ComponentException(msg, e); } }
@Element("server-pool-master") // @Create(value = "create-serverPool-manager", resolver = VirtResolver.class, i18n = @I18n("org.glassfish.virtualization.create-serverPool-manager")) @Listing(value = "list-group-master", resolver = VirtResolver.class, i18n = @I18n("org.glassfish.virtualization.list-serverPool-managers")) @Delete(value="delete-group-master", resolver= TypeAndNameResolver.class, i18n = @I18n("org.glassfish.virtualization.delete-serverPool-manager")) List<GroupManager> getServerPoolMaster();
@Override public void postConstruct() { super.postConstruct(); listing = targetMethod.getAnnotation(Listing.class); resolverType = listing.resolver(); try { // we pass false for "useAnnotations" as the @Param declarations on // the target type are not used for the List method parameters. cmdModel = new GenericCommandModel(targetType, false, null, listing.i18n(), new LocalStringManagerImpl(targetType), habitat.<DomDocument>getService(DomDocument.class), commandName, false, listing.resolver(), GenericListCommand.class); targetModel = habitat.<DomDocument>getService(DomDocument.class).buildModel(targetType); if (logger.isLoggable(level)) { for (String paramName : cmdModel.getParametersNames()) { CommandModel.ParamModel param = cmdModel.getModelFor(paramName); logger.log(Level.FINE, "I take {0} parameters", param.getName()); } } } catch(Exception e) { String msg = localStrings.getLocalString(GenericCrudCommand.class, "GenericCreateCommand.command_model_exception", "Exception while creating the command model for the generic command {0} : {1}", commandName, e.getMessage()); LogHelper.log(logger, Level.SEVERE,ConfigApiLoggerInfo.GENERIC_CREATE_CMD_FAILED, e, commandName); throw new RuntimeException(msg, e); } }
/** * Gets the value of the loadBalancer property. * <p/> * <p/> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the loadBalancer property. * <p/> * <p/> * For example, to add a new item, do as follows: * <pre> * getLoadBalancer().add(newItem); * </pre> * <p/> * <p/> * <p/> * Objects of the following type(s) are allowed in the list * {@link LoadBalancer } */ @Element @Delete(value="delete-http-lb", resolver= TypeAndNameResolver.class, decorator=LoadBalancer.DeleteDecorator.class, i18n=@I18n("delete.http.lb.command")) @Listing(value="list-http-lbs", i18n=@I18n("list.http.lbs.command")) public List<LoadBalancer> getLoadBalancer();
/** * This really should not be here mixing clients and providers information , but for prototyping * it's fine. */ @Element("server-pool") @Create(value = "create-server-pool", resolver = VirtResolver.class, decorator = ServerPoolDecorator.class, i18n = @I18n("org.glassfish.virtualization.create-virt-serverPool")) @Listing(value = "list-server-pools", resolver = VirtResolver.class, i18n = @I18n("org.glassfish.virtualization.list-virt-groups")) @Delete(value="delete-server-pool", resolver= TypeAndNameResolver.class, i18n = @I18n("org.glassfish.virtualization.list-virt-serverPool")) List<ServerPoolConfig> getServerPools();
@Element @Create(value = "create-machine", resolver = ServerPoolResolver.class, i18n = @I18n("org.glassfish.virtualization.create-machine")) @Listing(value = "list-machines", resolver = ServerPoolResolver.class, i18n = @I18n("org.glassfish.virtualization.list-machines")) @Delete(value="delete-machine", resolver= WithinGroupResolver.class, i18n = @I18n("org.glassfish.virtualization.delete-machine")) List<MachineConfig> getMachines();
@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();
@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();
/** * Gets the value of the loadBalancer property. * <p/> * <p/> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the loadBalancer property. * <p/> * <p/> * For example, to add a new item, do as follows: * <pre> * getLoadBalancer().add(newItem); * </pre> * <p/> * <p/> * <p/> * Objects of the following type(s) are allowed in the list * {@link LoadBalancer } */ @Element @Delete(value="delete-http-lb", resolver= TypeAndNameResolver.class, decorator=LoadBalancer.DeleteDecorator.class, i18n=@I18n("delete.http.lb.command")) @Listing(value="list-http-lbs", i18n=@I18n("list.http.lbs.command")) public List<LoadBalancer> getLoadBalancer();
/** * Gets the value of the loadBalancer property. * <p/> * <p/> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the loadBalancer property. * <p/> * <p/> * For example, to add a new item, do as follows: * <pre> * getLoadBalancer().add(newItem); * </pre> * <p/> * <p/> * <p/> * Objects of the following type(s) are allowed in the list * {@link LoadBalancer } */ @Element @Delete(value="delete-http-lb", resolver= TypeAndNameResolver.class, decorator=LoadBalancer.DeleteDecorator.class, i18n=@I18n("delete.http.lb.command")) @Listing(value="list-http-lbs", i18n=@I18n("list.http.lbs.command")) public List<LoadBalancer> getLoadBalancer();
@Element @Create(value="enable-secure-admin-principal", decorator=SecureAdminPrincipal.CrDecorator.class, i18n=@I18n("enable.secure.admin.principal.command"), cluster=@org.glassfish.api.admin.ExecuteOn( value = {RuntimeType.DAS,RuntimeType.INSTANCE})) @Delete(value="disable-secure-admin-principal", resolver=SecureAdminPrincipal.Resolver.class, i18n=@I18n("disable.secure.admin.principal.command"), cluster=@org.glassfish.api.admin.ExecuteOn( value = {RuntimeType.DAS,RuntimeType.INSTANCE})) @Listing(value="list-secure-admin-principals", i18n=@I18n("list.secure.admin.principals.command")) public List<SecureAdminPrincipal> getSecureAdminPrincipal();
@Element @Create(value="enable-secure-admin-internal-user", decorator=SecureAdminInternalUser.CrDecorator.class, i18n=@I18n("enable.secure.admin.internal.user.command"), cluster=@org.glassfish.api.admin.ExecuteOn( value = {RuntimeType.DAS,RuntimeType.INSTANCE})) @Delete(value="disable-secure-admin-internal-user", resolver=TypeAndNameResolver.class, i18n=@I18n("disable.secure.admin.internal.user.command"), cluster=@org.glassfish.api.admin.ExecuteOn( value = {RuntimeType.DAS,RuntimeType.INSTANCE})) @Listing(value="list-secure-admin-internal-users", i18n=@I18n("list.secure.admin.internal.user.command")) public List<SecureAdminInternalUser> getSecureAdminInternalUser();