This commit is contained in:
Peter Hormanns 2017-07-20 17:15:27 +02:00
commit d409ef5238
6 changed files with 27 additions and 7 deletions

View File

@ -14,6 +14,11 @@
<name>HSAdmin-Cli</name> <name>HSAdmin-Cli</name>
<dependencies> <dependencies>
<dependency>
<groupId>de.hsadmin</groupId>
<artifactId>framework</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency> <dependency>
<groupId>de.hsadmin</groupId> <groupId>de.hsadmin</groupId>
<artifactId>framework</artifactId> <artifactId>framework</artifactId>
@ -37,12 +42,12 @@
<dependency> <dependency>
<groupId>jline</groupId> <groupId>jline</groupId>
<artifactId>jline</artifactId> <artifactId>jline</artifactId>
<version>2.14.2</version> <version>2.14.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-cli</groupId> <groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId> <artifactId>commons-cli</artifactId>
<version>1.3.1</version> <version>1.4</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -13,6 +13,7 @@ import jline.console.history.FileHistory;
public class ConsoleWrapper implements PasswordReader { public class ConsoleWrapper implements PasswordReader {
private ConsoleReader cons; private ConsoleReader cons;
private FileHistory history;
private String prompt; private String prompt;
public void open(final String prompt) throws JSCliException { public void open(final String prompt) throws JSCliException {
@ -22,7 +23,8 @@ public class ConsoleWrapper implements PasswordReader {
cons.setExpandEvents(false); cons.setExpandEvents(false);
cons.setPrompt(prompt); cons.setPrompt(prompt);
final String userHome = System.getProperty("user.home"); final String userHome = System.getProperty("user.home");
cons.setHistory(new FileHistory(new File(userHome + "/.hsscript_history"))); history = new FileHistory(new File(userHome + "/.hsscript_history"));
cons.setHistory(history);
} catch (IOException e) { } catch (IOException e) {
throw new JSCliException(e); throw new JSCliException(e);
} }
@ -37,6 +39,12 @@ public class ConsoleWrapper implements PasswordReader {
return line; return line;
} catch (IOException e) { } catch (IOException e) {
throw new JSCliException(e); throw new JSCliException(e);
} finally {
try {
history.flush();
} catch (IOException e) {
// dont care about
}
} }
} }

View File

@ -8,7 +8,7 @@ public enum MemberShareAction {
/** Zeichnung */ /** Zeichnung */
SUBSCRIPTION, SUBSCRIPTION,
/** Kündigung */ /** Kuendigung */
UNSUBSCRIPTION UNSUBSCRIPTION
} }

View File

@ -1,7 +1,5 @@
package de.hsadmin.bo.pac; package de.hsadmin.bo.pac;
import java.util.Date;
//import javax.jms.JMSException; //import javax.jms.JMSException;
//import javax.jms.Queue; //import javax.jms.Queue;
//import javax.jms.QueueConnection; //import javax.jms.QueueConnection;

View File

@ -34,6 +34,9 @@ public class GenericEditorFactory implements IEditorFactory, Serializable {
if ("domainoptions".equals(inputName)) { if ("domainoptions".equals(inputName)) {
return getDomainOptionsEditor(action, propertyInfo, session, whereContext); return getDomainOptionsEditor(action, propertyInfo, session, whereContext);
} }
if ("validsubdomainnames".equals(inputName)) {
return getValidsubdomainnamesEditor(action, propertyInfo, session, whereContext);
}
} }
if ("emailaddress".equals(module) || "emailalias".equals(module)) { if ("emailaddress".equals(module) || "emailalias".equals(module)) {
if ("target".equals(inputName)) { if ("target".equals(inputName)) {
@ -64,6 +67,12 @@ public class GenericEditorFactory implements IEditorFactory, Serializable {
} }
private IHSEditor getValidsubdomainnamesEditor(final String action, final PropertyInfo propertyInfo, final HSAdminSession session,
final Map<String, String> whereContext) {
return PanelToolbar.ACTION_EDIT.equals(action) ? getEditor(action, propertyInfo) : new NullEditor();
}
private IHSEditor getDomainOptionsEditor(final String action, final PropertyInfo propertyInfo, final HSAdminSession session, final Map<String, String> whereContext) { private IHSEditor getDomainOptionsEditor(final String action, final PropertyInfo propertyInfo, final HSAdminSession session, final Map<String, String> whereContext) {
return PanelToolbar.ACTION_EDIT.equals(action) ? new DomainOptionsEditor(propertyInfo, session, whereContext) : new NullEditor(); return PanelToolbar.ACTION_EDIT.equals(action) ? new DomainOptionsEditor(propertyInfo, session, whereContext) : new NullEditor();
} }

View File

@ -96,7 +96,7 @@ quota_softlimit=Quota (Soft-Limit)
quota_hardlimit=Quota (Hard-Limit) quota_hardlimit=Quota (Hard-Limit)
target=Postfach/Weiterleitung target=Postfach/Weiterleitung
owner=Domain-Administrator owner=Domain-Administrator
validsubdomainnames=gültige Subdomain validsubdomainnames=gültige Subdomains ('*' für Wildcard)
encoding=Zeichen-Kodierung encoding=Zeichen-Kodierung
localpart=lokaler Teil localpart=lokaler Teil
subdomain=Subdomain subdomain=Subdomain