diff --git a/hsarweb/WebContent/VAADIN/themes/hs/icons/bg.png b/hsarweb/WebContent/VAADIN/themes/hs/icons/bg.png
new file mode 100644
index 0000000..c6251e7
Binary files /dev/null and b/hsarweb/WebContent/VAADIN/themes/hs/icons/bg.png differ
diff --git a/hsarweb/WebContent/VAADIN/themes/hs/icons/database.png b/hsarweb/WebContent/VAADIN/themes/hs/icons/database.png
new file mode 100644
index 0000000..3d09261
Binary files /dev/null and b/hsarweb/WebContent/VAADIN/themes/hs/icons/database.png differ
diff --git a/hsarweb/WebContent/VAADIN/themes/hs/icons/database_key.png b/hsarweb/WebContent/VAADIN/themes/hs/icons/database_key.png
new file mode 100644
index 0000000..3334147
Binary files /dev/null and b/hsarweb/WebContent/VAADIN/themes/hs/icons/database_key.png differ
diff --git a/hsarweb/WebContent/VAADIN/themes/hs/icons/logo.png b/hsarweb/WebContent/VAADIN/themes/hs/icons/logo.png
new file mode 100644
index 0000000..f0d4dbc
Binary files /dev/null and b/hsarweb/WebContent/VAADIN/themes/hs/icons/logo.png differ
diff --git a/hsarweb/WebContent/VAADIN/themes/hs/icons/table.png b/hsarweb/WebContent/VAADIN/themes/hs/icons/table.png
new file mode 100644
index 0000000..abcd936
Binary files /dev/null and b/hsarweb/WebContent/VAADIN/themes/hs/icons/table.png differ
diff --git a/hsarweb/WebContent/VAADIN/themes/hs/icons/table_key.png b/hsarweb/WebContent/VAADIN/themes/hs/icons/table_key.png
new file mode 100644
index 0000000..34e23e2
Binary files /dev/null and b/hsarweb/WebContent/VAADIN/themes/hs/icons/table_key.png differ
diff --git a/hsarweb/WebContent/WEB-INF/web.xml b/hsarweb/WebContent/WEB-INF/web.xml
index 8a1cc6f..d9b0749 100644
--- a/hsarweb/WebContent/WEB-INF/web.xml
+++ b/hsarweb/WebContent/WEB-INF/web.xml
@@ -7,33 +7,28 @@
serverName
- http://agnes.ostwall195.de:8180
+ http://agnes.ostwall195.de:8080
backendURL
- https://config-dev.hostsharing.net:443/hsar/backend
+ https://agnes.ostwall195.de:9443/hsar/backend
xmlrpcURL
- https://config-dev.hostsharing.net:443/hsar/xmlrpc/hsadmin
+ https://agnes.ostwall195.de:9443/hsar/xmlrpc/hsadmin
Vaadin production mode
productionMode
false
-
- HSAdmin Module
- hsarmodules
- de.hsadmin.web.UnixUserModule,de.hsadmin.web.DomainModule,de.hsadmin.web.EMailAddressModule,de.hsadmin.web.EMailAliasModule,de.hsadmin.web.QueueTaskModule
-
CAS Authentication Filter
org.jasig.cas.client.authentication.AuthenticationFilter
casServerLoginUrl
- https://login-dev.hostsharing.net:443/cas/login
+ https://agnes.ostwall195.de:9443/cas/login
service
@@ -46,7 +41,7 @@
org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter
casServerUrlPrefix
- https://login-dev.hostsharing.net:443/cas
+ https://agnes.ostwall195.de:9443/cas
proxyReceptorUrl
diff --git a/hsarweb/build.xml b/hsarweb/build.xml
index 2d69b64..0a0d023 100644
--- a/hsarweb/build.xml
+++ b/hsarweb/build.xml
@@ -15,7 +15,6 @@
-
diff --git a/hsarweb/src/de/hsadmin/web/AbstractModule.java b/hsarweb/src/de/hsadmin/web/AbstractModule.java
index 8fa8576..47c4fbc 100644
--- a/hsarweb/src/de/hsadmin/web/AbstractModule.java
+++ b/hsarweb/src/de/hsadmin/web/AbstractModule.java
@@ -104,7 +104,6 @@ public abstract class AbstractModule implements Module {
}
layout.addComponent(component);
layout.setExpandRatio(component, 1.0f);
- layout.addComponent(new Link(localeConfig.getText("impressum.label"), new ExternalResource(localeConfig.getText("impressum.link"))));
}
diff --git a/hsarweb/src/de/hsadmin/web/DomainReadonlyModule.java b/hsarweb/src/de/hsadmin/web/DomainReadonlyModule.java
new file mode 100644
index 0000000..f08f0cd
--- /dev/null
+++ b/hsarweb/src/de/hsadmin/web/DomainReadonlyModule.java
@@ -0,0 +1,31 @@
+package de.hsadmin.web;
+
+import java.util.Date;
+
+import de.hsadmin.web.config.ModuleConfig;
+import de.hsadmin.web.config.PropertyConfig;
+import de.hsadmin.web.config.PropertyTableColumn;
+
+public class DomainReadonlyModule extends AbstractModule {
+
+ private static final long serialVersionUID = 1L;
+
+ private ModuleConfig moduleConfig;
+
+ @Override
+ protected void initModule() {
+ moduleConfig = new ModuleConfig("domain", getApplication().getLocale());
+ moduleConfig.addProperty(new PropertyConfig(moduleConfig, "id", Long.class, PropertyTableColumn.INTERNAL_KEY));
+ moduleConfig.addProperty(new PropertyConfig(moduleConfig, "name", String.class));
+ moduleConfig.addProperty(new PropertyConfig(moduleConfig, "user", String.class));
+ moduleConfig.addProperty(new PropertyConfig(moduleConfig, "pac", String.class, PropertyTableColumn.HIDDEN));
+ moduleConfig.addProperty(new PropertyConfig(moduleConfig, "hive", String.class, PropertyTableColumn.HIDDEN));
+ moduleConfig.addProperty(new PropertyConfig(moduleConfig, "since", Date.class));
+ }
+
+ @Override
+ public ModuleConfig getModuleConfig() {
+ return moduleConfig;
+ }
+
+}
diff --git a/hsarweb/src/de/hsadmin/web/GenericModule.java b/hsarweb/src/de/hsadmin/web/GenericModule.java
index 4b17369..4e1bcb1 100644
--- a/hsarweb/src/de/hsadmin/web/GenericModule.java
+++ b/hsarweb/src/de/hsadmin/web/GenericModule.java
@@ -13,18 +13,18 @@ public abstract class GenericModule extends AbstractModule implements InsertAble
private static final long serialVersionUID = 1L;
public void insertRow(Map paramHash) throws HsarwebException {
- getApplication().getRemote().callAdd(getModuleConfig().getName(), paramHash);
+ getApplication().getRemote().callAdd(getModuleConfig().getRemoteName(), paramHash);
}
public void deleteRow(Map paramHash) throws HsarwebException {
- getApplication().getRemote().callDelete(getModuleConfig().getName(), paramHash);
+ getApplication().getRemote().callDelete(getModuleConfig().getRemoteName(), paramHash);
}
public void updateRow(Map paramHash) throws HsarwebException {
Map whereHash = new HashMap();
String idKey = findIdKey();
whereHash.put(idKey, paramHash.get(idKey));
- getApplication().getRemote().callUpdate(getModuleConfig().getName(), paramHash, whereHash);
+ getApplication().getRemote().callUpdate(getModuleConfig().getRemoteName(), paramHash, whereHash);
}
private String findIdKey() {
diff --git a/hsarweb/src/de/hsadmin/web/HomeModule.java b/hsarweb/src/de/hsadmin/web/HomeModule.java
new file mode 100644
index 0000000..de13787
--- /dev/null
+++ b/hsarweb/src/de/hsadmin/web/HomeModule.java
@@ -0,0 +1,173 @@
+package de.hsadmin.web;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import com.vaadin.terminal.Sizeable;
+import com.vaadin.terminal.ThemeResource;
+import com.vaadin.ui.AbstractComponent;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.Form;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.Window;
+import com.vaadin.ui.Button.ClickEvent;
+
+import de.hsadmin.web.config.ComponentFactory;
+import de.hsadmin.web.config.ModuleConfig;
+import de.hsadmin.web.config.PropertyConfig;
+import de.hsadmin.web.config.PropertyTableColumn;
+import de.hsadmin.web.vaadin.GenericForm;
+import de.hsadmin.web.vaadin.PasswordPropertyFieldFactory;
+
+public class HomeModule extends AbstractModule implements ComponentFactory, UpdateAble {
+
+ private ModuleConfig moduleConfig;
+ private MainApplication application;
+
+ public HomeModule() {
+ super();
+ setComponentFactory(this);
+ }
+
+ public void updateRow(Map paramHash) throws HsarwebException {
+ Map whereHash = new HashMap();
+ String idKey = findIdKey();
+ whereHash.put(idKey, paramHash.get(idKey));
+ paramHash.remove(idKey);
+ application.getRemote().callUpdate(moduleConfig.getRemoteName(), paramHash, whereHash);
+ }
+
+ private String findIdKey() {
+ List propertyList = getModuleConfig().getPropertyList();
+ String idKey = null;
+ for (PropertyConfig propConf : propertyList) {
+ PropertyTableColumn propTableColumn = propConf.getPropTableColumn();
+ if (PropertyTableColumn.INTERNAL_KEY == propTableColumn) {
+ idKey = propConf.getId();
+ return idKey;
+ }
+ }
+ return idKey;
+ }
+ @Override
+ public ModuleConfig getModuleConfig() {
+ return moduleConfig;
+ }
+
+ @Override
+ protected void initModule() {
+ application = getApplication();
+ moduleConfig = new ModuleConfig("home", application.getLocale());
+ moduleConfig.setRemoteName("user");
+ PropertyConfig pacProp = new PropertyConfig(moduleConfig, "pac", String.class, PropertyTableColumn.HIDDEN);
+ pacProp.setReadOnly(true);
+ PropertyConfig idProp = new PropertyConfig(moduleConfig, "id", Long.class, PropertyTableColumn.INTERNAL_KEY);
+ idProp.setReadOnly(true);
+ PropertyConfig useridProp = new PropertyConfig(moduleConfig, "userid", Long.class, PropertyTableColumn.HIDDEN);
+ useridProp.setReadOnly(true);
+ PropertyConfig nameProp = new PropertyConfig(moduleConfig, "name", String.class);
+ nameProp.setReadOnly(true);
+ PropertyConfig passwordProp = new PropertyConfig(moduleConfig, "password", String.class, PropertyTableColumn.NONE, new PasswordPropertyFieldFactory(this));
+ PropertyConfig commentProp = new PropertyConfig(moduleConfig, "comment", String.class);
+ commentProp.setReadOnly(true);
+ moduleConfig.addProperty(idProp);
+ moduleConfig.addProperty(pacProp);
+ moduleConfig.addProperty(useridProp);
+ moduleConfig.addProperty(nameProp);
+ moduleConfig.addProperty(commentProp);
+ moduleConfig.addProperty(passwordProp);
+ }
+
+ @Override
+ public Object initComponent() throws HsarwebException {
+ final Module thisModule = this;
+ VerticalLayout layout = new VerticalLayout();
+ Button button = new Button(moduleConfig.getLabel("change_password"));
+ ThemeResource icon = new ThemeResource(moduleConfig.getLabel("change_password_icon"));
+ button.setIcon(icon);
+ Map whereHash = new HashMap();
+ whereHash.put("name", application.getLogin());
+ Long key = -1L;
+ try {
+ Object object = application.getRemote().callSearch(moduleConfig.getRemoteName(), whereHash);
+ if (object instanceof Object[] && ((Object[]) object).length > 0) {
+ key = Long.parseLong((String) ((Map, ?>) ((Object[]) object)[0]).get("id"));
+ }
+ } catch (HsarwebException e) {
+ e.printStackTrace();
+ getApplication().showSystemException(e);
+ }
+ button.setData(key);
+ button.addListener(new Button.ClickListener() {
+ private static final long serialVersionUID = 1L;
+ private Window childWindow;
+ @Override
+ public void buttonClick(ClickEvent event) {
+ Long data = (Long) event.getButton().getData();
+ final GenericForm genericForm = new GenericForm(thisModule, data);
+ final Form form = genericForm.createUpdateForm();
+ childWindow = new Window(moduleConfig.getLabel("update"));
+ childWindow.setWidth(640.0f, Sizeable.UNITS_PIXELS);
+ VerticalLayout vLayout = new VerticalLayout();
+ vLayout.setMargin(true);
+ vLayout.setSpacing(true);
+ vLayout.addComponent(form);
+ HorizontalLayout hLayout = new HorizontalLayout();
+ Button btSaveRow = new Button(moduleConfig.getLabel("save"));
+ btSaveRow.setData(data);
+ btSaveRow.addListener(new Button.ClickListener() {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void buttonClick(ClickEvent event) {
+ application.getMainWindow().removeWindow(childWindow);
+ try {
+ Map map = new HashMap();
+ map.put("id", ((Long) event.getButton().getData()).toString());
+ Iterator componentIterator = form.getLayout().getComponentIterator();
+ while (componentIterator.hasNext()) {
+ Component component = (Component) componentIterator.next();
+ if (component instanceof AbstractComponent) {
+ Object data = ((AbstractComponent) component).getData();
+ String propName = (String) data;
+ if ("password".equals(propName)) {
+ PropertyConfig property = moduleConfig.getProperty(propName);
+ map.put(propName, property.getPropFieldFactory().getValue(property, component));
+ }
+ }
+ }
+ ((UpdateAble) thisModule).updateRow(map);
+ } catch (HsarwebException e) {
+ application.showUserException(e);
+ }
+ }
+ });
+ Button btAbort = new Button(moduleConfig.getLabel("abort"));
+ btAbort.addListener(new Button.ClickListener() {
+ private static final long serialVersionUID = 1L;
+ @Override
+ public void buttonClick(ClickEvent event) {
+ application.getMainWindow().removeWindow(childWindow);
+ }
+ });
+ hLayout.addComponent(btSaveRow);
+ hLayout.addComponent(btAbort);
+ vLayout.addComponent(hLayout);
+ childWindow.setContent(vLayout);
+ childWindow.setModal(true);
+ application.getMainWindow().addWindow(childWindow);
+ }
+ });
+ layout.addComponent(button);
+ return layout;
+ }
+
+ @Override
+ public void loadData() throws HsarwebException {
+
+ }
+
+}
diff --git a/hsarweb/src/de/hsadmin/web/MainApplication.java b/hsarweb/src/de/hsadmin/web/MainApplication.java
index aaf201d..60b89e0 100644
--- a/hsarweb/src/de/hsadmin/web/MainApplication.java
+++ b/hsarweb/src/de/hsadmin/web/MainApplication.java
@@ -14,10 +14,15 @@ import org.jasig.cas.client.authentication.AuthenticationFilter;
import org.jasig.cas.client.validation.Assertion;
import com.vaadin.Application;
+import com.vaadin.terminal.ExternalResource;
import com.vaadin.terminal.Terminal;
import com.vaadin.terminal.ThemeResource;
import com.vaadin.terminal.gwt.server.HttpServletRequestListener;
import com.vaadin.ui.Component;
+import com.vaadin.ui.Embedded;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Link;
+import com.vaadin.ui.Panel;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
@@ -49,12 +54,33 @@ public class MainApplication extends Application implements HttpServletRequestLi
}
localeConfig = new LocaleConfig(locale, "main");
remote = new Remote(this);
+ String role = "NONE";
+ try {
+ Object rolesArrayObj = remote.callSearch("role", null);
+ if (rolesArrayObj != null && rolesArrayObj instanceof Object[]) {
+ Object[] rolesArray = (Object[]) rolesArrayObj;
+ if (rolesArray.length > 0 && rolesArray[0] instanceof Map, ?>) {
+ role = (String) ((Map, ?>) rolesArray[0]).get("role");
+ }
+ }
+ } catch (HsarwebException e) {
+ showSystemException(e);
+ }
Window mainWindow = new Window(localeConfig.getText("applicationtitle"));
VerticalLayout verticalLayout = new VerticalLayout();
verticalLayout.setSizeFull();
+ HorizontalLayout banner = new HorizontalLayout();
+ Embedded image = new Embedded(null, new ThemeResource("../hs/icons/logo.png"));
+ image.setMimeType("image/png");
+ Embedded bgImage = new Embedded(null, new ThemeResource("../hs/icons/bg.png"));
+ bgImage.setMimeType("image/png");
+ banner.addComponent(image);
+ banner.addComponent(bgImage);
+ banner.setExpandRatio(bgImage, 1.0f);
+ verticalLayout.addComponent(banner);
TabSheet tabs = new TabSheet();
tabs.setSizeFull();
- String modulesParamString = getContextParam("hsarmodules");
+ String modulesParamString = localeConfig.getText("modules." + role);
modules = new HashMap();
Module firstModule = null;
for (String className : modulesParamString.split(",")) {
@@ -74,6 +100,8 @@ public class MainApplication extends Application implements HttpServletRequestLi
}
tabs.addListener(this);
verticalLayout.addComponent(tabs);
+ verticalLayout.setExpandRatio(tabs, 1.0f);
+ verticalLayout.addComponent(new Link(localeConfig.getText("impressum.label"), new ExternalResource(localeConfig.getText("impressum.link"))));
mainWindow.setContent(verticalLayout);
setMainWindow(mainWindow);
setErrorHandler(new Terminal.ErrorListener() {
diff --git a/hsarweb/src/de/hsadmin/web/PacketReadonlyModule.java b/hsarweb/src/de/hsadmin/web/PacketReadonlyModule.java
new file mode 100644
index 0000000..828837d
--- /dev/null
+++ b/hsarweb/src/de/hsadmin/web/PacketReadonlyModule.java
@@ -0,0 +1,33 @@
+package de.hsadmin.web;
+
+import java.util.Date;
+
+import de.hsadmin.web.config.ModuleConfig;
+import de.hsadmin.web.config.PropertyConfig;
+import de.hsadmin.web.config.PropertyTableColumn;
+
+public class PacketReadonlyModule extends AbstractModule {
+
+ private static final long serialVersionUID = 1L;
+
+ private ModuleConfig moduleConfig;
+
+ @Override
+ protected void initModule() {
+ moduleConfig = new ModuleConfig("pac", getApplication().getLocale());
+ moduleConfig.addProperty(new PropertyConfig(moduleConfig, "id", Long.class, PropertyTableColumn.INTERNAL_KEY));
+ moduleConfig.addProperty(new PropertyConfig(moduleConfig, "name", String.class));
+ moduleConfig.addProperty(new PropertyConfig(moduleConfig, "basepac", String.class));
+ moduleConfig.addProperty(new PropertyConfig(moduleConfig, "components", String.class));
+ moduleConfig.addProperty(new PropertyConfig(moduleConfig, "hive", String.class));
+ moduleConfig.addProperty(new PropertyConfig(moduleConfig, "curinetaddr", String.class));
+ moduleConfig.addProperty(new PropertyConfig(moduleConfig, "created", Date.class));
+ moduleConfig.addProperty(new PropertyConfig(moduleConfig, "customer", String.class, PropertyTableColumn.HIDDEN));
+ }
+
+ @Override
+ public ModuleConfig getModuleConfig() {
+ return moduleConfig;
+ }
+
+}
diff --git a/hsarweb/src/de/hsadmin/web/Remote.java b/hsarweb/src/de/hsadmin/web/Remote.java
index ae6188c..512d7de 100644
--- a/hsarweb/src/de/hsadmin/web/Remote.java
+++ b/hsarweb/src/de/hsadmin/web/Remote.java
@@ -2,6 +2,7 @@ package de.hsadmin.web;
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.HashMap;
import java.util.Map;
import org.apache.xmlrpc.XmlRpcException;
@@ -37,7 +38,7 @@ public class Remote {
Object[] params = new Object[3];
params[0] = app.getLogin();
params[1] = app.getProxyTicket();
- params[2] = param1;
+ params[2] = param1 != null ? param1 : new HashMap();
return xmlrpcCall(module + "." + operation, params);
}
@@ -45,8 +46,8 @@ public class Remote {
Object[] params = new Object[4];
params[0] = app.getLogin();
params[1] = app.getProxyTicket();
- params[2] = param1;
- params[3] = param2;
+ params[2] = param1 != null ? param1 : new HashMap();
+ params[3] = param2 != null ? param2 : new HashMap();
return xmlrpcCall(module + "." + operation, params);
}
diff --git a/hsarweb/src/de/hsadmin/web/config/ModuleConfig.java b/hsarweb/src/de/hsadmin/web/config/ModuleConfig.java
index 776afd8..34438fd 100644
--- a/hsarweb/src/de/hsadmin/web/config/ModuleConfig.java
+++ b/hsarweb/src/de/hsadmin/web/config/ModuleConfig.java
@@ -12,12 +12,14 @@ public class ModuleConfig implements Serializable {
private static final long serialVersionUID = 1L;
private String name;
+ private String remoteName;
private List propertyList;
private Map propertyMap;
private LocaleConfig localeConfig;
public ModuleConfig(String name, Locale locale) {
this.name = name;
+ this.remoteName = name;
propertyList = new ArrayList();
propertyMap = new HashMap();
localeConfig = new LocaleConfig(locale, name);
@@ -27,6 +29,14 @@ public class ModuleConfig implements Serializable {
return name;
}
+ public String getRemoteName() {
+ return remoteName;
+ }
+
+ public void setRemoteName(String name) {
+ remoteName = name;
+ }
+
public void addProperty(PropertyConfig property) {
propertyList.add(property);
propertyMap.put(property.getId(), property);
diff --git a/hsarweb/src/de/hsadmin/web/vaadin/EMailTargetPropertyFieldFactory.java b/hsarweb/src/de/hsadmin/web/vaadin/EMailTargetPropertyFieldFactory.java
index c3cf10c..106d30a 100644
--- a/hsarweb/src/de/hsadmin/web/vaadin/EMailTargetPropertyFieldFactory.java
+++ b/hsarweb/src/de/hsadmin/web/vaadin/EMailTargetPropertyFieldFactory.java
@@ -141,8 +141,12 @@ public class EMailTargetPropertyFieldFactory implements PropertyFieldFactory {
leftPart.setNewItemsAllowed(false);
leftPart.setNullSelectionAllowed(false);
leftPart.addItem(" ");
- leftPart.addItem("User");
- leftPart.addItem("Alias");
+ if (users != null && users.size() > 0) {
+ leftPart.addItem("User");
+ }
+ if (mailAliases != null && mailAliases.size() > 0) {
+ leftPart.addItem("Alias");
+ }
leftPart.addItem("EMail");
String type = "";
if (target != null && target.length() > 0) {
diff --git a/hsarweb/src/de/hsadmin/web/vaadin/GenericForm.java b/hsarweb/src/de/hsadmin/web/vaadin/GenericForm.java
index 468cabe..c04cee5 100644
--- a/hsarweb/src/de/hsadmin/web/vaadin/GenericForm.java
+++ b/hsarweb/src/de/hsadmin/web/vaadin/GenericForm.java
@@ -48,7 +48,7 @@ public class GenericForm {
ModuleConfig config = module.getModuleConfig();
Map where = new HashMap();
where.put(findIdKey(), entityId.toString());
- Object searchResult = application.getRemote().callSearch(config.getName(), where);
+ Object searchResult = application.getRemote().callSearch(config.getRemoteName(), where);
if (searchResult instanceof Object[]) {
Map, ?> row = (Map, ?>) (((Object[]) searchResult)[0]);
Form f = new Form();
diff --git a/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java b/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java
index 034734c..ae16bde 100644
--- a/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java
+++ b/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java
@@ -36,13 +36,15 @@ import de.hsadmin.web.config.PropertyTableColumn;
public class TableComponentFactory implements ComponentFactory, Serializable {
private static final long serialVersionUID = 1L;
- private static final DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT);
+ private static final DateFormat serverDateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
private Module module;
private Table table;
+ private DateFormat browserDateFormat;
public TableComponentFactory(Module module) {
this.module = module;
+ this.browserDateFormat = DateFormat.getDateInstance(DateFormat.SHORT, module.getApplication().getLocale());
}
@Override
@@ -55,7 +57,7 @@ public class TableComponentFactory implements ComponentFactory, Serializable {
Property property) {
if (Date.class == property.getType()) {
try {
- return df.format(property.getValue());
+ return browserDateFormat.format(property.getValue());
} catch (IllegalArgumentException e) {
return "---";
}
@@ -104,7 +106,7 @@ public class TableComponentFactory implements ComponentFactory, Serializable {
table.removeAllItems();
try {
ModuleConfig moduleConfig = module.getModuleConfig();
- Object callSearch = module.getApplication().getRemote().callSearch(moduleConfig.getName(), new HashMap());
+ Object callSearch = module.getApplication().getRemote().callSearch(moduleConfig.getRemoteName(), new HashMap());
List propertyList = moduleConfig.getPropertyList();
if (callSearch instanceof Object[]) {
for (Object row : ((Object[])callSearch)) {
@@ -129,7 +131,7 @@ public class TableComponentFactory implements ComponentFactory, Serializable {
}
if (Date.class.equals(prop.getType())) {
try {
- itemData[idx] = df.parse((String) valueObject);
+ itemData[idx] = serverDateFormat.parse((String) valueObject);
} catch (ParseException e) {
Calendar cal = Calendar.getInstance();
cal.clear();
diff --git a/hsarweb/src/texts/home.properties b/hsarweb/src/texts/home.properties
new file mode 100644
index 0000000..86b846a
--- /dev/null
+++ b/hsarweb/src/texts/home.properties
@@ -0,0 +1,18 @@
+id=identifier
+name=username
+password=password
+password1=new password
+password2=repeat password
+comment=comment
+shell=shell
+userid=numeric userid
+homedir=home directory
+pac=packet
+moduletitle=password
+moduleicon=../runo/icons/16/lock.png
+change_password_icon=../runo/icons/16/lock.png
+hello=Hello world!
+change_password=change password
+update=change password
+save=save password
+abort=abort
\ No newline at end of file
diff --git a/hsarweb/src/texts/home_de.properties b/hsarweb/src/texts/home_de.properties
new file mode 100644
index 0000000..820fe6e
--- /dev/null
+++ b/hsarweb/src/texts/home_de.properties
@@ -0,0 +1,18 @@
+id=Schlüssel
+name=Benutzername
+password=Passwort
+password1=neues Passwort
+password2=Passwort-Wiederholung
+comment=Kommentar
+shell=Shell
+userid=Benutzerkennung
+homedir=Heimat Verzeichnis
+pac=Paket
+moduletitle=Passwort
+moduleicon=../runo/icons/16/lock.png
+change_password_icon=../runo/icons/16/lock.png
+hello=Hallo Welt!
+change_password=Passwort ändern
+update=Passwort ändern
+save=Passwort speichern
+abort=abbrechen
\ No newline at end of file
diff --git a/hsarweb/src/texts/main.properties b/hsarweb/src/texts/main.properties
index 2eff361..4995ccd 100644
--- a/hsarweb/src/texts/main.properties
+++ b/hsarweb/src/texts/main.properties
@@ -6,4 +6,11 @@ save=save
abort=abort
new=new
impressum.label=Published by
-impressum.link=http://www.hostsharing.net/impressum
\ No newline at end of file
+impressum.link=https://www.hostsharing.net/impressum
+logo.link=https://www.hostsharing.net/logo.png
+modules.NONE=de.hsadmin.web.HomeModule
+modules.USER=de.hsadmin.web.HomeModule
+modules.DOM_ADMIN=de.hsadmin.web.DomainReadonlyModule,de.hsadmin.web.EMailAddressModule,de.hsadmin.web.HomeModule
+modules.PAC_ADMIN=de.hsadmin.web.UnixUserModule,de.hsadmin.web.DomainModule,de.hsadmin.web.EMailAddressModule,de.hsadmin.web.EMailAliasModule,de.hsadmin.web.QueueTaskModule
+modules.CUSTOMER=de.hsadmin.web.PacketReadonlyModule,de.hsadmin.web.UnixUserModule,de.hsadmin.web.DomainModule,de.hsadmin.web.EMailAddressModule,de.hsadmin.web.EMailAliasModule,de.hsadmin.web.QueueTaskModule
+modules.HOSTMASTER=de.hsadmin.web.PacketReadonlyModule,de.hsadmin.web.UnixUserModule,de.hsadmin.web.DomainModule,de.hsadmin.web.EMailAddressModule,de.hsadmin.web.EMailAliasModule,de.hsadmin.web.QueueTaskModule
diff --git a/hsarweb/src/texts/main_de.properties b/hsarweb/src/texts/main_de.properties
index 9ab358d..7e2fa73 100644
--- a/hsarweb/src/texts/main_de.properties
+++ b/hsarweb/src/texts/main_de.properties
@@ -6,4 +6,5 @@ save=speichern
abort=abbrechen
new=Eintrag anlegen
impressum.label=Impressum
-impressum.link=http://www.hostsharing.net/impressum
\ No newline at end of file
+impressum.link=https://www.hostsharing.net/impressum
+logo.link=https://www.hostsharing.net/logo.png
diff --git a/hsarweb/src/texts/pac.properties b/hsarweb/src/texts/pac.properties
new file mode 100644
index 0000000..80c7eef
--- /dev/null
+++ b/hsarweb/src/texts/pac.properties
@@ -0,0 +1,10 @@
+id=identifier
+name=packet
+curinetaddr=inet address
+created=created
+basepac=packet type
+components=packet options
+hive=host
+customer=customer
+moduletitle=packets
+moduleicon=../runo/icons/16/document.png
diff --git a/hsarweb/src/texts/pac_de.properties b/hsarweb/src/texts/pac_de.properties
new file mode 100644
index 0000000..fdcc92e
--- /dev/null
+++ b/hsarweb/src/texts/pac_de.properties
@@ -0,0 +1,10 @@
+id=Schlüssel
+name=Paket
+curinetaddr=IP Adresse
+created=angelegt
+basepac=Pakettyp
+components=Paket-Optionen
+hive=Server
+customer=Mitglied
+moduletitle=Pakete
+moduleicon=../runo/icons/16/document.png