Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fabrizzio-dotCMS committed Feb 15, 2023
1 parent 7567c37 commit e062ac4
Show file tree
Hide file tree
Showing 27 changed files with 1,274 additions and 795 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ public interface SiteAPI {
@Operation(
summary = " Returns the Site that matches the specified search criteria"
)
ResponseEntityView<List<Site>> getSites(@QueryParam("filter") String filter,
@QueryParam("showArchived") Boolean showArchived,
@QueryParam("showLive") Boolean showLive, @QueryParam("showSystem") Boolean showSystem,
ResponseEntityView<List<Site>> getSites(
@QueryParam("filter") String filter,
@QueryParam("archive") Boolean showArchived,
@QueryParam("live") Boolean showLive,
@QueryParam("system") Boolean showSystem,
@QueryParam("page") Integer page, @QueryParam("perPage") Integer perPage);

@POST
Expand Down Expand Up @@ -79,7 +81,7 @@ ResponseEntityView<List<Site>> getSites(@QueryParam("filter") String filter,
@Operation(
summary = " Returns the Site that is currently selected"
)
ResponseEntityView<Site>switchSite(@PathParam("id") String id);
ResponseEntityView<Boolean>switchSite(@PathParam("id") String id);

@POST
@Operation(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.dotcms.cli.command;


import com.dotcms.cli.command.contenttype.ContentTypeCommand;
import com.dotcms.cli.command.site.SiteCommand;
import com.dotcms.cli.command.contenttype.ContentTypeFind;
import com.dotcms.cli.command.contenttype.ContentTypePull;
import com.dotcms.cli.command.contenttype.ContentTypePush;
import com.dotcms.cli.command.contenttype.ContentTypeRemove;
import com.dotcms.cli.command.site.*;
import io.quarkus.picocli.runtime.annotations.TopCommand;
import picocli.CommandLine;
import picocli.CommandLine.Command;
Expand All @@ -14,7 +16,25 @@
description = {},
header = "dotCMS cli",
subcommands = {
LoginCommand.class, StatusCommand.class, InstanceCommand.class, SiteCommand.class, ContentTypeCommand.class
//-- Miscellaneous stuff
LoginCommand.class,
StatusCommand.class,
InstanceCommand.class,
//---- ContentType Related stuff
ContentTypeFind.class,
ContentTypePull.class,
ContentTypePush.class,
ContentTypeRemove.class,
//--- Site related stuff
SiteFind.class,
SitePull.class,
SitePush.class,
SiteArchive.class,
SiteStart.class,
SiteStop.class,
SiteCurrent.class,
SiteCopy.class,
SiteSwitch.class
}
)
public class EntryCommand {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ public class InstanceCommand implements Callable<Integer> {
//This combination should give me one or both but at least one selection needs to be made
static class RequireOneOrBothNotNoneGroup {

@CommandLine.Option(names = {"-ls", "--list"}, description = "Prints out a list of Content-types")
Boolean list;
@CommandLine.Option(names = {"-ls", "--list"}, description = "Prints out a list of available dotCMS Instance")
boolean list;

@CommandLine.Option(names = {"-a", "--activate"}, arity = "1", description = "Activate a profile by entering it's name.")
@CommandLine.Option(names = {"-act", "--activate"}, arity = "1", description = "Activate a profile by entering it's name.")
String activate;
}

Expand All @@ -78,7 +78,7 @@ public Integer call() {
.collect(Collectors.toMap(ServiceBean::name, Function.identity(),
(serviceBean1, serviceBean2) -> serviceBean1));

if (Boolean.TRUE.equals(options.list)) {
if (options.list) {

output.info("Available registered dotCMS servers.");

Expand Down
Loading

0 comments on commit e062ac4

Please sign in to comment.