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-94f89814c4dfpull/2/head
parent
1485a95de1
commit
647f182943
|
|
@ -59,7 +59,7 @@ import static javax.naming.ldap.SortControl.*;
|
||||||
/**
|
/**
|
||||||
* Resolves items to URLs and URLs to items for multiple language variants.
|
* 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
|
* 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
|
* 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
|
* code other methods, for example from the {@link ContentItemManager} or the
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ import com.arsdigita.bebop.table.TableColumn;
|
||||||
import com.arsdigita.bebop.table.TableColumnModel;
|
import com.arsdigita.bebop.table.TableColumnModel;
|
||||||
import com.arsdigita.bebop.table.TableModel;
|
import com.arsdigita.bebop.table.TableModel;
|
||||||
import com.arsdigita.bebop.table.TableModelBuilder;
|
import com.arsdigita.bebop.table.TableModelBuilder;
|
||||||
|
import com.arsdigita.cms.PageLocations;
|
||||||
import com.arsdigita.cms.ui.CMSContainer;
|
import com.arsdigita.cms.ui.CMSContainer;
|
||||||
import com.arsdigita.globalization.GlobalizedMessage;
|
import com.arsdigita.globalization.GlobalizedMessage;
|
||||||
import com.arsdigita.util.LockableImpl;
|
import com.arsdigita.util.LockableImpl;
|
||||||
|
|
@ -628,7 +629,7 @@ public class ContentSectionContainer extends CMSContainer {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
protected String generateURL(String prefix) {
|
protected String generateURL(String prefix) {
|
||||||
return prefix;// + PageLocations.SECTION_PAGE;
|
return prefix + PageLocations.SECTION_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -495,9 +495,11 @@ public class CCMDispatcherServlet extends BaseServlet {
|
||||||
final StringBuffer target = new StringBuffer(128);
|
final StringBuffer target = new StringBuffer(128);
|
||||||
|
|
||||||
target.append(m_typeURI);
|
target.append(m_typeURI);
|
||||||
// target.append("/");
|
if (!m_typeURI.endsWith("/")) {
|
||||||
|
target.append("/");
|
||||||
|
}
|
||||||
if (path.length() > (m_instanceURI.length() + 1)) {
|
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) != '/') {
|
if (target.charAt(target.length() - 1) != '/') {
|
||||||
target.append('/');
|
target.append('/');
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ import javax.inject.Inject;
|
||||||
import javax.transaction.Transactional;
|
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
|
* @version created on 11/7/16
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,9 @@ import java.util.List;
|
||||||
* possible to ex- or import that extending entity-class (e.g. DocRepo
|
* possible to ex- or import that extending entity-class (e.g. DocRepo
|
||||||
* .FileMarshal).
|
* .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
|
* @version created the 2/10/16
|
||||||
|
* @param <P>
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractMarshaller<P extends Portable> {
|
public abstract class AbstractMarshaller<P extends Portable> {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ import java.lang.annotation.Target;
|
||||||
* value is the implementation of {@link Identifiable} for which the annotated
|
* value is the implementation of {@link Identifiable} for which the annotated
|
||||||
* {@link AbstractMarshaller} implementation exports and imports its instances.
|
* {@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
|
* @version created the 2/24/16
|
||||||
*/
|
*/
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
*/
|
*/
|
||||||
package org.libreccm.portation;
|
package org.libreccm.portation;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
import org.jboss.arquillian.container.test.api.Deployment;
|
import org.jboss.arquillian.container.test.api.Deployment;
|
||||||
import org.jboss.arquillian.junit.Arquillian;
|
import org.jboss.arquillian.junit.Arquillian;
|
||||||
import org.jboss.arquillian.junit.InSequence;
|
import org.jboss.arquillian.junit.InSequence;
|
||||||
|
|
@ -56,6 +57,7 @@ import org.jboss.arquillian.persistence.CleanupUsingScript;
|
||||||
@CleanupUsingScript({"cleanup.sql"})
|
@CleanupUsingScript({"cleanup.sql"})
|
||||||
public class CoreDataImportTest {
|
public class CoreDataImportTest {
|
||||||
|
|
||||||
|
@Inject
|
||||||
private ImportHelper importHelper;
|
private ImportHelper importHelper;
|
||||||
|
|
||||||
public CoreDataImportTest() {
|
public CoreDataImportTest() {
|
||||||
|
|
@ -111,7 +113,7 @@ public class CoreDataImportTest {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
importHelper = new ImportHelper();
|
//importHelper = new ImportHelper();
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,17 @@ import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import java.util.List;
|
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
|
* Helper to implement the specifics for the importations. Makes source code
|
||||||
|
|
@ -48,34 +59,45 @@ import java.util.List;
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
class ImportHelper {
|
class ImportHelper {
|
||||||
private String pathName =
|
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";
|
"portation/trunk-iaw-exports";
|
||||||
private boolean indentation = false;
|
private boolean indentation = false;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
@Marshals(Category.class)
|
||||||
private CategoryMarshaller categoryMarshaller;
|
private CategoryMarshaller categoryMarshaller;
|
||||||
@Inject
|
@Inject
|
||||||
|
@Marshals(Categorization.class)
|
||||||
private CategorizationMarshaller categorizationMarshaller;
|
private CategorizationMarshaller categorizationMarshaller;
|
||||||
@Inject
|
@Inject
|
||||||
|
@Marshals(User.class)
|
||||||
private UserMarshaller userMarshaller;
|
private UserMarshaller userMarshaller;
|
||||||
@Inject
|
@Inject
|
||||||
@Marshals(Group.class)
|
@Marshals(Group.class)
|
||||||
private GroupMarshaller groupMarshaller;
|
private GroupMarshaller groupMarshaller;
|
||||||
@Inject
|
@Inject
|
||||||
|
@Marshals(GroupMembership.class)
|
||||||
private GroupMembershipMarshaller groupMembershipMarshaller;
|
private GroupMembershipMarshaller groupMembershipMarshaller;
|
||||||
@Inject
|
@Inject
|
||||||
|
@Marshals(Role.class)
|
||||||
private RoleMarshaller roleMarshaller;
|
private RoleMarshaller roleMarshaller;
|
||||||
@Inject
|
@Inject
|
||||||
|
@Marshals(RoleMembership.class)
|
||||||
private RoleMembershipMarshaller roleMembershipMarshaller;
|
private RoleMembershipMarshaller roleMembershipMarshaller;
|
||||||
@Inject
|
@Inject
|
||||||
|
@Marshals(WorkflowTemplate.class)
|
||||||
private WorkflowTemplateMarshaller workflowTemplateMarshaller;
|
private WorkflowTemplateMarshaller workflowTemplateMarshaller;
|
||||||
@Inject
|
@Inject
|
||||||
|
@Marshals(Workflow.class)
|
||||||
private WorkflowMarshaller workflowMarshaller;
|
private WorkflowMarshaller workflowMarshaller;
|
||||||
@Inject
|
@Inject
|
||||||
|
@Marshals(AssignableTask.class)
|
||||||
private AssignableTaskMarshaller assignableTaskMarshaller;
|
private AssignableTaskMarshaller assignableTaskMarshaller;
|
||||||
@Inject
|
@Inject
|
||||||
|
@Marshals(TaskAssignment.class)
|
||||||
private TaskAssignmentMarshaller taskAssignmentMarshaller;
|
private TaskAssignmentMarshaller taskAssignmentMarshaller;
|
||||||
@Inject
|
@Inject
|
||||||
|
@Marshals(Permission.class)
|
||||||
private PermissionMarshaller permissionMarshaller;
|
private PermissionMarshaller permissionMarshaller;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue