CCM NG: Bugfixes for the CCMDispatcherServlet and some other things.

git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4546 8810af33-2d31-482b-a856-94f89814c4df
ccm-docs
jensp 2017-02-01 12:40:34 +00:00
parent d9329c47db
commit 35f766f050
8 changed files with 37 additions and 9 deletions

View File

@ -59,7 +59,7 @@ import static javax.naming.ldap.SortControl.*;
/**
* Resolves items to URLs and URLs to items for multiple language variants.
*
* * <strong>
* <strong>
* AS of version 7.0.0 this class not longer part of the public API. It is left
* here to keep the changes to the UI classes as minimal as possible. For new
* code other methods, for example from the {@link ContentItemManager} or the

View File

@ -33,6 +33,7 @@ import com.arsdigita.bebop.table.TableColumn;
import com.arsdigita.bebop.table.TableColumnModel;
import com.arsdigita.bebop.table.TableModel;
import com.arsdigita.bebop.table.TableModelBuilder;
import com.arsdigita.cms.PageLocations;
import com.arsdigita.cms.ui.CMSContainer;
import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.util.LockableImpl;
@ -628,7 +629,7 @@ public class ContentSectionContainer extends CMSContainer {
* @return
*/
protected String generateURL(String prefix) {
return prefix;// + PageLocations.SECTION_PAGE;
return prefix + PageLocations.SECTION_PAGE;
}
}

View File

@ -495,9 +495,11 @@ public class CCMDispatcherServlet extends BaseServlet {
final StringBuffer target = new StringBuffer(128);
target.append(m_typeURI);
// target.append("/");
if (!m_typeURI.endsWith("/")) {
target.append("/");
}
if (path.length() > (m_instanceURI.length() + 1)) {
target.append(path.substring(m_instanceURI.length() + 1));
target.append(path.substring(m_instanceURI.length()));
}
if (target.charAt(target.length() - 1) != '/') {
target.append('/');

View File

@ -26,7 +26,7 @@ import javax.inject.Inject;
import javax.transaction.Transactional;
/**
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers</a>
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
* @version created on 11/7/16
*/
@RequestScoped

View File

@ -39,8 +39,9 @@ import java.util.List;
* possible to ex- or import that extending entity-class (e.g. DocRepo
* .FileMarshal).
*
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers</a>
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
* @version created the 2/10/16
* @param <P>
*/
public abstract class AbstractMarshaller<P extends Portable> {

View File

@ -31,7 +31,7 @@ import java.lang.annotation.Target;
* value is the implementation of {@link Identifiable} for which the annotated
* {@link AbstractMarshaller} implementation exports and imports its instances.
*
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers</a>
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
* @version created the 2/24/16
*/
@Retention(RetentionPolicy.RUNTIME)

View File

@ -18,6 +18,7 @@
*/
package org.libreccm.portation;
import javax.inject.Inject;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.junit.InSequence;
@ -56,6 +57,7 @@ import org.jboss.arquillian.persistence.CleanupUsingScript;
@CleanupUsingScript({"cleanup.sql"})
public class CoreDataImportTest {
@Inject
private ImportHelper importHelper;
public CoreDataImportTest() {
@ -111,7 +113,7 @@ public class CoreDataImportTest {
@Before
public void setUp() {
importHelper = new ImportHelper();
//importHelper = new ImportHelper();
}
@After

View File

@ -37,6 +37,17 @@ import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import java.util.List;
import org.libreccm.categorization.Categorization;
import org.libreccm.security.GroupMembership;
import org.libreccm.security.Permission;
import org.libreccm.security.Role;
import org.libreccm.security.RoleMembership;
import org.libreccm.security.User;
import org.libreccm.workflow.AssignableTask;
import org.libreccm.workflow.Task;
import org.libreccm.workflow.TaskAssignment;
import org.libreccm.workflow.Workflow;
import org.libreccm.workflow.WorkflowTemplate;
/**
* Helper to implement the specifics for the importations. Makes source code
@ -48,34 +59,45 @@ import java.util.List;
@RequestScoped
class ImportHelper {
private String pathName =
"/home/tosmers/Svn/libreccm/ccm_ng/ccm-core/src/test/resources/" +
"/home/jensp/pwi/libreccm/ccm/ccm_ng/ccm-core/src/test/resources/" +
"portation/trunk-iaw-exports";
private boolean indentation = false;
@Inject
@Marshals(Category.class)
private CategoryMarshaller categoryMarshaller;
@Inject
@Marshals(Categorization.class)
private CategorizationMarshaller categorizationMarshaller;
@Inject
@Marshals(User.class)
private UserMarshaller userMarshaller;
@Inject
@Marshals(Group.class)
private GroupMarshaller groupMarshaller;
@Inject
@Marshals(GroupMembership.class)
private GroupMembershipMarshaller groupMembershipMarshaller;
@Inject
@Marshals(Role.class)
private RoleMarshaller roleMarshaller;
@Inject
@Marshals(RoleMembership.class)
private RoleMembershipMarshaller roleMembershipMarshaller;
@Inject
@Marshals(WorkflowTemplate.class)
private WorkflowTemplateMarshaller workflowTemplateMarshaller;
@Inject
@Marshals(Workflow.class)
private WorkflowMarshaller workflowMarshaller;
@Inject
@Marshals(AssignableTask.class)
private AssignableTaskMarshaller assignableTaskMarshaller;
@Inject
@Marshals(TaskAssignment.class)
private TaskAssignmentMarshaller taskAssignmentMarshaller;
@Inject
@Marshals(Permission.class)
private PermissionMarshaller permissionMarshaller;