[AB-76] replaced usage templates for commands with a generated usage string, removed possibility to define the usage directly on the help

added Google guava dependency
minor fixes in documentation
fixed versions in main pom
This commit is contained in:
Sheldan
2020-09-24 02:40:44 +02:00
parent 76adda90a3
commit 5081c3174f
14 changed files with 358 additions and 14 deletions

View File

@@ -6,7 +6,6 @@ import lombok.Getter;
@Getter
@Builder
public class HelpInfo {
private String usage;
private String longHelp;
private String example;
@Builder.Default

View File

@@ -16,6 +16,7 @@ public interface CommandService {
void makeRoleImmuneForCommand(ACommand aCommand, ARole role);
void makeRoleAffectedByCommand(ACommand aCommand, ARole role);
void restrictCommand(ACommand aCommand, AServer server);
String generateUsage(Command command);
void unRestrictCommand(ACommand aCommand, AServer server);
void disAllowCommandForRole(ACommand aCommand, ARole role);
void disAllowFeatureForRole(FeatureEnum featureEnum, ARole role);

View File

@@ -14,6 +14,7 @@ import java.util.List;
@SuperBuilder
public class HelpCommandDetailsModel extends UserInitiatedServerContext {
private CommandConfiguration command;
private String usage;
private List<Role> allowedRoles;
private List<Role> immuneRoles;
private Boolean restricted;

View File

@@ -17,8 +17,6 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import java.util.Optional;
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.when;