CCM NG: Fixed bugs in dispatcher code

git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4493 8810af33-2d31-482b-a856-94f89814c4df
ccm-docs
jensp 2016-12-19 20:51:26 +00:00
parent 9ef1169553
commit e10ab7704e
3 changed files with 13 additions and 12 deletions

View File

@ -172,7 +172,7 @@ public class ContentItem extends CcmObject implements Serializable,
}
)
)
@Field
// @Field
private LocalizedString name;
/**
@ -181,7 +181,7 @@ public class ContentItem extends CcmObject implements Serializable,
@OneToOne
@JoinColumn(name = "CONTENT_TYPE_ID")
@Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED)
@Field
// @Field
private ContentType contentType;
/**
@ -197,7 +197,7 @@ public class ContentItem extends CcmObject implements Serializable,
}
)
)
@Field
// @Field
private LocalizedString title;
/**
@ -211,7 +211,7 @@ public class ContentItem extends CcmObject implements Serializable,
joinColumns = {
@JoinColumn(name = "OBJECT_ID")}
))
@Field
// @Field
private LocalizedString description;
/**
@ -219,7 +219,7 @@ public class ContentItem extends CcmObject implements Serializable,
*/
@Column(name = "VERSION")
@Enumerated(EnumType.STRING)
@Field
// @Field
private ContentItemVersion version;
/**

View File

@ -495,8 +495,10 @@ public class CCMDispatcherServlet extends BaseServlet {
final StringBuffer target = new StringBuffer(128);
target.append(m_typeURI);
target.append("/");
target.append(path.substring(m_instanceURI.length()));
// target.append("/");
if (path.length() > (m_instanceURI.length() + 1)) {
target.append(path.substring(m_instanceURI.length() + 1));
}
target.append("?");
target.append(BaseApplicationServlet.APPLICATION_ID_PARAMETER);
target.append("=");

View File

@ -52,6 +52,7 @@ import static org.libreccm.core.CoreConstants.CORE_XML_NS;
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.FieldBridge;
/**
* Root class of all entities in LibreCCM which need categorisation and
@ -95,7 +96,6 @@ public class CcmObject implements Identifiable, Serializable {
@Id
@Column(name = "OBJECT_ID")
@GeneratedValue(strategy = GenerationType.AUTO)
@Field
@XmlElement(name = "object-id", namespace = CORE_XML_NS)
private long objectId;
@ -121,7 +121,6 @@ public class CcmObject implements Identifiable, Serializable {
* Permissions granted on this object.
*/
@OneToMany(mappedBy = "object")
@Field
@XmlElementWrapper(name = "permissions", namespace = CORE_XML_NS)
@XmlElement(name = "permission", namespace = CORE_XML_NS)
@JsonBackReference(value = "permission-object")