CCM NG: Another part of the new applicaton admin ui.
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4109 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
6bf9cc8a5d
commit
10ec4575d2
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* Copyright (C) 2016 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.ui.admin.applications;
|
||||
|
||||
import com.arsdigita.bebop.ActionLink;
|
||||
import com.arsdigita.bebop.BoxPanel;
|
||||
import com.arsdigita.bebop.Page;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.PropertySheet;
|
||||
import com.arsdigita.bebop.SimpleContainer;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
|
||||
import static com.arsdigita.ui.admin.AdminUiConstants.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
public abstract class AbstractApplicationTypePane extends BoxPanel {
|
||||
|
||||
private final SimpleContainer pane;
|
||||
private final PropertySheet propertySheet;
|
||||
|
||||
public AbstractApplicationTypePane() {
|
||||
super(BoxPanel.VERTICAL);
|
||||
|
||||
final BoxPanel links = new BoxPanel(BoxPanel.HORIZONTAL);
|
||||
final ActionLink paneLink = new ActionLink(getPaneLabel());
|
||||
paneLink.addActionListener(e -> {
|
||||
final PageState state = e.getPageState();
|
||||
showPane(state);
|
||||
});
|
||||
links.add(paneLink);
|
||||
final ActionLink propertySheetLink = new ActionLink(
|
||||
new GlobalizedMessage(
|
||||
"ui.admin.appliations.type_pane.info_sheet",
|
||||
ADMIN_BUNDLE));
|
||||
propertySheetLink.addActionListener(e -> {
|
||||
final PageState state = e.getPageState();
|
||||
showPropertySheet(state);
|
||||
});
|
||||
links.add(propertySheetLink);
|
||||
add(links);
|
||||
|
||||
pane = createPane();
|
||||
add(pane);
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected abstract SimpleContainer createPane();
|
||||
|
||||
protected abstract GlobalizedMessage getPaneLabel();
|
||||
|
||||
@Override
|
||||
public void register(final Page page) {
|
||||
super.register(page);
|
||||
|
||||
page.setVisibleDefault(pane, true);
|
||||
page.setVisibleDefault(propertySheet, false);
|
||||
}
|
||||
|
||||
protected void showPane(final PageState state) {
|
||||
pane.setVisible(state, true);
|
||||
propertySheet.setVisible(state, false);
|
||||
}
|
||||
|
||||
protected void showPropertySheet(final PageState state) {
|
||||
pane.setVisible(state, false);
|
||||
propertySheet.setVisible(state, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright (C) 2016 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.ui.admin.applications;
|
||||
|
||||
import com.arsdigita.bebop.PropertySheetModel;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import org.libreccm.web.ApplicationType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
public class ApplicationTypePropertySheetModel implements PropertySheetModel {
|
||||
|
||||
private static enum AppTypeProperty {
|
||||
TITLE,
|
||||
DESC,
|
||||
APP_CLASS,
|
||||
SINGLETON,
|
||||
SERVLET_CLASS,
|
||||
SERVLET_PATH,
|
||||
}
|
||||
|
||||
private final ApplicationType applicationType;
|
||||
private AppTypeProperty currentProperty;
|
||||
|
||||
public ApplicationTypePropertySheetModel(
|
||||
final ApplicationType applicationType) {
|
||||
|
||||
this.applicationType = applicationType;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean nextRow() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLabel() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
public GlobalizedMessage getGlobalizedLabel() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -51,9 +51,9 @@ import static com.arsdigita.ui.admin.AdminUiConstants.*;
|
|||
public class ApplicationsAdministrationTab extends LayoutPanel {
|
||||
|
||||
private final Tree applicationTree;
|
||||
private final Map<String, BaseApplicationPane> appPanes
|
||||
private final Map<String, LegacyBaseApplicationPane> appPanes
|
||||
= new HashMap<>();
|
||||
private final Map<String, ApplicationInstancePane> instancePanes
|
||||
private final Map<String, LegacyApplicationInstancePane> instancePanes
|
||||
= new HashMap<>();
|
||||
private final BoxPanel appPanel;
|
||||
|
||||
|
|
@ -96,11 +96,11 @@ public class ApplicationsAdministrationTab extends LayoutPanel {
|
|||
|
||||
appPanel = new BoxPanel();
|
||||
appPanel.setClassAttr("main");
|
||||
for (Map.Entry<String, BaseApplicationPane> entry : appPanes.entrySet()) {
|
||||
for (Map.Entry<String, LegacyBaseApplicationPane> entry : appPanes.entrySet()) {
|
||||
appPanel.add(entry.getValue());
|
||||
}
|
||||
|
||||
for (Map.Entry<String, ApplicationInstancePane> entry : instancePanes.
|
||||
for (Map.Entry<String, LegacyApplicationInstancePane> entry : instancePanes.
|
||||
entrySet()) {
|
||||
appPanel.add(entry.getValue());
|
||||
}
|
||||
|
|
@ -114,11 +114,11 @@ public class ApplicationsAdministrationTab extends LayoutPanel {
|
|||
final String appObjectType = applicationType.name();
|
||||
|
||||
final ApplicationManager<?> manager = appManagers.get(appObjectType);
|
||||
final SingletonApplicationPane pane;
|
||||
final LegacySingletonApplicationPane pane;
|
||||
if (manager == null) {
|
||||
pane = new SingletonApplicationPane(applicationType, null);
|
||||
pane = new LegacySingletonApplicationPane(applicationType, null);
|
||||
} else {
|
||||
pane = new SingletonApplicationPane(
|
||||
pane = new LegacySingletonApplicationPane(
|
||||
applicationType, appManagers.get(appObjectType).
|
||||
getApplicationAdminForm());
|
||||
}
|
||||
|
|
@ -138,8 +138,8 @@ public class ApplicationsAdministrationTab extends LayoutPanel {
|
|||
createForm = appManager.getApplicationCreateForm();
|
||||
}
|
||||
|
||||
final MultiInstanceApplicationPane<?> appPane
|
||||
= new MultiInstanceApplicationPane(
|
||||
final LegacyMultiInstanceApplicationPane<?> appPane
|
||||
= new LegacyMultiInstanceApplicationPane(
|
||||
applicationType, createForm);
|
||||
appPanes.put(applicationType.name(), appPane);
|
||||
createInstancePane(applicationType, appManagers);
|
||||
|
|
@ -150,11 +150,11 @@ public class ApplicationsAdministrationTab extends LayoutPanel {
|
|||
final Map<String, ApplicationManager<?>> managementForms) {
|
||||
final ApplicationManager<?> manager = managementForms.get(
|
||||
applicationType.name());
|
||||
final ApplicationInstancePane instPane;
|
||||
final LegacyApplicationInstancePane instPane;
|
||||
if (manager == null) {
|
||||
instPane = new ApplicationInstancePane(new Placeholder());
|
||||
instPane = new LegacyApplicationInstancePane(new Placeholder());
|
||||
} else {
|
||||
instPane = new ApplicationInstancePane(managementForms.get(
|
||||
instPane = new LegacyApplicationInstancePane(managementForms.get(
|
||||
applicationType.name()).
|
||||
getApplicationAdminForm());
|
||||
}
|
||||
|
|
@ -166,10 +166,10 @@ public class ApplicationsAdministrationTab extends LayoutPanel {
|
|||
public void register(final Page page) {
|
||||
super.register(page);
|
||||
|
||||
for (Map.Entry<String, BaseApplicationPane> entry : appPanes.entrySet()) {
|
||||
for (Map.Entry<String, LegacyBaseApplicationPane> entry : appPanes.entrySet()) {
|
||||
page.setVisibleDefault(entry.getValue(), false);
|
||||
}
|
||||
for (Map.Entry<String, ApplicationInstancePane> entry : instancePanes.
|
||||
for (Map.Entry<String, LegacyApplicationInstancePane> entry : instancePanes.
|
||||
entrySet()) {
|
||||
page.setVisibleDefault(entry.getValue(), false);
|
||||
}
|
||||
|
|
@ -177,10 +177,10 @@ public class ApplicationsAdministrationTab extends LayoutPanel {
|
|||
|
||||
private void setPaneVisible(final SimpleContainer pane,
|
||||
final PageState state) {
|
||||
for (Map.Entry<String, BaseApplicationPane> entry : appPanes.entrySet()) {
|
||||
for (Map.Entry<String, LegacyBaseApplicationPane> entry : appPanes.entrySet()) {
|
||||
entry.getValue().setVisible(state, false);
|
||||
}
|
||||
for (Map.Entry<String, ApplicationInstancePane> entry : instancePanes.
|
||||
for (Map.Entry<String, LegacyApplicationInstancePane> entry : instancePanes.
|
||||
entrySet()) {
|
||||
entry.getValue().setVisible(state, false);
|
||||
}
|
||||
|
|
@ -203,7 +203,7 @@ public class ApplicationsAdministrationTab extends LayoutPanel {
|
|||
if (selectedKey != null) {
|
||||
if (selectedKey.contains(".")) {
|
||||
// Selected key is a classname and therefore the key of an ApplicationPane
|
||||
final BaseApplicationPane pane = appPanes.get(selectedKey);
|
||||
final LegacyBaseApplicationPane pane = appPanes.get(selectedKey);
|
||||
if (pane != null) {
|
||||
setPaneVisible(pane, state);
|
||||
}
|
||||
|
|
@ -216,7 +216,7 @@ public class ApplicationsAdministrationTab extends LayoutPanel {
|
|||
final CcmApplication application = appRepo
|
||||
.retrieveApplicationForPath(selectedKey);
|
||||
|
||||
final ApplicationInstancePane pane;
|
||||
final LegacyApplicationInstancePane pane;
|
||||
if (application != null) {
|
||||
pane = instancePanes.get(application.getClass().
|
||||
getName());
|
||||
|
|
|
|||
|
|
@ -18,7 +18,10 @@
|
|||
*/
|
||||
package com.arsdigita.ui.admin.applications;
|
||||
|
||||
import com.arsdigita.bebop.Page;
|
||||
import com.arsdigita.bebop.ParameterSingleSelectionModel;
|
||||
import com.arsdigita.bebop.Tree;
|
||||
import com.arsdigita.bebop.parameters.StringParameter;
|
||||
import com.arsdigita.toolbox.ui.LayoutPanel;
|
||||
|
||||
/**
|
||||
|
|
@ -27,6 +30,12 @@ import com.arsdigita.toolbox.ui.LayoutPanel;
|
|||
*/
|
||||
public class ApplicationsTab extends LayoutPanel {
|
||||
|
||||
private final StringParameter selectedAppTypeParam;
|
||||
private final ParameterSingleSelectionModel<String> selectedAppType;
|
||||
|
||||
private final StringParameter selectedAppInstanceParam;
|
||||
private final ParameterSingleSelectionModel<String> selectedAppInstance;
|
||||
|
||||
private final Tree applicationTree;
|
||||
|
||||
public ApplicationsTab() {
|
||||
|
|
@ -34,10 +43,29 @@ public class ApplicationsTab extends LayoutPanel {
|
|||
|
||||
setClassAttr("sidebarNavPanel");
|
||||
|
||||
selectedAppTypeParam = new StringParameter("selectedAppType");
|
||||
selectedAppType = new ParameterSingleSelectionModel<>(
|
||||
selectedAppTypeParam);
|
||||
|
||||
selectedAppInstanceParam = new StringParameter("selectedAppInstance");
|
||||
selectedAppInstance = new ParameterSingleSelectionModel<>(
|
||||
selectedAppInstanceParam);
|
||||
|
||||
applicationTree = new Tree(new ApplicationTreeModelBuilder());
|
||||
applicationTree.addChangeListener(e -> {
|
||||
|
||||
});
|
||||
|
||||
setLeft(applicationTree);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(final Page page) {
|
||||
super.register(page);
|
||||
|
||||
page.addGlobalStateParam(selectedAppTypeParam);
|
||||
page.addGlobalStateParam(selectedAppInstanceParam);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ import org.libreccm.web.CcmApplication;
|
|||
* {@link ApplicationType} using a {@link PropertySheet}.
|
||||
*
|
||||
* @author Jens Pelzetter <jens@jp-digital.de>
|
||||
* @version $Id: ApplicationInfoPropertySheetModel.java 2220 2013-06-19
|
||||
* 15:26:58Z jensp $
|
||||
* @version $Id: LegacyApplicationInfoPropertySheetModel.java 2220 2013-06-19
|
||||
15:26:58Z jensp $
|
||||
*/
|
||||
public class ApplicationInfoPropertySheetModel implements PropertySheetModel {
|
||||
public class LegacyApplicationInfoPropertySheetModel implements PropertySheetModel {
|
||||
|
||||
private static final int APP_TITLE = 0;
|
||||
private static final int APP_CLASS = 1;
|
||||
|
|
@ -48,7 +48,7 @@ public class ApplicationInfoPropertySheetModel implements PropertySheetModel {
|
|||
private final ApplicationType applicationType;
|
||||
private int currentIndex = -1;
|
||||
|
||||
public ApplicationInfoPropertySheetModel(
|
||||
public LegacyApplicationInfoPropertySheetModel(
|
||||
final ApplicationType applicationType) {
|
||||
this.applicationType = applicationType;
|
||||
}
|
||||
|
|
@ -26,17 +26,17 @@ import com.arsdigita.util.LockableImpl;
|
|||
import org.libreccm.web.ApplicationType;
|
||||
|
||||
/**
|
||||
* {@link PropertySheetModelBuilder} implementation for the the {@link ApplicationInfoPropertySheetModel}.
|
||||
* {@link PropertySheetModelBuilder} implementation for the the {@link LegacyApplicationInfoPropertySheetModel}.
|
||||
*
|
||||
* @author Jens Pelzetter <jens@jp-digital.de>
|
||||
* @version $Id: ApplicationInfoPropertySheetModelBuilder.java 2219 2013-06-19 08:16:11Z jensp $
|
||||
* @version $Id: LegacyApplicationInfoPropertySheetModelBuilder.java 2219 2013-06-19 08:16:11Z jensp $
|
||||
*/
|
||||
public class ApplicationInfoPropertySheetModelBuilder
|
||||
public class LegacyApplicationInfoPropertySheetModelBuilder
|
||||
extends LockableImpl implements PropertySheetModelBuilder {
|
||||
|
||||
private final ApplicationType applicationType;
|
||||
|
||||
public ApplicationInfoPropertySheetModelBuilder(
|
||||
public LegacyApplicationInfoPropertySheetModelBuilder(
|
||||
final ApplicationType applicationType) {
|
||||
super();
|
||||
this.applicationType = applicationType;
|
||||
|
|
@ -45,7 +45,7 @@ extends LockableImpl implements PropertySheetModelBuilder {
|
|||
@Override
|
||||
public PropertySheetModel makeModel(final PropertySheet sheet,
|
||||
final PageState state) {
|
||||
return new ApplicationInfoPropertySheetModel(applicationType);
|
||||
return new LegacyApplicationInfoPropertySheetModel(applicationType);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -36,19 +36,19 @@ import org.libreccm.web.CcmApplication;
|
|||
* @author Jens Pelzetter <jens@jp-digital.de>
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ApplicationInstancePane extends SegmentedPanel {
|
||||
public class LegacyApplicationInstancePane extends SegmentedPanel {
|
||||
|
||||
private CcmApplication application;
|
||||
private final ApplicationInstanceAwareContainer appAdminPane;
|
||||
private final ApplicationInstancePropertySheetModelBuilder modelBuilder;
|
||||
private final LegacyApplicationInstancePropertySheetModelBuilder modelBuilder;
|
||||
|
||||
public ApplicationInstancePane(
|
||||
public LegacyApplicationInstancePane(
|
||||
final ApplicationInstanceAwareContainer appAdminPane) {
|
||||
|
||||
super();
|
||||
this.appAdminPane = appAdminPane;
|
||||
|
||||
modelBuilder = new ApplicationInstancePropertySheetModelBuilder();
|
||||
modelBuilder = new LegacyApplicationInstancePropertySheetModelBuilder();
|
||||
final PropertySheet appInstInfoPanel = new PropertySheet(modelBuilder);
|
||||
|
||||
addSegment(new Label(GlobalizationUtil.globalize(
|
||||
|
|
@ -29,9 +29,9 @@ import org.libreccm.web.CcmApplication;
|
|||
* using a {@link PropertySheet}.
|
||||
*
|
||||
* @author Jens Pelzetter <jens@jp-digital.de>
|
||||
* @version $Id: ApplicationInstancePropertySheetModel.java 2923 2014-10-27 18:55:26Z jensp $
|
||||
* @version $Id: LegacyApplicationInstancePropertySheetModel.java 2923 2014-10-27 18:55:26Z jensp $
|
||||
*/
|
||||
public class ApplicationInstancePropertySheetModel implements PropertySheetModel {
|
||||
public class LegacyApplicationInstancePropertySheetModel implements PropertySheetModel {
|
||||
|
||||
private static final int INST_TITLE = 0;
|
||||
private static final int INST_PARENT = 1;
|
||||
|
|
@ -41,7 +41,7 @@ public class ApplicationInstancePropertySheetModel implements PropertySheetModel
|
|||
private int currentIndex = -1;
|
||||
|
||||
|
||||
public ApplicationInstancePropertySheetModel(final CcmApplication application) {
|
||||
public LegacyApplicationInstancePropertySheetModel(final CcmApplication application) {
|
||||
this.application = application;
|
||||
}
|
||||
|
||||
|
|
@ -26,23 +26,23 @@ import com.arsdigita.util.LockableImpl;
|
|||
import org.libreccm.web.CcmApplication;
|
||||
|
||||
/**
|
||||
* {@link PropertySheetModelBuilder} implementation for the {@link ApplicationInstancePropertySheetModel}.
|
||||
* {@link PropertySheetModelBuilder} implementation for the {@link LegacyApplicationInstancePropertySheetModel}.
|
||||
*
|
||||
* @author Jens Pelzetter <jens@jp-digital.de>
|
||||
* @version $Id: ApplicationInstancePropertySheetModelBuilder.java 2293 2013-08-05 11:00:18Z jensp $
|
||||
* @version $Id: LegacyApplicationInstancePropertySheetModelBuilder.java 2293 2013-08-05 11:00:18Z jensp $
|
||||
*/
|
||||
public class ApplicationInstancePropertySheetModelBuilder
|
||||
public class LegacyApplicationInstancePropertySheetModelBuilder
|
||||
extends LockableImpl implements PropertySheetModelBuilder {
|
||||
|
||||
private CcmApplication application;
|
||||
|
||||
public ApplicationInstancePropertySheetModelBuilder() {
|
||||
public LegacyApplicationInstancePropertySheetModelBuilder() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PropertySheetModel makeModel(final PropertySheet sheet, final PageState state) {
|
||||
return new ApplicationInstancePropertySheetModel(application);
|
||||
return new LegacyApplicationInstancePropertySheetModel(application);
|
||||
}
|
||||
|
||||
public void setApplication(final CcmApplication application) {
|
||||
|
|
@ -31,13 +31,13 @@ import org.libreccm.web.ApplicationType;
|
|||
* @author Jens Pelzetter <jens@jp-digital.de>
|
||||
* @version $Id$
|
||||
*/
|
||||
public class BaseApplicationPane extends SegmentedPanel {
|
||||
public class LegacyBaseApplicationPane extends SegmentedPanel {
|
||||
|
||||
public BaseApplicationPane(final ApplicationType applicationType) {
|
||||
public LegacyBaseApplicationPane(final ApplicationType applicationType) {
|
||||
super();
|
||||
|
||||
final PropertySheet appInfoPanel = new PropertySheet(
|
||||
new ApplicationInfoPropertySheetModelBuilder(
|
||||
new LegacyApplicationInfoPropertySheetModelBuilder(
|
||||
applicationType));
|
||||
addSegment(new Label(GlobalizationUtil.globalize(
|
||||
"ui.admin.applications.ApplicationInfoSection.heading")),
|
||||
|
|
@ -38,7 +38,7 @@ import org.libreccm.web.CcmApplication;
|
|||
|
||||
/**
|
||||
* Pane for multi instance applications. Additional to the data provided by
|
||||
* {@link BaseApplicationPane} it shows a table of all instances of the
|
||||
* {@link LegacyBaseApplicationPane} it shows a table of all instances of the
|
||||
* application type and a form for creating new instances of the application
|
||||
* type.
|
||||
*
|
||||
|
|
@ -46,14 +46,14 @@ import org.libreccm.web.CcmApplication;
|
|||
* @author Jens Pelzetter <jens@jp-digital.de>
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MultiInstanceApplicationPane<T extends CcmApplication>
|
||||
extends BaseApplicationPane {
|
||||
public class LegacyMultiInstanceApplicationPane<T extends CcmApplication>
|
||||
extends LegacyBaseApplicationPane {
|
||||
|
||||
private final static int COL_TITLE = 0;
|
||||
private final static int COL_URL = 1;
|
||||
private final static int COL_DESC = 2;
|
||||
|
||||
public MultiInstanceApplicationPane(final ApplicationType applicationType,
|
||||
public LegacyMultiInstanceApplicationPane(final ApplicationType applicationType,
|
||||
final Form createForm) {
|
||||
super(applicationType);
|
||||
|
||||
|
|
@ -29,9 +29,9 @@ import org.libreccm.web.ApplicationType;
|
|||
* @author Jens Pelzetter <jens@jp-digital.de>
|
||||
* @version $Id$
|
||||
*/
|
||||
public class SingletonApplicationPane extends BaseApplicationPane {
|
||||
public class LegacySingletonApplicationPane extends LegacyBaseApplicationPane {
|
||||
|
||||
public SingletonApplicationPane(final ApplicationType applicationType, final SimpleContainer appAdminPane) {
|
||||
public LegacySingletonApplicationPane(final ApplicationType applicationType, final SimpleContainer appAdminPane) {
|
||||
super(applicationType);
|
||||
|
||||
if (appAdminPane == null) {
|
||||
|
|
@ -20,6 +20,7 @@ package org.libreccm.web;
|
|||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
|
||||
import javax.servlet.http.HttpServlet;
|
||||
|
||||
|
|
@ -30,17 +31,59 @@ import javax.servlet.http.HttpServlet;
|
|||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface ApplicationType {
|
||||
|
||||
/**
|
||||
* The name of the application type.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String name();
|
||||
|
||||
/**
|
||||
* A description of the application type.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String description();
|
||||
|
||||
/**
|
||||
* The application type class. Default is {@link CcmApplication}. Most
|
||||
* application types will no need to extend these class and can leave the
|
||||
* default has it is.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Class<?> applicationClass() default CcmApplication.class;
|
||||
|
||||
/**
|
||||
* Is the application type a singleton application?
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean singleton() default false;
|
||||
|
||||
/**
|
||||
* Path to the primary Servlet of the application type. If the servlet class
|
||||
* is provided and is annotated with the {@link WebServlet} annotation the
|
||||
* path can be determined from the annotation.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String servletPath() default "";
|
||||
|
||||
/**
|
||||
* The primary servlet class of the application type.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Class<? extends HttpServlet> servlet() default HttpServlet.class;
|
||||
|
||||
/**
|
||||
* The implementation of the {@link ApplicationCreator} interface for the
|
||||
* application type which is used to create the objects representing the
|
||||
* application instances.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Class<? extends ApplicationCreator> creator();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -525,3 +525,4 @@ ui.admin.categories.category.property_sheet.abstract=Abstract?
|
|||
ui.admin.categories.category.name.enabled=Enabled?
|
||||
ui.admin.categories.category.name.visible=Visible?
|
||||
ui.admin.categories.category.name.abstract=Abstract?
|
||||
ui.admin.appliations.type_pane.info_sheet=About
|
||||
|
|
|
|||
|
|
@ -528,3 +528,4 @@ ui.admin.categories.category.property_sheet.abstract=Abstrakt?
|
|||
ui.admin.categories.category.name.enabled=Aktiviert?
|
||||
ui.admin.categories.category.name.visible=Sichtbar?
|
||||
ui.admin.categories.category.name.abstract=Abstrakt?
|
||||
ui.admin.appliations.type_pane.info_sheet=\u00dcber
|
||||
|
|
|
|||
|
|
@ -521,3 +521,4 @@ ui.admin.categories.category.property_sheet.abstract=Abstract?
|
|||
ui.admin.categories.category.name.enabled=Enabled?
|
||||
ui.admin.categories.category.name.visible=Visible?
|
||||
ui.admin.categories.category.name.abstract=Abstract?
|
||||
ui.admin.appliations.type_pane.info_sheet=About
|
||||
|
|
|
|||
|
|
@ -512,3 +512,4 @@ ui.admin.categories.category.property_sheet.abstract=Abstract?
|
|||
ui.admin.categories.category.name.enabled=Enabled?
|
||||
ui.admin.categories.category.name.visible=Visible?
|
||||
ui.admin.categories.category.name.abstract=Abstract?
|
||||
ui.admin.appliations.type_pane.info_sheet=About
|
||||
|
|
|
|||
Loading…
Reference in New Issue