Diverse Formatierungen.
git-svn-id: https://svn.libreccm.org/ccm/trunk@1561 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
ca5dee3efe
commit
bc86f0b3be
|
|
@ -83,12 +83,12 @@ public class Loader extends PackageLoader {
|
||||||
* instantiates a (single) default instance.
|
* instantiates a (single) default instance.
|
||||||
*/
|
*/
|
||||||
private void setupHTTPAuth() {
|
private void setupHTTPAuth() {
|
||||||
/*
|
|
||||||
ApplicationType type = ApplicationType
|
// ApplicationType type = ApplicationType
|
||||||
.createApplicationType("auth-http",
|
// .createApplicationType("auth-http",
|
||||||
"CCM HTTP Authentication Admin",
|
// "CCM HTTP Authentication Admin",
|
||||||
HTTPAuth.BASE_DATA_OBJECT_TYPE);
|
// HTTPAuth.BASE_DATA_OBJECT_TYPE);
|
||||||
*/
|
|
||||||
|
|
||||||
/* Create new type legacy free application type
|
/* Create new type legacy free application type
|
||||||
* NOTE: The wording in the title parameter of ApplicationType
|
* NOTE: The wording in the title parameter of ApplicationType
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,10 @@ import com.arsdigita.util.Assert;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a single bookmark.
|
* Main domain class of the Bookmark application.
|
||||||
|
*
|
||||||
|
* Main entry point into Bookmarks and provides services to save and retrieve
|
||||||
|
* bookmarks.
|
||||||
*
|
*
|
||||||
* @author Jim Parsons
|
* @author Jim Parsons
|
||||||
*/
|
*/
|
||||||
|
|
@ -46,14 +49,30 @@ public class Bookmark extends ACSObject {
|
||||||
public static final String BASE_DATA_OBJECT_TYPE =
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
"com.arsdigita.workspace.Bookmark";
|
"com.arsdigita.workspace.Bookmark";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve base DataObject for client classes.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
protected String getBaseDataObjectType() {
|
protected String getBaseDataObjectType() {
|
||||||
return BASE_DATA_OBJECT_TYPE;
|
return BASE_DATA_OBJECT_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param dataObject
|
||||||
|
*/
|
||||||
public Bookmark(DataObject dataObject) {
|
public Bookmark(DataObject dataObject) {
|
||||||
super(dataObject);
|
super(dataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* @param URLstring
|
||||||
|
*/
|
||||||
public Bookmark(String name, String URLstring) {
|
public Bookmark(String name, String URLstring) {
|
||||||
super(BASE_DATA_OBJECT_TYPE);
|
super(BASE_DATA_OBJECT_TYPE);
|
||||||
|
|
||||||
|
|
@ -65,9 +84,8 @@ public class Bookmark extends ACSObject {
|
||||||
setVisits(0);
|
setVisits(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve an existing Bookmark based on an ID.
|
* Constructor retrieving an existing Bookmark based on an ID.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static Bookmark retrieveBookmark(BigDecimal bmrkID) {
|
public static Bookmark retrieveBookmark(BigDecimal bmrkID) {
|
||||||
|
|
@ -77,7 +95,7 @@ public class Bookmark extends ACSObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve an existing Bookmark based on a data object.
|
* Constructor retrieving an existing Bookmark based on a data object.
|
||||||
*
|
*
|
||||||
* @param dataObject the data object of the Bookmark to retrieve.
|
* @param dataObject the data object of the Bookmark to retrieve.
|
||||||
* @return an existing Bookmark. Note that the return value may be
|
* @return an existing Bookmark. Note that the return value may be
|
||||||
|
|
@ -104,6 +122,10 @@ public class Bookmark extends ACSObject {
|
||||||
return Bookmark.retrieveBookmark(dataObject);
|
return Bookmark.retrieveBookmark(dataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public Bookmarks getBookmarkApplication() {
|
public Bookmarks getBookmarkApplication() {
|
||||||
if(m_bmrkapp == null) {
|
if(m_bmrkapp == null) {
|
||||||
DataObject bmrkdata = (DataObject)get("bookmarkapp");
|
DataObject bmrkdata = (DataObject)get("bookmarkapp");
|
||||||
|
|
@ -114,11 +136,19 @@ public class Bookmark extends ACSObject {
|
||||||
return m_bmrkapp;
|
return m_bmrkapp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param bmrkapp
|
||||||
|
*/
|
||||||
public void setBookmarkApplication(Bookmarks bmrkapp) {
|
public void setBookmarkApplication(Bookmarks bmrkapp) {
|
||||||
m_bmrkapp = bmrkapp;
|
m_bmrkapp = bmrkapp;
|
||||||
setAssociation("bookmarkapp",bmrkapp);
|
setAssociation("bookmarkapp",bmrkapp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public static BookmarkCollection retrieveAllBookmarks() {
|
public static BookmarkCollection retrieveAllBookmarks() {
|
||||||
DataCollection dataCollection =
|
DataCollection dataCollection =
|
||||||
SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE);
|
SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE);
|
||||||
|
|
@ -129,9 +159,9 @@ public class Bookmark extends ACSObject {
|
||||||
return bmrkCollection;
|
return bmrkCollection;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// ///////////////////////////////////////////////////////////////////////
|
||||||
// Accessors
|
// Accessors
|
||||||
//
|
// ///////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the title of this Bookmark.
|
* Get the title of this Bookmark.
|
||||||
|
|
@ -348,6 +378,7 @@ public class Bookmark extends ACSObject {
|
||||||
set("sortKey", new Integer(sortKey));
|
set("sortKey", new Integer(sortKey));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void afterSave() {
|
protected void afterSave() {
|
||||||
super.afterSave();
|
super.afterSave();
|
||||||
PermissionService.setContext(this, getBookmarkApplication());
|
PermissionService.setContext(this, getBookmarkApplication());
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Web Developer Support Application Servlet class, central entry point to
|
* Bookmarks Application Servlet class, central entry point to
|
||||||
* create and process the applications UI.
|
* create and process the applications UI.
|
||||||
*
|
*
|
||||||
* We should have subclassed BebopApplicationServlet but couldn't overwrite
|
* We should have subclassed BebopApplicationServlet but couldn't overwrite
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,7 @@ import org.apache.log4j.Logger;
|
||||||
public class Initializer extends CompoundInitializer {
|
public class Initializer extends CompoundInitializer {
|
||||||
|
|
||||||
/** Creates a s_logging category with name = full name of class */
|
/** Creates a s_logging category with name = full name of class */
|
||||||
private static final Logger s_log = Logger.getLogger
|
private static final Logger s_log = Logger.getLogger(Initializer.class);
|
||||||
(Initializer.class);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -33,16 +33,11 @@ import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Executes nonrecurring at install time and loads (installs and initializes)
|
* <p>Executes nonrecurring at install time and loads (installs and initializes)
|
||||||
* the HTTP Auth application and type persistently into database.</p>
|
* the Bookmarks application and type persistently into database.</p>
|
||||||
*
|
*
|
||||||
* @author Daniel Berrange
|
* @author Daniel Berrange
|
||||||
* @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $
|
* @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author pb
|
|
||||||
*/
|
|
||||||
public class Loader extends PackageLoader {
|
public class Loader extends PackageLoader {
|
||||||
|
|
||||||
/** Creates a s_logging category with name = full name of class */
|
/** Creates a s_logging category with name = full name of class */
|
||||||
|
|
@ -58,7 +53,8 @@ public class Loader extends PackageLoader {
|
||||||
setEffectiveParty(Kernel.getSystemParty());
|
setEffectiveParty(Kernel.getSystemParty());
|
||||||
|
|
||||||
ApplicationType bmrkAppType = loadBookmarksApp();
|
ApplicationType bmrkAppType = loadBookmarksApp();
|
||||||
loadBookmarksPortlet(bmrkAppType);
|
loadBookmarksPortletType(bmrkAppType);
|
||||||
|
|
||||||
setupDefaultBookmarkApplicationInstance();
|
setupDefaultBookmarkApplicationInstance();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -88,7 +84,7 @@ public class Loader extends PackageLoader {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadBookmarksPortlet(ApplicationType bmrkAppType ) {
|
private void loadBookmarksPortletType(ApplicationType bmrkAppType ) {
|
||||||
|
|
||||||
AppPortletType type = AppPortletType.createAppPortletType(
|
AppPortletType type = AppPortletType.createAppPortletType(
|
||||||
"Portal Bookmarks",
|
"Portal Bookmarks",
|
||||||
|
|
@ -120,7 +116,6 @@ public class Loader extends PackageLoader {
|
||||||
Bookmarks app = Bookmarks.create("bookmarks", "Bookmarks", admin);
|
Bookmarks app = Bookmarks.create("bookmarks", "Bookmarks", admin);
|
||||||
|
|
||||||
s_log.debug("Bookmarks instance " + " created.");
|
s_log.debug("Bookmarks instance " + " created.");
|
||||||
s_log.debug("Done loading bookmarks.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -112,50 +112,11 @@ public class Initializer extends CompoundInitializer {
|
||||||
("ccm-cms.pdl.mf",
|
("ccm-cms.pdl.mf",
|
||||||
new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl"))));
|
new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl"))));
|
||||||
|
|
||||||
// Step 1:
|
|
||||||
// Old type initializer "com.arsdigita.cms.installer.Initializer"
|
|
||||||
// Used to be the first initializer in old enterprise.init
|
|
||||||
//
|
|
||||||
// Replaced by new type initializer com.arsdigita.cms.installer.Initializer()
|
|
||||||
// Simple migration of the old code to the new initializer system with as
|
|
||||||
// less code change as possible.
|
|
||||||
//
|
|
||||||
// Invokes ContentCenterSetup (without any LegacyInitializer)
|
|
||||||
// performs mainly loader tasks and should be migrated to Loader.
|
|
||||||
// add(new com.arsdigita.cms.installer.Initializer());
|
|
||||||
|
|
||||||
// Step 2:
|
|
||||||
// Old type initializer "com.arsdigita.cms.installer.xml.ContentTypeInitializer"
|
|
||||||
// Completely moved into Loader
|
|
||||||
|
|
||||||
// Step 4:
|
|
||||||
// Old type initializer "com.arsdigita.cms.installer.SectionInitializer"
|
|
||||||
// Invoking the Initializer rewritten to a separate enterprise.init in
|
|
||||||
// c.ad.cms.contentsection and modified in c.ad.cms.initializer
|
|
||||||
// Mainly loader tasks, to be moved into c.ad.cms.Loader
|
|
||||||
// 2010-08-16: Moved to Loader, works OK
|
|
||||||
// add(new LegacyInitializer("com/arsdigita/cms/contentsection/enterprise.init"));
|
|
||||||
|
|
||||||
// Step 4a new
|
|
||||||
// Initializer for content section, needed when LegacyInitializer in step 4
|
|
||||||
// has been moved to c.ad.Loader in order to register the application and
|
|
||||||
// optionally to install additional content sections.
|
|
||||||
add(new com.arsdigita.cms.contentsection.Initializer());
|
add(new com.arsdigita.cms.contentsection.Initializer());
|
||||||
|
|
||||||
// Used to be step 3 in old enterprise.init migrated to loader/new init.
|
|
||||||
add(new com.arsdigita.cms.publishToFile.Initializer());
|
add(new com.arsdigita.cms.publishToFile.Initializer());
|
||||||
// Used to be step 6 in old enterprise.init migrated to loader/new init.
|
|
||||||
add(new com.arsdigita.cms.lifecycle.Initializer());
|
add(new com.arsdigita.cms.lifecycle.Initializer());
|
||||||
// Used to be step 7 in old enterprise.init migrated to loader/new init.
|
|
||||||
add(new com.arsdigita.cms.portlet.Initializer());
|
add(new com.arsdigita.cms.portlet.Initializer());
|
||||||
|
|
||||||
|
|
||||||
// Used to be step 5 in old enterprise.init
|
|
||||||
// Old type initializer "com.arsdigita.formbuilder.installer.Initializer"
|
|
||||||
// Used to initialize CMS forms using the forms in ccm-core
|
|
||||||
// Can be replaced in ccm after ccm-core is migrated to new initializer.
|
|
||||||
// add(new LegacyInitializer("com/arsdigita/cms/enterprise.init"));
|
|
||||||
|
|
||||||
s_log.debug("CMS.Initializer.(Constructor) completed");
|
s_log.debug("CMS.Initializer.(Constructor) completed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -163,9 +124,6 @@ public class Initializer extends CompoundInitializer {
|
||||||
/**
|
/**
|
||||||
* Initializes domain-coupling machinery, usually consisting of
|
* Initializes domain-coupling machinery, usually consisting of
|
||||||
* registering object instantiators and observers.
|
* registering object instantiators and observers.
|
||||||
*
|
|
||||||
* This starts up the search threads according to the values in the
|
|
||||||
* properties file
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void init(DomainInitEvent e) {
|
public void init(DomainInitEvent e) {
|
||||||
|
|
|
||||||
|
|
@ -17,28 +17,21 @@ package com.arsdigita.cms.docmgr;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import com.arsdigita.cms.docmgr.DocFolder;
|
// import com.arsdigita.cms.docmgr.ui.CategoryDocsNavigatorPortlet;
|
||||||
import com.arsdigita.cms.docmgr.Document;
|
// import com.arsdigita.cms.docmgr.ui.LegacyCategoryDocsNavigatorPortlet;
|
||||||
import com.arsdigita.cms.docmgr.DocumentCategoryBrowserApplication;
|
|
||||||
import com.arsdigita.cms.docmgr.LegacyCategoryBrowserApplication;
|
|
||||||
import com.arsdigita.cms.docmgr.Repository;
|
|
||||||
// unused: import com.arsdigita.cms.docmgr.search.SearchUtils;
|
|
||||||
import com.arsdigita.cms.docmgr.ui.CategoryDocsNavigatorPortlet;
|
|
||||||
import com.arsdigita.cms.docmgr.ui.LegacyCategoryDocsNavigatorPortlet;
|
|
||||||
import com.arsdigita.cms.docmgr.ui.RecentUpdatedDocsPortlet;
|
import com.arsdigita.cms.docmgr.ui.RecentUpdatedDocsPortlet;
|
||||||
import com.arsdigita.domain.DomainObject;
|
import com.arsdigita.domain.DomainObject;
|
||||||
import com.arsdigita.domain.DomainObjectFactory;
|
import com.arsdigita.domain.DomainObjectFactory;
|
||||||
// import com.arsdigita.initializer.Configuration;
|
|
||||||
import com.arsdigita.kernel.ACSObjectInstantiator;
|
import com.arsdigita.kernel.ACSObjectInstantiator;
|
||||||
import com.arsdigita.persistence.DataObject;
|
import com.arsdigita.persistence.DataObject;
|
||||||
import com.arsdigita.persistence.SessionManager;
|
import com.arsdigita.persistence.SessionManager;
|
||||||
import com.arsdigita.persistence.TransactionContext;
|
import com.arsdigita.persistence.TransactionContext;
|
||||||
import com.arsdigita.portal.PortletType;
|
// import com.arsdigita.portal.PortletType;
|
||||||
import com.arsdigita.portal.apportlet.AppPortletSetup;
|
// import com.arsdigita.portal.apportlet.AppPortletSetup;
|
||||||
import com.arsdigita.runtime.CompoundInitializer;
|
import com.arsdigita.runtime.CompoundInitializer;
|
||||||
import com.arsdigita.runtime.DomainInitEvent;
|
import com.arsdigita.runtime.DomainInitEvent;
|
||||||
import com.arsdigita.web.ApplicationSetup;
|
// import com.arsdigita.web.ApplicationSetup;
|
||||||
import com.arsdigita.web.ApplicationType;
|
// import com.arsdigita.web.ApplicationType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -167,26 +160,27 @@ public class Initializer extends CompoundInitializer {
|
||||||
* package exists, and if not it creates it for the first time.
|
* package exists, and if not it creates it for the first time.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private ApplicationType setupDocs() {
|
// private ApplicationType setupDocs() {
|
||||||
ApplicationSetup setup = new ApplicationSetup(s_log);
|
// ApplicationSetup setup = new ApplicationSetup(s_log);
|
||||||
setup.setApplicationObjectType(Repository.BASE_DATA_OBJECT_TYPE);
|
// setup.setApplicationObjectType(Repository.BASE_DATA_OBJECT_TYPE);
|
||||||
setup.setKey(PACKAGE_TYPE_NAME);
|
// setup.setKey(PACKAGE_TYPE_NAME);
|
||||||
setup.setTitle("Document Manager (CMS) Application");
|
// setup.setTitle("Document Manager (CMS) Application");
|
||||||
setup.setSingleton(false);
|
// setup.setSingleton(false);
|
||||||
setup.setDescription
|
// setup.setDescription
|
||||||
("The document manager empowers users to share documents.");
|
// ("The document manager empowers users to share documents.");
|
||||||
setup.setDispatcherClass("com.arsdigita.cms.docmgr.ui.DMDispatcher");
|
// setup.setDispatcherClass("com.arsdigita.cms.docmgr.ui.DMDispatcher");
|
||||||
setup.setInstantiator(new ACSObjectInstantiator() {
|
// setup.setInstantiator(new ACSObjectInstantiator() {
|
||||||
@Override
|
// @Override
|
||||||
public DomainObject doNewInstance(DataObject dataObject) {
|
// public DomainObject doNewInstance(DataObject dataObject) {
|
||||||
return new Repository(dataObject);
|
// return new Repository(dataObject);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
|
// return setup.run();
|
||||||
|
// }
|
||||||
|
|
||||||
return setup.run();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setupDocManagerPortlet(ApplicationType provider) {
|
/* private void setupDocManagerPortlet(ApplicationType provider) {
|
||||||
// Create the document manager portlet
|
// Create the document manager portlet
|
||||||
AppPortletSetup setup = new AppPortletSetup(s_log);
|
AppPortletSetup setup = new AppPortletSetup(s_log);
|
||||||
|
|
||||||
|
|
@ -203,9 +197,9 @@ public class Initializer extends CompoundInitializer {
|
||||||
});
|
});
|
||||||
|
|
||||||
setup.run();
|
setup.run();
|
||||||
}
|
} */
|
||||||
|
|
||||||
private ApplicationType setupCategoryBrowsing() {
|
/* private ApplicationType setupCategoryBrowsing() {
|
||||||
ApplicationSetup setup = new ApplicationSetup(s_log);
|
ApplicationSetup setup = new ApplicationSetup(s_log);
|
||||||
setup.setApplicationObjectType(DocumentCategoryBrowserApplication.BASE_DATA_OBJECT_TYPE);
|
setup.setApplicationObjectType(DocumentCategoryBrowserApplication.BASE_DATA_OBJECT_TYPE);
|
||||||
setup.setKey(CATEGORY_PACKAGE_TYPE_NAME);
|
setup.setKey(CATEGORY_PACKAGE_TYPE_NAME);
|
||||||
|
|
@ -225,8 +219,9 @@ public class Initializer extends CompoundInitializer {
|
||||||
});
|
});
|
||||||
return setup.run();
|
return setup.run();
|
||||||
|
|
||||||
}
|
} */
|
||||||
private ApplicationType setupLegacyCategoryBrowsing() {
|
|
||||||
|
/* private ApplicationType setupLegacyCategoryBrowsing() {
|
||||||
ApplicationSetup setup = new ApplicationSetup(s_log);
|
ApplicationSetup setup = new ApplicationSetup(s_log);
|
||||||
setup.setApplicationObjectType(LegacyCategoryBrowserApplication.BASE_DATA_OBJECT_TYPE);
|
setup.setApplicationObjectType(LegacyCategoryBrowserApplication.BASE_DATA_OBJECT_TYPE);
|
||||||
setup.setKey(LEGACY_PACKAGE_TYPE_NAME);
|
setup.setKey(LEGACY_PACKAGE_TYPE_NAME);
|
||||||
|
|
@ -246,8 +241,8 @@ public class Initializer extends CompoundInitializer {
|
||||||
});
|
});
|
||||||
return setup.run();
|
return setup.run();
|
||||||
|
|
||||||
}
|
} */
|
||||||
|
/*
|
||||||
private void setupCategoryDocsPortlet(ApplicationType provider) {
|
private void setupCategoryDocsPortlet(ApplicationType provider) {
|
||||||
// Create the document manager portlet
|
// Create the document manager portlet
|
||||||
AppPortletSetup setup = new AppPortletSetup(s_log);
|
AppPortletSetup setup = new AppPortletSetup(s_log);
|
||||||
|
|
@ -285,7 +280,7 @@ public class Initializer extends CompoundInitializer {
|
||||||
|
|
||||||
setup.run();
|
setup.run();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shutdown the document manager.
|
* Shutdown the document manager.
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ import org.apache.log4j.Logger;
|
||||||
*
|
*
|
||||||
* @author pboy <pboy@barkhof.uni-bremen.de>
|
* @author pboy <pboy@barkhof.uni-bremen.de>
|
||||||
* @version $Id: Loader.java $
|
* @version $Id: Loader.java $
|
||||||
**/
|
*/
|
||||||
|
|
||||||
public class Loader extends PackageLoader {
|
public class Loader extends PackageLoader {
|
||||||
|
|
||||||
|
|
@ -76,28 +76,12 @@ public class Loader extends PackageLoader {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a document repository application type, the domain class of the
|
* Creates a document repository application type, the domain class of the
|
||||||
* document repository (docrepo) package, as a legacy-compatible type of
|
* document repository (docrepo) package.
|
||||||
* application.
|
|
||||||
*
|
*
|
||||||
* Creates an entry in table application_types and a corresponding entry in
|
|
||||||
* apm_package_types
|
|
||||||
*
|
|
||||||
* TODO: migrate to a new style, legacy free application type.
|
|
||||||
*/
|
*/
|
||||||
private void loadDocRepositoryApplicationType() {
|
private void loadDocRepositoryApplicationType() {
|
||||||
|
|
||||||
/* Legacy compatible initialization */
|
/* NOTE: The wording in the title parameter of ApplicationType determines
|
||||||
// ApplicationType type = ApplicationType.createApplicationType(
|
|
||||||
// "docrepo",
|
|
||||||
// "Document Repository",
|
|
||||||
// Repository.BASE_DATA_OBJECT_TYPE);
|
|
||||||
// Current code requires an apps specific dispatcher class. Has to be
|
|
||||||
// modified to be able to create a legacy free app type.
|
|
||||||
// type.setDispatcherClass
|
|
||||||
// ("com.arsdigita.docrepo.ui.DRDispatcher");
|
|
||||||
|
|
||||||
/* Legacy free initialization
|
|
||||||
* NOTE: The wording in the title parameter of ApplicationType determines
|
|
||||||
* the name of the subdirectory for the XSL stylesheets.
|
* the name of the subdirectory for the XSL stylesheets.
|
||||||
* It gets "urlized", i.e. trimming leading and trailing blanks and replacing
|
* It gets "urlized", i.e. trimming leading and trailing blanks and replacing
|
||||||
* blanks between words and illegal characters with an hyphen and converted
|
* blanks between words and illegal characters with an hyphen and converted
|
||||||
|
|
|
||||||
|
|
@ -26,22 +26,15 @@ import com.arsdigita.kernel.Group;
|
||||||
import com.arsdigita.kernel.Kernel;
|
import com.arsdigita.kernel.Kernel;
|
||||||
import com.arsdigita.kernel.KernelExcursion;
|
import com.arsdigita.kernel.KernelExcursion;
|
||||||
import com.arsdigita.kernel.Party;
|
import com.arsdigita.kernel.Party;
|
||||||
//import com.arsdigita.kernel.SiteNode;
|
|
||||||
import com.arsdigita.kernel.User;
|
import com.arsdigita.kernel.User;
|
||||||
// import com.arsdigita.kernel.permissions.PermissionDescriptor;
|
|
||||||
import com.arsdigita.kernel.permissions.PermissionService;
|
import com.arsdigita.kernel.permissions.PermissionService;
|
||||||
//import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
|
||||||
//import com.arsdigita.persistence.DataObject;
|
|
||||||
import com.arsdigita.persistence.OID;
|
import com.arsdigita.persistence.OID;
|
||||||
import com.arsdigita.persistence.SessionManager;
|
import com.arsdigita.persistence.SessionManager;
|
||||||
//import com.arsdigita.persistence.Session;
|
|
||||||
import com.arsdigita.persistence.DataCollection;
|
import com.arsdigita.persistence.DataCollection;
|
||||||
import com.arsdigita.persistence.DataObject;
|
import com.arsdigita.persistence.DataObject;
|
||||||
import com.arsdigita.util.UncheckedWrapperException;
|
import com.arsdigita.util.UncheckedWrapperException;
|
||||||
|
|
||||||
import com.arsdigita.web.Application;
|
import com.arsdigita.web.Application;
|
||||||
import com.arsdigita.web.Web;
|
import com.arsdigita.web.Web;
|
||||||
//import com.arsdigita.web.ApplicationCollection;
|
|
||||||
import com.arsdigita.util.Assert;
|
import com.arsdigita.util.Assert;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
@ -324,6 +317,7 @@ public class Repository extends Application {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the servletPath part of the URL to the application servlet.
|
* Returns the servletPath part of the URL to the application servlet.
|
||||||
* (see Servlet API specification or web.URL for more information)
|
* (see Servlet API specification or web.URL for more information)
|
||||||
|
|
|
||||||
|
|
@ -31,13 +31,6 @@ import com.arsdigita.bebop.event.PrintListener;
|
||||||
import com.arsdigita.dispatcher.DispatcherHelper;
|
import com.arsdigita.dispatcher.DispatcherHelper;
|
||||||
import com.arsdigita.dispatcher.ObjectNotFoundException;
|
import com.arsdigita.dispatcher.ObjectNotFoundException;
|
||||||
import com.arsdigita.docrepo.File;
|
import com.arsdigita.docrepo.File;
|
||||||
// import com.arsdigita.docrepo.ui.BrowsePane;
|
|
||||||
// import com.arsdigita.docrepo.ui.DocrepoBasePage;
|
|
||||||
// import com.arsdigita.docrepo.ui.DRConstants;
|
|
||||||
// import com.arsdigita.docrepo.ui.DRUtils;
|
|
||||||
// import com.arsdigita.docrepo.ui.FileInfoHistoryPane;
|
|
||||||
// import com.arsdigita.docrepo.ui.FileInfoPropertiesPane;
|
|
||||||
// import com.arsdigita.docrepo.ui.RepositoryPane;
|
|
||||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||||
import com.arsdigita.persistence.DataQuery;
|
import com.arsdigita.persistence.DataQuery;
|
||||||
|
|
@ -49,16 +42,15 @@ import com.arsdigita.util.Assert;
|
||||||
import com.arsdigita.util.UncheckedWrapperException;
|
import com.arsdigita.util.UncheckedWrapperException;
|
||||||
import com.arsdigita.web.Application;
|
import com.arsdigita.web.Application;
|
||||||
import com.arsdigita.web.BaseApplicationServlet;
|
import com.arsdigita.web.BaseApplicationServlet;
|
||||||
|
import com.arsdigita.web.Web;
|
||||||
import com.arsdigita.xml.Document;
|
import com.arsdigita.xml.Document;
|
||||||
|
|
||||||
import com.arsdigita.web.Web;
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.servlet.ServletException;
|
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
|
@ -68,17 +60,16 @@ import org.apache.log4j.Logger;
|
||||||
* Application servlet for the ccm-docrepo application, serves all request made
|
* Application servlet for the ccm-docrepo application, serves all request made
|
||||||
* for the application's UI.
|
* for the application's UI.
|
||||||
*
|
*
|
||||||
* URLs of the available services are stored in a XML file which is processed
|
* DRServlet is called by BaseApplicationServlet which has determined that
|
||||||
* into a cache of services on a request by request basis (lazy loading).
|
* DRServlet is associated with a request URL.
|
||||||
*
|
*
|
||||||
* ServiceServlet is called by BaseApplicationServlet which has determined that
|
* The servlet has to be included in servlet container's deployment descriptor,
|
||||||
* ServiceServlet is associated with a request URL.
|
* see {@see com.arsdigita.docrepo.Repository#getServletPath()} for details
|
||||||
|
* about web.xml record. It is NOT directly referenced by any other class.
|
||||||
*
|
*
|
||||||
* The CMS Service determines whether a <tt>Page</tt> has been registered to
|
* It determines whether a <tt>Page</tt> has been registered to the URL and
|
||||||
* the URL and if so passes the request to that page.
|
* if so passes the request to that page. Otherwise it hands the request
|
||||||
*
|
* to the TemplateResolver to find an appropriate JSP file.
|
||||||
* If no <tt>Page</tt> is registered to the URL, then the CMS Service hands
|
|
||||||
* the request to the TemplateResolver to find an appropriate JSP file.
|
|
||||||
*
|
*
|
||||||
* @author <mailto href="StefanDeusch@computer.org">Stefan Deusch</a>
|
* @author <mailto href="StefanDeusch@computer.org">Stefan Deusch</a>
|
||||||
* @author Peter Boy <pboy@barkhof.uni-bremen.de>
|
* @author Peter Boy <pboy@barkhof.uni-bremen.de>
|
||||||
|
|
@ -109,6 +100,7 @@ public class DRServlet extends BaseApplicationServlet
|
||||||
addPage("/file", buildFileInfoPage());
|
addPage("/file", buildFileInfoPage());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements the (abstract) doService method of BaseApplicationServlet to
|
* Implements the (abstract) doService method of BaseApplicationServlet to
|
||||||
* perform the services.
|
* perform the services.
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,10 @@ import java.math.BigDecimal;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Faq class.
|
* Application domain class for the Faq application.
|
||||||
|
*
|
||||||
|
* It manages creation of new Faq instances and provides getters and setters
|
||||||
|
* for instance specific items.
|
||||||
*
|
*
|
||||||
* @version $Id: com/arsdigita/faq/Faq.java#5 $
|
* @version $Id: com/arsdigita/faq/Faq.java#5 $
|
||||||
*/
|
*/
|
||||||
|
|
@ -44,7 +47,6 @@ public class Faq extends Application {
|
||||||
private static final Logger log = Logger.getLogger(Faq.class);
|
private static final Logger log = Logger.getLogger(Faq.class);
|
||||||
|
|
||||||
// PDL stuff
|
// PDL stuff
|
||||||
|
|
||||||
public static final String BASE_DATA_OBJECT_TYPE =
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
"com.arsdigita.faq.Faq";
|
"com.arsdigita.faq.Faq";
|
||||||
|
|
||||||
|
|
@ -107,14 +109,6 @@ public class Faq extends Application {
|
||||||
new TypedText(answer, TypedText.TEXT_HTML));
|
new TypedText(answer, TypedText.TEXT_HTML));
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
|
||||||
// * @deprecated use createQuestion(String, TypedText) instead
|
|
||||||
// */
|
|
||||||
// public QAPair createQuestion(String question, String answer,
|
|
||||||
// String answerFormat) {
|
|
||||||
// return createQuestion(question, new TypedText(answer, answerFormat));
|
|
||||||
// }
|
|
||||||
|
|
||||||
public QAPair createQuestion(String question, TypedText answer) {
|
public QAPair createQuestion(String question, TypedText answer) {
|
||||||
|
|
||||||
Integer sortKey = getNextSortKey();
|
Integer sortKey = getNextSortKey();
|
||||||
|
|
@ -183,6 +177,32 @@ public class Faq extends Application {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the path name of the location of the applications servlet/JSP.
|
||||||
|
*
|
||||||
|
* The method overwrites the super class to provide an application specific
|
||||||
|
* location for servlets/JSP. This is necessary if you whish to install the
|
||||||
|
* module (application) along with others in one context. If you install the
|
||||||
|
* module into its own context (no longer recommended) you may use a
|
||||||
|
* standard location.
|
||||||
|
*
|
||||||
|
* Usually it is a symbolic name/path, which will be mapped in the web.xml
|
||||||
|
* to the real location in the file system. Example:
|
||||||
|
* <servlet>
|
||||||
|
* <servlet-name>faq</servlet-name>
|
||||||
|
* <servlet-class>com.arsdigita.faq.Faq</servlet-class>
|
||||||
|
* </servlet>
|
||||||
|
*
|
||||||
|
* <servlet-mapping>
|
||||||
|
* <servlet-name>faq</servlet-name>
|
||||||
|
* <url-pattern>/faq/*</url-pattern>
|
||||||
|
* </servlet-mapping>
|
||||||
|
*
|
||||||
|
* The appended "/*" ensures BaseServlet will find additional JSP's.
|
||||||
|
*
|
||||||
|
* @return path name to the applications servlet/JSP
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getServletPath() {
|
public String getServletPath() {
|
||||||
return "/faq";
|
return "/faq";
|
||||||
|
|
|
||||||
|
|
@ -1037,6 +1037,7 @@ public class Forum extends Application {
|
||||||
// public String getContextPath() {
|
// public String getContextPath() {
|
||||||
// return "/ccm-forum";
|
// return "/ccm-forum";
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the path name of the location of the applications servlet/JSP.
|
* Returns the path name of the location of the applications servlet/JSP.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,13 @@ import org.apache.log4j.Logger;
|
||||||
import com.arsdigita.domain.DomainObject;
|
import com.arsdigita.domain.DomainObject;
|
||||||
import com.arsdigita.domain.DomainObjectFactory;
|
import com.arsdigita.domain.DomainObjectFactory;
|
||||||
import com.arsdigita.domain.DomainObjectInstantiator;
|
import com.arsdigita.domain.DomainObjectInstantiator;
|
||||||
import com.arsdigita.kernel.ACSObjectInstantiator;
|
|
||||||
import com.arsdigita.kernel.Kernel;
|
import com.arsdigita.kernel.Kernel;
|
||||||
import com.arsdigita.kernel.KernelExcursion;
|
import com.arsdigita.kernel.KernelExcursion;
|
||||||
import com.arsdigita.london.util.Program;
|
import com.arsdigita.london.util.Program;
|
||||||
import com.arsdigita.london.util.Transaction;
|
import com.arsdigita.london.util.Transaction;
|
||||||
import com.arsdigita.persistence.DataObject;
|
import com.arsdigita.persistence.DataObject;
|
||||||
import com.arsdigita.web.Application;
|
import com.arsdigita.web.Application;
|
||||||
import com.arsdigita.web.ApplicationSetup;
|
|
||||||
import com.arsdigita.web.ApplicationType;
|
|
||||||
import com.arsdigita.web.ApplicationTypeCollection;
|
|
||||||
|
|
||||||
public class AddAtoZ extends Program {
|
public class AddAtoZ extends Program {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,11 @@
|
||||||
|
|
||||||
package com.arsdigita.london.atoz;
|
package com.arsdigita.london.atoz;
|
||||||
|
|
||||||
import com.arsdigita.domain.DomainObject;
|
|
||||||
import com.arsdigita.kernel.ACSObjectInstantiator;
|
|
||||||
import com.arsdigita.kernel.Kernel;
|
import com.arsdigita.kernel.Kernel;
|
||||||
import com.arsdigita.kernel.KernelExcursion;
|
import com.arsdigita.kernel.KernelExcursion;
|
||||||
import com.arsdigita.loader.PackageLoader;
|
import com.arsdigita.loader.PackageLoader;
|
||||||
import com.arsdigita.persistence.DataObject;
|
|
||||||
import com.arsdigita.runtime.ScriptContext;
|
import com.arsdigita.runtime.ScriptContext;
|
||||||
import com.arsdigita.web.Application;
|
import com.arsdigita.web.Application;
|
||||||
import com.arsdigita.web.ApplicationSetup;
|
|
||||||
import com.arsdigita.web.ApplicationType;
|
import com.arsdigita.web.ApplicationType;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,11 @@
|
||||||
|
|
||||||
package com.arsdigita.london.search;
|
package com.arsdigita.london.search;
|
||||||
|
|
||||||
import com.arsdigita.domain.DomainObject;
|
|
||||||
import com.arsdigita.kernel.ACSObjectInstantiator;
|
|
||||||
import com.arsdigita.kernel.Kernel;
|
import com.arsdigita.kernel.Kernel;
|
||||||
import com.arsdigita.kernel.KernelExcursion;
|
import com.arsdigita.kernel.KernelExcursion;
|
||||||
import com.arsdigita.loader.PackageLoader;
|
import com.arsdigita.loader.PackageLoader;
|
||||||
import com.arsdigita.persistence.DataObject;
|
|
||||||
import com.arsdigita.runtime.ScriptContext;
|
import com.arsdigita.runtime.ScriptContext;
|
||||||
import com.arsdigita.web.Application;
|
import com.arsdigita.web.Application;
|
||||||
import com.arsdigita.web.ApplicationSetup;
|
|
||||||
import com.arsdigita.web.ApplicationType;
|
import com.arsdigita.web.ApplicationType;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,17 +137,15 @@ public class Loader extends PackageLoader {
|
||||||
private void loadPortalSiteApplicationType() {
|
private void loadPortalSiteApplicationType() {
|
||||||
|
|
||||||
/* First try: create a new style, legacy compatible application */
|
/* First try: create a new style, legacy compatible application */
|
||||||
/*
|
|
||||||
ApplicationType type = ApplicationType.createApplicationType(
|
// ApplicationType type = ApplicationType.createApplicationType(
|
||||||
"portalsite",
|
// "portalsite",
|
||||||
"Portal Site",
|
// "Portal Site",
|
||||||
PortalSite.BASE_DATA_OBJECT_TYPE);
|
// PortalSite.BASE_DATA_OBJECT_TYPE);
|
||||||
// Current code requires an apps specific dispatcher class. Has to be
|
// Current code requires an apps specific dispatcher class. Has to be
|
||||||
// modified to be able to create a legacy free app type.
|
// modified to be able to create a legacy free app type.
|
||||||
type.setDispatcherClass
|
// type.setDispatcherClass
|
||||||
("com.arsdigita.portalserver.ui.PortalDispatcher");
|
// ("com.arsdigita.portalserver.ui.PortalDispatcher");
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Try: new style legacy free application
|
// Try: new style legacy free application
|
||||||
ApplicationType type = new
|
ApplicationType type = new
|
||||||
|
|
@ -230,16 +228,16 @@ public class Loader extends PackageLoader {
|
||||||
// in applications mit primary_url=/portal-admin/
|
// in applications mit primary_url=/portal-admin/
|
||||||
// in acs_object mit default_domain_class=c.ad.ps.admin.PSAdmin und
|
// in acs_object mit default_domain_class=c.ad.ps.admin.PSAdmin und
|
||||||
// object_type=c.ad.admin.CWAdmin, ebenfalls wg. BASE_DATA_OBJ_TYPE
|
// object_type=c.ad.admin.CWAdmin, ebenfalls wg. BASE_DATA_OBJ_TYPE
|
||||||
/*
|
|
||||||
ApplicationType type = ApplicationType.createApplicationType(
|
// ApplicationType type = ApplicationType.createApplicationType(
|
||||||
"portal-admin",
|
// "portal-admin",
|
||||||
"Portal Server Site Administration",
|
// "Portal Server Site Administration",
|
||||||
PSAdmin.BASE_DATA_OBJECT_TYPE);
|
// PSAdmin.BASE_DATA_OBJECT_TYPE);
|
||||||
// Current code requires an apps specific dispatcher class. Has to be
|
// // Current code requires an apps specific dispatcher class. Has to be
|
||||||
// modified to be able to create a legacy free app type.
|
// // modified to be able to create a legacy free app type.
|
||||||
type.setDispatcherClass
|
// type.setDispatcherClass
|
||||||
("com.arsdigita.portalserver.admin.ui.Dispatcher");
|
// ("com.arsdigita.portalserver.admin.ui.Dispatcher");
|
||||||
*/
|
|
||||||
// Try: new style legacy free application
|
// Try: new style legacy free application
|
||||||
ApplicationType type = new
|
ApplicationType type = new
|
||||||
ApplicationType("Portal Admin", // title
|
ApplicationType("Portal Admin", // title
|
||||||
|
|
@ -259,17 +257,17 @@ public class Loader extends PackageLoader {
|
||||||
private void loadPortalCreatorApplicationType() {
|
private void loadPortalCreatorApplicationType() {
|
||||||
// formerly private ApplicationType setupPortalCreator() { in ui.admin.Initializer
|
// formerly private ApplicationType setupPortalCreator() { in ui.admin.Initializer
|
||||||
|
|
||||||
/*
|
|
||||||
ApplicationType type = ApplicationType.createApplicationType(
|
// ApplicationType type = ApplicationType.createApplicationType(
|
||||||
"portal-create",
|
// "portal-create",
|
||||||
"Portal Creator",
|
// "Portal Creator",
|
||||||
PortalCreator.BASE_DATA_OBJECT_TYPE);
|
// PortalCreator.BASE_DATA_OBJECT_TYPE);
|
||||||
type.setDescription ("Creates portals.");
|
// type.setDescription ("Creates portals.");
|
||||||
// Current code requires an apps specific dispatcher class. Has to be
|
// // Current code requires an apps specific dispatcher class. Has to be
|
||||||
// modified to be able to create a legacy free app type.
|
// // modified to be able to create a legacy free app type.
|
||||||
type.setDispatcherClass
|
// type.setDispatcherClass
|
||||||
("com.arsdigita.portalserver.ui.admin.PortalCreateDispatcher");
|
// ("com.arsdigita.portalserver.ui.admin.PortalCreateDispatcher");
|
||||||
*/
|
|
||||||
|
|
||||||
// Try: new style legacy free application
|
// Try: new style legacy free application
|
||||||
ApplicationType type = new
|
ApplicationType type = new
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,10 @@
|
||||||
package com.arsdigita.cms.scipublications;
|
package com.arsdigita.cms.scipublications;
|
||||||
|
|
||||||
import com.arsdigita.domain.DomainObject;
|
|
||||||
import com.arsdigita.kernel.ACSObjectInstantiator;
|
|
||||||
import com.arsdigita.kernel.Kernel;
|
import com.arsdigita.kernel.Kernel;
|
||||||
import com.arsdigita.kernel.KernelExcursion;
|
import com.arsdigita.kernel.KernelExcursion;
|
||||||
import com.arsdigita.loader.PackageLoader;
|
import com.arsdigita.loader.PackageLoader;
|
||||||
import com.arsdigita.persistence.DataObject;
|
|
||||||
import com.arsdigita.runtime.ScriptContext;
|
import com.arsdigita.runtime.ScriptContext;
|
||||||
import com.arsdigita.web.Application;
|
import com.arsdigita.web.Application;
|
||||||
import com.arsdigita.web.ApplicationSetup;
|
|
||||||
import com.arsdigita.web.ApplicationType;
|
import com.arsdigita.web.ApplicationType;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
|
@ -30,35 +26,6 @@ public class SciPublicationsLoader extends PackageLoader {
|
||||||
protected void excurse() {
|
protected void excurse() {
|
||||||
setEffectiveParty(Kernel.getSystemParty());
|
setEffectiveParty(Kernel.getSystemParty());
|
||||||
|
|
||||||
/*ApplicationSetup setup = new ApplicationSetup(logger);
|
|
||||||
|
|
||||||
setup.setApplicationObjectType(
|
|
||||||
SciPublications.BASE_DATA_OBJECT_TYPE);
|
|
||||||
setup.setKey("scipubliations");
|
|
||||||
setup.setTitle("sci-publications");
|
|
||||||
setup.setDescription(
|
|
||||||
"Provides several functions like export and import for publications.");
|
|
||||||
//setup.setSingleton(true);
|
|
||||||
setup.setInstantiator(new ACSObjectInstantiator() {
|
|
||||||
@Override
|
|
||||||
public DomainObject doNewInstance(DataObject dataObject) {
|
|
||||||
return new SciPublications(dataObject);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
ApplicationType type = setup.run();
|
|
||||||
type.save();
|
|
||||||
|
|
||||||
//Install the application and mount the app at 'scipublications'.
|
|
||||||
if (!Application.isInstalled(
|
|
||||||
SciPublications.BASE_DATA_OBJECT_TYPE, "/scipublications/")) {
|
|
||||||
Application app = Application.createApplication(type,
|
|
||||||
"scipublications",
|
|
||||||
"SciPublications",
|
|
||||||
null);
|
|
||||||
app.save();
|
|
||||||
}*/
|
|
||||||
|
|
||||||
final ApplicationType type = new ApplicationType(
|
final ApplicationType type = new ApplicationType(
|
||||||
"SciPublications",
|
"SciPublications",
|
||||||
SciPublications.BASE_DATA_OBJECT_TYPE);
|
SciPublications.BASE_DATA_OBJECT_TYPE);
|
||||||
|
|
|
||||||
|
|
@ -18,16 +18,12 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.simplesurvey;
|
package com.arsdigita.simplesurvey;
|
||||||
|
|
||||||
import com.arsdigita.domain.DomainObject;
|
|
||||||
import com.arsdigita.formbuilder.util.FormbuilderSetup;
|
import com.arsdigita.formbuilder.util.FormbuilderSetup;
|
||||||
import com.arsdigita.kernel.ACSObjectInstantiator;
|
|
||||||
import com.arsdigita.kernel.Kernel;
|
import com.arsdigita.kernel.Kernel;
|
||||||
import com.arsdigita.kernel.KernelExcursion;
|
import com.arsdigita.kernel.KernelExcursion;
|
||||||
import com.arsdigita.loader.PackageLoader;
|
import com.arsdigita.loader.PackageLoader;
|
||||||
import com.arsdigita.persistence.DataObject;
|
|
||||||
import com.arsdigita.runtime.ScriptContext;
|
import com.arsdigita.runtime.ScriptContext;
|
||||||
import com.arsdigita.web.Application;
|
import com.arsdigita.web.Application;
|
||||||
import com.arsdigita.web.ApplicationSetup;
|
|
||||||
import com.arsdigita.web.ApplicationType;
|
import com.arsdigita.web.ApplicationType;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue