This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jboss.aesh.cl.CommandDefinition; | |
import org.jboss.aesh.cl.GroupCommandDefinition; | |
import org.jboss.aesh.cl.Option; | |
import org.jboss.aesh.console.AeshConsole; | |
import org.jboss.aesh.console.AeshConsoleBuilder; | |
import org.jboss.aesh.console.Prompt; | |
import org.jboss.aesh.console.command.Command; | |
import org.jboss.aesh.console.command.CommandResult; | |
import org.jboss.aesh.console.command.invocation.CommandInvocation; | |
import org.jboss.aesh.console.command.registry.AeshCommandRegistryBuilder; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@CommandDefinition(name = "testparams", description = "") | |
public class TestParams implements Command { | |
@Option(shortName = 'f', description = "set the foo value") | |
private String foo; | |
@Option(shortName = 'b', required = true) | |
private String bar; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jboss.aesh.console.AeshConsoleCallback; | |
import org.jboss.aesh.console.Console; | |
import org.jboss.aesh.console.ConsoleCallback; | |
import org.jboss.aesh.console.ConsoleOperation; | |
import org.jboss.aesh.console.Prompt; | |
import org.jboss.aesh.console.settings.SettingsBuilder; | |
public class ConsoleExample { | |
public static void main(String... args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jboss.aesh.cl.Arguments; | |
import org.jboss.aesh.cl.CommandDefinition; | |
import org.jboss.aesh.console.AeshConsole; | |
import org.jboss.aesh.console.AeshConsoleBuilder; | |
import org.jboss.aesh.console.Prompt; | |
import org.jboss.aesh.console.command.Command; | |
import org.jboss.aesh.console.command.CommandResult; | |
import org.jboss.aesh.console.command.invocation.CommandInvocation; | |
import org.jboss.aesh.console.command.registry.AeshCommandRegistryBuilder; | |
import org.jboss.aesh.console.command.registry.CommandRegistry; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat aeshtest.sh | |
#!/bin/bash | |
java -cp . AeshExample <<EOFDEL | |
login | |
admin | |
admin!234 | |
ls | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface HibernateValueMapper { | |
void $hibernate_setValue(Object value, String fieldName); | |
} | |
bytecode impl in entities: | |
... | |
public void $hibernate_setValue(Object value, String fieldName) { | |
if(fieldName == "name") | |
name = (String) value; | |
else if(fieldName == "address"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[general] | |
accounts = work | |
maxsyncaccounts = 1 | |
maxconnections = 1 | |
ui = Noninteractive.Basic | |
#ui = Noninteractive.quiet | |
# -------------------- Work details. -------------------- | |
[Account work] | |
localrepository = work-Local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set default values for all following accounts. | |
defaults | |
#tls on | |
#tls_trust_file /etc/ssl/certs/ca-certificates.crt | |
logfile ~/.msmtp.log | |
# redhat | |
account redhat | |
host smtp.corp.redhat.com | |
from spederse@redhat.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
bla | |
bla | |
bla | |
./jboss-cli.sh -c <<EOF | |
bob | |
admin123$ | |
batch | |
/system-property=bar:add(value=foo) | |
run-batch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InjectCommand | |
AeshCommand command | |
public interface Command { | |
void execute() throws IOException; | |
} | |
vs | |
public interface Command { |