Several optimizations

Jens Pelzetter 2020-06-30 21:05:28 +02:00
parent 98b082ca94
commit 88675a786a
7 changed files with 30 additions and 10 deletions

View File

@ -21,6 +21,7 @@ import org.libreccm.api.PreflightRequestFilter;
import org.libreccm.api.admin.categorization.CategoriesApi;
import org.libreccm.api.admin.categorization.DomainsApi;
import org.libreccm.api.admin.sites.SitesApi;
import org.libreccm.api.admin.web.CcmApplicationsApi;
import org.libreccm.configuration.Configuration;
/**
@ -55,6 +56,9 @@ public class AdminApi extends Application {
// System Information API
classes.add(SystemInformationApi.class);
// Web
classes.add(CcmApplicationsApi.class);
return classes;
}

View File

@ -241,7 +241,7 @@ public class DomainsApi {
);
}
@GET
@PUT
@Path("/{domainIdentifier}/owners/{ownerIdentifier}")
@Produces(MediaType.APPLICATION_JSON)
@AuthorizationRequired

View File

@ -39,7 +39,7 @@ public class CategoryId {
* Constructor for creating empty instances.
*/
public CategoryId() {
// Nothing
super();
}
/**

View File

@ -35,6 +35,7 @@ import org.libreccm.web.CcmApplication;
import java.util.List;
import java.util.stream.Collectors;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.transaction.Transactional;
import javax.ws.rs.BadRequestException;
@ -56,6 +57,7 @@ import javax.ws.rs.core.UriInfo;
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
@RequestScoped
@Path("/sites")
public class SitesApi {

View File

@ -29,11 +29,11 @@ import org.libreccm.categorization.Category;
import org.libreccm.categorization.CategoryManager;
import org.libreccm.security.Permission;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
@ -43,6 +43,20 @@ import java.util.Objects;
import static org.libreccm.core.CoreConstants.CORE_XML_NS;
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;
/**
* Root class of all entities in LibreCCM which need categorisation and
* permission services.
@ -99,7 +113,7 @@ public class CcmObject implements Identifiable, Serializable {
@Field
@XmlElement(name = "uuid")
private String uuid;
/**
* A human readable name identifying this {@code CcmObject}
*/
@ -144,12 +158,12 @@ public class CcmObject implements Identifiable, Serializable {
public void setObjectId(final long objectId) {
this.objectId = objectId;
}
@Override
public String getUuid() {
return uuid;
}
public void setUuid(final String uuid) {
this.uuid = uuid;
}

View File

@ -37,8 +37,8 @@ import javax.persistence.Table;
* Only applications which are different for each site should extend this class.
* For example for the Admin application or the Content Center application
* provided by the ccm-cms module it makes no sense to make them site aware.
* This applications are used to manage objects which are shared by all sites.
* Other applications like the Pages application provided by ccm-cms module are
* These applications are used to manage objects which are shared by all sites.
* Other applications like the Pages application provided by the ccm-cms module are
* of course site aware. The Pages application for example manages the page tree
* of one specific site.
*

View File

@ -80,8 +80,8 @@ import javax.persistence.Table;
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class,
resolver = ApplicationIdResolver.class,
property = "uuid")
public class CcmApplication extends Resource implements Serializable,
Exportable {
public class CcmApplication
extends Resource implements Serializable, Exportable {
private static final long serialVersionUID = 9205226362368890784L;