parent
a4133ad692
commit
c84ccd49f7
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Java based migrations for the H2 database.
|
||||||
|
*/
|
||||||
|
package db.migrations.org.libreccm.ccm_core.h2;
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Java based database migrations that use no database specific SQL.
|
||||||
|
*/
|
||||||
|
package db.migrations.org.libreccm.ccm_core;
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Java based migrations for PostgreSQL.
|
||||||
|
*/
|
||||||
|
package db.migrations.org.libreccm.ccm_core.pgsql;
|
||||||
|
|
@ -27,10 +27,12 @@ import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
@Deprecated
|
||||||
public class AdminJsfApplicationCreator implements ApplicationCreator<CcmApplication>{
|
public class AdminJsfApplicationCreator implements ApplicationCreator<CcmApplication>{
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ import java.util.UUID;
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class AdminJsfApplicationSetup extends AbstractCcmApplicationSetup {
|
public class AdminJsfApplicationSetup extends AbstractCcmApplicationSetup {
|
||||||
|
|
||||||
public static final String ADMIN_APP_NAME = "CcmAdminJsf";
|
public static final String ADMIN_APP_NAME = "CcmAdminJsf";
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Some experiments with JSF. To be removed.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
package org.libreccm.admin.ui;
|
||||||
|
|
@ -39,6 +39,7 @@ import java.util.ResourceBundle;
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
@Named
|
@Named
|
||||||
public class SysInfoController {
|
public class SysInfoController {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ package org.libreccm.admin.ui.sysinfo;
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SysInfoProperty {
|
public class SysInfoProperty {
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,9 @@ import java.util.stream.Collectors;
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Base repository for audited entities. Provides access the the revision of
|
||||||
|
* an entity.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
|
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
|
||||||
* @param <K> Primary key of the entity.
|
* @param <K> Primary key of the entity.
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@
|
||||||
package org.libreccm.auditing;
|
package org.libreccm.auditing;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Expectation thrown when an query for revision etc fails.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public class AuditQueryException extends RuntimeException {
|
public class AuditQueryException extends RuntimeException {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,8 @@ import javax.persistence.EntityManager;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Exporter/Importer for {@link Categorization} entities.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonIdentityReference;
|
import com.fasterxml.jackson.annotation.JsonIdentityReference;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||||
import org.hibernate.validator.constraints.NotBlank;
|
|
||||||
import org.libreccm.core.CcmObject;
|
import org.libreccm.core.CcmObject;
|
||||||
import org.libreccm.l10n.LocalizedString;
|
import org.libreccm.l10n.LocalizedString;
|
||||||
import org.libreccm.security.RecursivePermissions;
|
import org.libreccm.security.RecursivePermissions;
|
||||||
|
|
@ -58,6 +57,7 @@ import javax.persistence.NamedQuery;
|
||||||
import javax.persistence.OneToMany;
|
import javax.persistence.OneToMany;
|
||||||
import javax.persistence.OrderBy;
|
import javax.persistence.OrderBy;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The category entity represents a single category. Each category is part of a
|
* The category entity represents a single category. Each category is part of a
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ import java.io.Serializable;
|
||||||
* @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 3/23/17
|
* @version created on 3/23/17
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
public class CategoryIdResolver implements Serializable, ObjectIdResolver {
|
public class CategoryIdResolver implements Serializable, ObjectIdResolver {
|
||||||
private static final long serialVersionUID = -5750627754502675522L;
|
private static final long serialVersionUID = -5750627754502675522L;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,8 @@ import javax.inject.Inject;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Exporter/Importer for {@link Category} entities.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ import java.util.Optional;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides CRUB operations for {@link Category} objects.
|
* Provides CRUD operations for {@link Category} objects.
|
||||||
*
|
*
|
||||||
* Note: This repository class does no permission checks when retrieving
|
* Note: This repository class does no permission checks when retrieving
|
||||||
* categories. This is the responsibility of the application which uses the
|
* categories. This is the responsibility of the application which uses the
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
*/
|
*/
|
||||||
package org.libreccm.categorization;
|
package org.libreccm.categorization;
|
||||||
|
|
||||||
|
import org.hibernate.LazyInitializationException;
|
||||||
import org.libreccm.l10n.GlobalizationHelper;
|
import org.libreccm.l10n.GlobalizationHelper;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -29,7 +30,10 @@ import javax.inject.Inject;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* CDI bean used as interface between Bebop ({@link CategoryTreeModelLite}) and
|
||||||
|
* CDI. The CDI beans primarly takes are care of transactions and avoids
|
||||||
|
* {@link LazyInitializationException}.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonIdentityReference;
|
import com.fasterxml.jackson.annotation.JsonIdentityReference;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||||
import org.hibernate.validator.constraints.NotBlank;
|
|
||||||
import org.hibernate.validator.constraints.URL;
|
import org.hibernate.validator.constraints.URL;
|
||||||
import org.libreccm.core.CcmObject;
|
import org.libreccm.core.CcmObject;
|
||||||
import org.libreccm.l10n.LocalizedString;
|
import org.libreccm.l10n.LocalizedString;
|
||||||
|
|
@ -65,6 +65,7 @@ import javax.persistence.OneToMany;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A domain is collection of categories designed a specific purpose. This entity
|
* A domain is collection of categories designed a specific purpose. This entity
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ import java.io.Serializable;
|
||||||
* @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 8/2/17
|
* @version created the 8/2/17
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
public class DomainIdResolver implements Serializable, ObjectIdResolver {
|
public class DomainIdResolver implements Serializable, ObjectIdResolver {
|
||||||
private static final long serialVersionUID = -8504371142795445708L;
|
private static final long serialVersionUID = -8504371142795445708L;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@ import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Exporter/Importer for {@link Domain} entities.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@ import javax.persistence.EntityManager;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Exporter/Importer for {@link DomainOwnership} entities.
|
||||||
|
*
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,10 @@
|
||||||
package org.libreccm.categorization;
|
package org.libreccm.categorization;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Thrown by {@link CategoryRepository#findByPath(java.lang.String)} and
|
||||||
|
* {@link CategoryRepository#findByPath(org.libreccm.categorization.Domain, java.lang.String)}
|
||||||
|
* if the provided category path is invalid.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public class InvalidCategoryPathException extends RuntimeException {
|
public class InvalidCategoryPathException extends RuntimeException {
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
* MA 02110-1301 USA
|
* MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* This package provides the category system used by CCM.
|
||||||
|
*/
|
||||||
@XmlSchema(xmlns = {@XmlNs(prefix = "cat", namespaceURI = CAT_XML_NS)})
|
@XmlSchema(xmlns = {@XmlNs(prefix = "cat", namespaceURI = CAT_XML_NS)})
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
@XmlAccessorType(XmlAccessType.NONE)
|
||||||
package org.libreccm.categorization;
|
package org.libreccm.categorization;
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Utility class providing access the CDI beans in classes not eligible for
|
||||||
|
* injection.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
|
@ -40,21 +42,41 @@ public class CdiUtil {
|
||||||
|
|
||||||
private final BeanManager beanManager;
|
private final BeanManager beanManager;
|
||||||
|
|
||||||
private CdiUtil(final BeanManager beanManager) {
|
private CdiUtil(final BeanManager beanManager) {
|
||||||
this.beanManager = beanManager;
|
this.beanManager = beanManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a new instance of {@code CdiUtil}.
|
||||||
|
*
|
||||||
|
* This factory method looks up the {@link BeanManager} using JNDI and
|
||||||
|
* passes the {@link BeanManager} to the constructor of {@code CdiUtil}.
|
||||||
|
*
|
||||||
|
* @return A new instance of {@code CdiUtil}.
|
||||||
|
*/
|
||||||
public static CdiUtil createCdiUtil() {
|
public static CdiUtil createCdiUtil() {
|
||||||
try {
|
try {
|
||||||
final InitialContext context = new InitialContext();
|
final InitialContext context = new InitialContext();
|
||||||
final BeanManager beanManager = (BeanManager) context.lookup(
|
final BeanManager beanManager = (BeanManager) context.lookup(
|
||||||
"java:comp/BeanManager");
|
"java:comp/BeanManager"
|
||||||
|
);
|
||||||
return new CdiUtil(beanManager);
|
return new CdiUtil(beanManager);
|
||||||
} catch(NamingException ex) {
|
} catch (NamingException ex) {
|
||||||
throw new IllegalStateException("Unable to lookup BeanManager.", ex);
|
throw new IllegalStateException("Unable to lookup BeanManager.", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get an instance of the CDI bean of the provided class.
|
||||||
|
*
|
||||||
|
* @param <T> Type of the CDI bean.
|
||||||
|
* @param beanType The type of the bean to retrieve.
|
||||||
|
*
|
||||||
|
* @return An instance of {@code beanType}.
|
||||||
|
*
|
||||||
|
* @throws IllegalStateException if no CDI bean of the type {@code beanType}
|
||||||
|
* is available.
|
||||||
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public <T> T findBean(final Class<T> beanType) {
|
public <T> T findBean(final Class<T> beanType) {
|
||||||
final Set<Bean<?>> beans = beanManager.getBeans(beanType);
|
final Set<Bean<?>> beans = beanManager.getBeans(beanType);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Utilities for working with CDI.
|
||||||
|
*/
|
||||||
|
package org.libreccm.cdi.utils;
|
||||||
|
|
@ -19,7 +19,8 @@
|
||||||
package org.libreccm.core.api;
|
package org.libreccm.core.api;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Constants for the RESTful API endpoints provided by ccm-core
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public final class ApiConstants {
|
public final class ApiConstants {
|
||||||
|
|
@ -28,7 +29,13 @@ public final class ApiConstants {
|
||||||
// Nothing
|
// Nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prefix for an ID identifier.
|
||||||
|
*/
|
||||||
public static final String IDENTIFIER_PREFIX_ID = "ID-";
|
public static final String IDENTIFIER_PREFIX_ID = "ID-";
|
||||||
|
/**
|
||||||
|
* Prefix for an UUID identifier
|
||||||
|
*/
|
||||||
public static final String IDENTIFIER_PREFIX_UUID = "UUID-";
|
public static final String IDENTIFIER_PREFIX_UUID = "UUID-";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@ import javax.ws.rs.ApplicationPath;
|
||||||
import javax.ws.rs.core.Application;
|
import javax.ws.rs.core.Application;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* JAX-RS application for ccm-core.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@ApplicationPath("/api/ccm-core")
|
@ApplicationPath("/api/ccm-core")
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,10 @@
|
||||||
package org.libreccm.core.api;
|
package org.libreccm.core.api;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Helper class containing the parts of an extracted identifier.
|
||||||
|
*
|
||||||
|
* @see IdentifierExtractor
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public class ExtractedIdentifier {
|
public class ExtractedIdentifier {
|
||||||
|
|
@ -35,10 +38,20 @@ public class ExtractedIdentifier {
|
||||||
this.identifier = identifier;
|
this.identifier = identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identifier type.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public IdentifierType getType() {
|
public IdentifierType getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identifier itself.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public String getIdentifier() {
|
public String getIdentifier() {
|
||||||
return identifier;
|
return identifier;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,12 +23,27 @@ import java.util.Objects;
|
||||||
import javax.enterprise.context.Dependent;
|
import javax.enterprise.context.Dependent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Extracts the identifier for an entity from a parameter.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Dependent
|
@Dependent
|
||||||
public class IdentifierExtractor {
|
public class IdentifierExtractor {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extracts the identifier for an entity from a parameter.
|
||||||
|
*
|
||||||
|
* If the parameter starts with {@link ApiConstants#IDENTIFIER_PREFIX_ID}
|
||||||
|
* the identifier is assume to be an ID.
|
||||||
|
*
|
||||||
|
* If the parameter starts with {@link ApiConstants#IDENTIFIER_PREFIX_UUID}
|
||||||
|
* the identifier is assume to be an UUID.
|
||||||
|
*
|
||||||
|
* Otherwise the identifier is some property of an entity.
|
||||||
|
*
|
||||||
|
* @param identifierParam
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public ExtractedIdentifier extractIdentifier(final String identifierParam) {
|
public ExtractedIdentifier extractIdentifier(final String identifierParam) {
|
||||||
Objects.requireNonNull(identifierParam, "identifier param is null.");
|
Objects.requireNonNull(identifierParam, "identifier param is null.");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@
|
||||||
package org.libreccm.core.api;
|
package org.libreccm.core.api;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Enum for the supported types of identifiers.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public enum IdentifierType {
|
public enum IdentifierType {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,9 @@ import javax.json.JsonArrayBuilder;
|
||||||
import javax.json.JsonValue;
|
import javax.json.JsonValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* A {@link Collector} implementation that collects {@link JsonValue}s to
|
||||||
|
* a {@link JsonArray}.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public class JsonArrayCollector implements Collector<JsonValue, JsonArrayBuilder, JsonArray>{
|
public class JsonArrayCollector implements Collector<JsonValue, JsonArrayBuilder, JsonArray>{
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Common classes for the RESTful API endpoints provided by ccm-core
|
||||||
|
*/
|
||||||
|
package org.libreccm.core.api;
|
||||||
|
|
@ -22,7 +22,8 @@ import org.libreccm.configuration.Configuration;
|
||||||
import org.libreccm.configuration.Setting;
|
import org.libreccm.configuration.Setting;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Configuration for the CCM files system.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Configuration(descBundle
|
@Configuration(descBundle
|
||||||
|
|
|
||||||
|
|
@ -30,20 +30,10 @@ public class FileAccessException extends Exception {
|
||||||
|
|
||||||
private static final String MESSAGE_TEMPLATE = "Error accessing file '%s'.";
|
private static final String MESSAGE_TEMPLATE = "Error accessing file '%s'.";
|
||||||
|
|
||||||
// /**
|
|
||||||
// * Creates a new instance of <code>FileAccessException</code> without detail
|
|
||||||
// * message.
|
|
||||||
// */
|
|
||||||
// FileAccessException() {
|
|
||||||
// super();
|
|
||||||
// }
|
|
||||||
FileAccessException(final String path) {
|
FileAccessException(final String path) {
|
||||||
super(String.format(MESSAGE_TEMPLATE, path));
|
super(String.format(MESSAGE_TEMPLATE, path));
|
||||||
}
|
}
|
||||||
|
|
||||||
// FileAccessException(final Exception ex) {
|
|
||||||
// super(ex);
|
|
||||||
// }
|
|
||||||
FileAccessException(final String path, final Exception ex) {
|
FileAccessException(final String path, final Exception ex) {
|
||||||
super(String.format(MESSAGE_TEMPLATE, path), ex);
|
super(String.format(MESSAGE_TEMPLATE, path), ex);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,24 +29,11 @@ public class FileAlreadyExistsException extends Exception {
|
||||||
private static final long serialVersionUID = 2237027823060973043L;
|
private static final long serialVersionUID = 2237027823060973043L;
|
||||||
|
|
||||||
private static final String MESSAGE_TEMPLATE = "The file '%s' already exists.";
|
private static final String MESSAGE_TEMPLATE = "The file '%s' already exists.";
|
||||||
|
|
||||||
// /**
|
|
||||||
// * Creates a new instance of <code>FileAlreadyExistsException</code> without
|
|
||||||
// * detail message.
|
|
||||||
// */
|
|
||||||
// FileAlreadyExistsException() {
|
|
||||||
// super();
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
FileAlreadyExistsException(final String path) {
|
FileAlreadyExistsException(final String path) {
|
||||||
super(String.format(MESSAGE_TEMPLATE, path));
|
super(String.format(MESSAGE_TEMPLATE, path));
|
||||||
}
|
}
|
||||||
|
|
||||||
// FileAlreadyExistsException(final Exception ex) {
|
|
||||||
// super(ex);
|
|
||||||
// }
|
|
||||||
|
|
||||||
FileAlreadyExistsException(final String path, final Exception ex) {
|
FileAlreadyExistsException(final String path, final Exception ex) {
|
||||||
super(String.format(MESSAGE_TEMPLATE, path), ex);
|
super(String.format(MESSAGE_TEMPLATE, path), ex);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,25 +27,16 @@ package org.libreccm.files;
|
||||||
public class FileDoesNotExistException extends Exception {
|
public class FileDoesNotExistException extends Exception {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private static final String MESSAGE_TEMPLATE = "The file '%s' does not exist.";
|
|
||||||
|
|
||||||
// /**
|
private static final String MESSAGE_TEMPLATE
|
||||||
// * Creates a new instance of <code>FileDoesNotExistException</code> without
|
= "The file '%s' does not exist.";
|
||||||
// * detail message.
|
|
||||||
// */
|
|
||||||
// FileDoesNotExistException() {
|
|
||||||
// }
|
|
||||||
|
|
||||||
FileDoesNotExistException(final String path) {
|
FileDoesNotExistException(final String path) {
|
||||||
super(String.format(MESSAGE_TEMPLATE, path));
|
super(String.format(MESSAGE_TEMPLATE, path));
|
||||||
}
|
}
|
||||||
|
|
||||||
// FileDoesNotExistException(final Exception ex) {
|
|
||||||
// super(ex);
|
|
||||||
// }
|
|
||||||
|
|
||||||
FileDoesNotExistException(final String path, final Exception ex) {
|
FileDoesNotExistException(final String path, final Exception ex) {
|
||||||
super(String.format(MESSAGE_TEMPLATE, path), ex);
|
super(String.format(MESSAGE_TEMPLATE, path), ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,12 @@ import java.io.Reader;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Interface for a file system adapter. Implement this interface to add support
|
||||||
|
* for a method for storing (large} files. The implementation must be a CDI
|
||||||
|
* bean. It is recommanded that the bean is {@link RequestScoped}.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
|
@ -136,15 +141,15 @@ public interface FileSystemAdapter {
|
||||||
InsufficientPermissionsException;
|
InsufficientPermissionsException;
|
||||||
|
|
||||||
String getMimeType(String path) throws FileAccessException;
|
String getMimeType(String path) throws FileAccessException;
|
||||||
|
|
||||||
long getSize(String path) throws FileAccessException;
|
long getSize(String path) throws FileAccessException;
|
||||||
|
|
||||||
void copy(String sourcePath,
|
void copy(String sourcePath,
|
||||||
String targetPath,
|
String targetPath,
|
||||||
boolean recursive) throws FileAccessException;
|
boolean recursive) throws FileAccessException;
|
||||||
|
|
||||||
void move(String sourcePath, String targetPath) throws FileAccessException;
|
void move(String sourcePath, String targetPath) throws FileAccessException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* checks if the provided path points to a directory.
|
* checks if the provided path points to a directory.
|
||||||
*
|
*
|
||||||
|
|
@ -243,8 +248,7 @@ public interface FileSystemAdapter {
|
||||||
* @throws FileDoesNotExistException If the requested file does not
|
* @throws FileDoesNotExistException If the requested file does not
|
||||||
* exist.
|
* exist.
|
||||||
* @throws DirectoryNotEmptyException If the directory is not empty
|
* @throws DirectoryNotEmptyException If the directory is not empty
|
||||||
* <em>and</em> {@code recursively}
|
* <em>and</em> {@code recursively} is set to {@code false}.
|
||||||
* is set to {@code false}.
|
|
||||||
* @throws InsufficientPermissionsException If the user which runs the
|
* @throws InsufficientPermissionsException If the user which runs the
|
||||||
* application server does not have
|
* application server does not have
|
||||||
* the permission to access the
|
* the permission to access the
|
||||||
|
|
|
||||||
|
|
@ -29,24 +29,11 @@ public class NoDirectoryException extends Exception {
|
||||||
private static final long serialVersionUID = -5811387600385322767L;
|
private static final long serialVersionUID = -5811387600385322767L;
|
||||||
|
|
||||||
private static final String MESSAGE_TEMPLATE = "The file '%s' is not a directory.";
|
private static final String MESSAGE_TEMPLATE = "The file '%s' is not a directory.";
|
||||||
|
|
||||||
// /**
|
|
||||||
// * Creates a new instance of <code>NoDirectoryException</code> without
|
|
||||||
// * detail message.
|
|
||||||
// */
|
|
||||||
// NoDirectoryException() {
|
|
||||||
// super();
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
NoDirectoryException(final String path) {
|
NoDirectoryException(final String path) {
|
||||||
super(String.format(MESSAGE_TEMPLATE, path));
|
super(String.format(MESSAGE_TEMPLATE, path));
|
||||||
}
|
}
|
||||||
|
|
||||||
// NoDirectoryException(final Exception ex) {
|
|
||||||
// super(ex);
|
|
||||||
// }
|
|
||||||
|
|
||||||
NoDirectoryException(final String path, final Exception ex) {
|
NoDirectoryException(final String path, final Exception ex) {
|
||||||
super(String.format(MESSAGE_TEMPLATE, path), ex);
|
super(String.format(MESSAGE_TEMPLATE, path), ex);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* This package provides an API for managing (large) files in different sources.
|
||||||
|
*
|
||||||
|
* For details please refer to the documentation of the classes. The main entry
|
||||||
|
* point is {@link CcmFiles}.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.libreccm.files;
|
||||||
|
|
@ -21,7 +21,6 @@ package org.libreccm.formbuilder;
|
||||||
import org.libreccm.core.CcmObject;
|
import org.libreccm.core.CcmObject;
|
||||||
import org.libreccm.l10n.LocalizedString;
|
import org.libreccm.l10n.LocalizedString;
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -29,6 +28,16 @@ import java.util.Objects;
|
||||||
|
|
||||||
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
|
|
||||||
|
import javax.persistence.AssociationOverride;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Embedded;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.JoinTable;
|
||||||
|
import javax.persistence.ManyToOne;
|
||||||
|
import javax.persistence.OneToMany;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Entities for the form builder migrated from PDL. Not tested yet.
|
||||||
|
*/
|
||||||
|
package org.libreccm.formbuilder.actions;
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Base entities for the form builder. Migrated from PDL, not tested yet.
|
||||||
|
*/
|
||||||
|
package org.libreccm.formbuilder;
|
||||||
|
|
@ -19,7 +19,9 @@
|
||||||
package org.libreccm.imexport;
|
package org.libreccm.imexport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Thrown by the {@link AbstractEntityImExporter} if the something is wrong
|
||||||
|
* with the dependencies between entity types (eg circular dependencies).
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public class DependencyException extends Exception {
|
public class DependencyException extends Exception {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@ import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* A node in the dependency tree managed by {@link EntityImExporterTreeManager}.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
final class EntityImExporterTreeNode {
|
final class EntityImExporterTreeNode {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@
|
||||||
package org.libreccm.imexport;
|
package org.libreccm.imexport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Thrown if something goes wrong during an export.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public class ExportException extends Exception {
|
public class ExportException extends Exception {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@
|
||||||
package org.libreccm.imexport;
|
package org.libreccm.imexport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Thrown if something goes wrong during an import process.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public class ImportExpection extends Exception {
|
public class ImportExpection extends Exception {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@ import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Java class containg the properties of an parsed import manifest.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public class ImportManifest {
|
public class ImportManifest {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* The classes in this package provide a facility from exporting and importing
|
||||||
|
* entities to and from CCM installation.
|
||||||
|
*/
|
||||||
|
package org.libreccm.imexport;
|
||||||
|
|
@ -27,7 +27,8 @@ import javax.inject.Inject;
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* CDI producer for the {@link AuditReader} of Hibernate Envers.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@ApplicationScoped
|
@ApplicationScoped
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,9 @@ import javax.persistence.EntityManager;
|
||||||
import javax.persistence.PersistenceContext;
|
import javax.persistence.PersistenceContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* CDI producer providing access to the JPA {@link EntityManager} using
|
||||||
|
* {@code @Inject}.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@ApplicationScoped
|
@ApplicationScoped
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* General classes for JPA
|
||||||
|
*/
|
||||||
|
package org.libreccm.jpa;
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Utility classes for JPA.
|
||||||
|
*/
|
||||||
|
package org.libreccm.jpa.utils;
|
||||||
|
|
@ -43,6 +43,11 @@ import java.util.concurrent.Callable;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* This CDI bean provides most functions for localization in CCM.
|
||||||
|
*
|
||||||
|
* In addition to providing the negoiated locale is also provides some utility
|
||||||
|
* methods for working with {@link LocalizedString}.
|
||||||
|
*
|
||||||
* Provides the locale which has been selected based on the available languages
|
* Provides the locale which has been selected based on the available languages
|
||||||
* configured in the {@link KernelConfig}, the preferred languages of the client
|
* configured in the {@link KernelConfig}, the preferred languages of the client
|
||||||
* provided an the request, the (optional) {@code lang} attribute in the current
|
* provided an the request, the (optional) {@code lang} attribute in the current
|
||||||
|
|
@ -95,8 +100,8 @@ public class GlobalizationHelper implements Serializable {
|
||||||
*
|
*
|
||||||
* First tries to get a value for the negotiated locale. If the
|
* First tries to get a value for the negotiated locale. If the
|
||||||
* {@code localizedString} does not have a value for the negotiated locale
|
* {@code localizedString} does not have a value for the negotiated locale
|
||||||
* the default locale set in {@link KernelConfig} is used. If that also
|
* the default locale set in {@link KernelConfig} is used. If that also failes
|
||||||
* values the first value available locale (ordered alphabetically) is used.
|
* the first value available locale (ordered alphabetically) is used.
|
||||||
*
|
*
|
||||||
* @param localizedString
|
* @param localizedString
|
||||||
*
|
*
|
||||||
|
|
@ -136,6 +141,16 @@ public class GlobalizationHelper implements Serializable {
|
||||||
.getValue();
|
.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the value of a {@link LocalizedString} for the current locale.
|
||||||
|
* This variant allows it to provide a method which provides a fallback
|
||||||
|
* which is used when the localized string has no value for the current
|
||||||
|
* locale and the default locale.
|
||||||
|
*
|
||||||
|
* @param localizedString
|
||||||
|
* @param fallbackProvider
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public String getValueFromLocalizedString(
|
public String getValueFromLocalizedString(
|
||||||
final LocalizedString localizedString,
|
final LocalizedString localizedString,
|
||||||
final Callable<String> fallbackProvider) {
|
final Callable<String> fallbackProvider) {
|
||||||
|
|
@ -159,6 +174,11 @@ public class GlobalizationHelper implements Serializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the negotiated locale.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public Locale getNegotiatedLocale() {
|
public Locale getNegotiatedLocale() {
|
||||||
|
|
||||||
final KernelConfig kernelConfig = confManager.findConfiguration(
|
final KernelConfig kernelConfig = confManager.findConfiguration(
|
||||||
|
|
@ -186,6 +206,11 @@ public class GlobalizationHelper implements Serializable {
|
||||||
return preferred;
|
return preferred;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the locale selected by the user agent.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public Locale getSelectedLocale() {
|
public Locale getSelectedLocale() {
|
||||||
// Get the current session, create one if there is none
|
// Get the current session, create one if there is none
|
||||||
final HttpSession session = request.getSession(true);
|
final HttpSession session = request.getSession(true);
|
||||||
|
|
@ -215,6 +240,11 @@ public class GlobalizationHelper implements Serializable {
|
||||||
return selected;
|
return selected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lists all available locales.
|
||||||
|
*
|
||||||
|
* @return All locales configured in the {@link KernelConfig}.
|
||||||
|
*/
|
||||||
public List<Locale> getAvailableLocales() {
|
public List<Locale> getAvailableLocales() {
|
||||||
|
|
||||||
final KernelConfig kernelConfig = confManager
|
final KernelConfig kernelConfig = confManager
|
||||||
|
|
@ -230,6 +260,11 @@ public class GlobalizationHelper implements Serializable {
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the selected locale.
|
||||||
|
*
|
||||||
|
* @param locale
|
||||||
|
*/
|
||||||
public void setSelectedLocale(final Locale locale) {
|
public void setSelectedLocale(final Locale locale) {
|
||||||
|
|
||||||
final HttpSession session = request.getSession(true);
|
final HttpSession session = request.getSession(true);
|
||||||
|
|
@ -310,6 +345,11 @@ public class GlobalizationHelper implements Serializable {
|
||||||
return new GlobalizedMessagesUtil(bundleName);
|
return new GlobalizedMessagesUtil(bundleName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function for converting a string to a locale.
|
||||||
|
* @param language
|
||||||
|
* @return The locale, or null if the string is not a locale.
|
||||||
|
*/
|
||||||
private Locale scanLocale(final String language) {
|
private Locale scanLocale(final String language) {
|
||||||
if (language == null || language.isEmpty()) {
|
if (language == null || language.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@
|
||||||
package org.libreccm.l10n;
|
package org.libreccm.l10n;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Constants for the classes in the {@link org.libreccm.l10n} package.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public final class L10NConstants {
|
public final class L10NConstants {
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ package org.libreccm.l10n.jaxb;
|
||||||
|
|
||||||
import static org.libreccm.l10n.L10NConstants.*;
|
import static org.libreccm.l10n.L10NConstants.*;
|
||||||
|
|
||||||
|
import org.libreccm.l10n.LocalizedString;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
@ -29,7 +31,8 @@ import javax.xml.bind.annotation.XmlAttribute;
|
||||||
import javax.xml.bind.annotation.XmlValue;
|
import javax.xml.bind.annotation.XmlValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Simple bean class for the value of a {@link LocalizedString} used by JAXB.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ package org.libreccm.l10n.jaxb;
|
||||||
import static org.libreccm.l10n.L10NConstants.*;
|
import static org.libreccm.l10n.L10NConstants.*;
|
||||||
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||||
|
import org.libreccm.l10n.LocalizedString;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -32,7 +33,8 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Simple bean class for the values of a {@link LocalizedString} used by JAXB.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Utility classes for processing {@link LocalizedString} with JAXB.
|
||||||
|
*/
|
||||||
|
package org.libreccm.l10n.jaxb;
|
||||||
|
|
@ -16,6 +16,9 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
* MA 02110-1301 USA
|
* MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* This package provides several classes for localizing texts.
|
||||||
|
*/
|
||||||
@XmlSchema(xmlns = {@XmlNs(prefix = "l10n", namespaceURI = L10N_XML_NS)})
|
@XmlSchema(xmlns = {@XmlNs(prefix = "l10n", namespaceURI = L10N_XML_NS)})
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
@XmlAccessorType(XmlAccessType.NONE)
|
||||||
package org.libreccm.l10n;
|
package org.libreccm.l10n;
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,24 @@ package org.libreccm.messaging;
|
||||||
import org.libreccm.jpa.utils.MimeTypeConverter;
|
import org.libreccm.jpa.utils.MimeTypeConverter;
|
||||||
|
|
||||||
import javax.activation.MimeType;
|
import javax.activation.MimeType;
|
||||||
import javax.persistence.*;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Convert;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.Lob;
|
||||||
|
import javax.persistence.ManyToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import org.libreccm.jpa.utils.MimeTypeConverter;
|
||||||
import org.libreccm.security.User;
|
import org.libreccm.security.User;
|
||||||
|
|
||||||
import javax.activation.MimeType;
|
import javax.activation.MimeType;
|
||||||
import javax.persistence.*;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -32,6 +32,18 @@ import java.util.Objects;
|
||||||
|
|
||||||
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Convert;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.ManyToOne;
|
||||||
|
import javax.persistence.OneToMany;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.OrderBy;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Entities for messaging. Ported from PDL, old classes had no documentation.
|
||||||
|
* These might be removed.
|
||||||
|
*/
|
||||||
|
package org.libreccm.messaging;
|
||||||
|
|
@ -18,12 +18,18 @@
|
||||||
*/
|
*/
|
||||||
package org.libreccm.modules;
|
package org.libreccm.modules;
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.EnumType;
|
||||||
|
import javax.persistence.Enumerated;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A JPA entity bean for for installed modules table for use in the LibreCCM
|
* A JPA entity bean for for installed modules table for use in the LibreCCM
|
||||||
* administration UI.
|
* administration UI.
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,20 @@ package org.libreccm.notification;
|
||||||
import org.libreccm.core.CcmObject;
|
import org.libreccm.core.CcmObject;
|
||||||
import org.libreccm.security.Party;
|
import org.libreccm.security.Party;
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Models the envelope information associated with a digest.
|
* Models the envelope information associated with a digest.
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,20 @@ import org.libreccm.core.CcmObject;
|
||||||
import org.libreccm.messaging.Message;
|
import org.libreccm.messaging.Message;
|
||||||
import org.libreccm.security.Party;
|
import org.libreccm.security.Party;
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* The {@code Notification} class is used to create and send messages via email
|
* The {@code Notification} class is used to create and send messages via email
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,20 @@ package org.libreccm.notification;
|
||||||
import org.libreccm.messaging.Message;
|
import org.libreccm.messaging.Message;
|
||||||
import org.libreccm.security.Party;
|
import org.libreccm.security.Party;
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a notification that has been transferred to the outbound message
|
* Represents a notification that has been transferred to the outbound message
|
||||||
* queue. During processing, this class is used to retrieve information
|
* queue. During processing, this class is used to retrieve information
|
||||||
|
|
@ -202,13 +210,13 @@ public class QueueItem implements Serializable {
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("%s{ "
|
return String.format("%s{ "
|
||||||
+ "queueItemId = %d, "
|
+ "queueItemId = %d, "
|
||||||
+ "receiver = %s, "
|
+ "receiver = %s, "
|
||||||
+ "retryCount = %d, "
|
+ "retryCount = %d, "
|
||||||
+ "successful = %b, "
|
+ "successful = %b, "
|
||||||
+ "receiverAddress = \"%s\", "
|
+ "receiverAddress = \"%s\", "
|
||||||
+ "message = %s"
|
+ "message = %s"
|
||||||
+ " }",
|
+ " }",
|
||||||
super.toString(),
|
super.toString(),
|
||||||
queueItemId,
|
queueItemId,
|
||||||
Objects.toString(receiver),
|
Objects.toString(receiver),
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Entites for the notificiation system of CCM. Ported from CCM
|
||||||
|
* ToDo: Check if these entities are still of use. If no remove them
|
||||||
|
*/
|
||||||
|
package org.libreccm.notification;
|
||||||
|
|
@ -20,12 +20,17 @@ package org.libreccm.portal;
|
||||||
|
|
||||||
import org.libreccm.core.Resource;
|
import org.libreccm.core.Resource;
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.ManyToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Entities for building portals. Ported from PDL.
|
||||||
|
*
|
||||||
|
* ToDo: Check if these entities are still useful. If not remove them.
|
||||||
|
*/
|
||||||
|
package org.libreccm.portal;
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
package org.libreccm.runtime;
|
package org.libreccm.runtime;
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
@ -27,6 +27,17 @@ import java.util.Objects;
|
||||||
|
|
||||||
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.ManyToOne;
|
||||||
|
import javax.persistence.OneToMany;
|
||||||
|
import javax.persistence.OrderBy;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,24 @@ package org.libreccm.search.lucene;
|
||||||
|
|
||||||
import org.libreccm.security.User;
|
import org.libreccm.security.User;
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.Lob;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
|
|
||||||
|
|
@ -20,12 +20,20 @@ package org.libreccm.search.lucene;
|
||||||
|
|
||||||
import org.libreccm.web.Host;
|
import org.libreccm.web.Host;
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Entities ported from the old CCM search system.
|
||||||
|
*
|
||||||
|
* ToDo: Check if still useful. Refactor or remove if necssary.
|
||||||
|
*/
|
||||||
|
package org.libreccm.search.lucene;
|
||||||
|
|
@ -25,7 +25,8 @@ import javax.ws.rs.ApplicationPath;
|
||||||
import javax.ws.rs.core.Application;
|
import javax.ws.rs.core.Application;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* JAX-RS application for authenticating via JSON Web Token
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@ApplicationPath("/jwt")
|
@ApplicationPath("/jwt")
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@
|
||||||
package org.libreccm.security;
|
package org.libreccm.security;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Thrown if a challenge for user activation or password reset fails.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public class ChallengeFailedException extends Exception {
|
public class ChallengeFailedException extends Exception {
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ import com.arsdigita.mail.Mail;
|
||||||
import com.arsdigita.ui.login.LoginConstants;
|
import com.arsdigita.ui.login.LoginConstants;
|
||||||
import com.arsdigita.web.ParameterMap;
|
import com.arsdigita.web.ParameterMap;
|
||||||
import com.arsdigita.web.URL;
|
import com.arsdigita.web.URL;
|
||||||
|
|
||||||
import org.apache.commons.lang.text.StrSubstitutor;
|
import org.apache.commons.lang.text.StrSubstitutor;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
@ -32,11 +33,16 @@ import org.libreccm.core.CoreConstants;
|
||||||
import org.libreccm.l10n.GlobalizationHelper;
|
import org.libreccm.l10n.GlobalizationHelper;
|
||||||
import org.libreccm.l10n.LocalizedString;
|
import org.libreccm.l10n.LocalizedString;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.mail.MessagingException;
|
import javax.mail.MessagingException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import static com.arsdigita.ui.login.LoginServlet.*;
|
import static com.arsdigita.ui.login.LoginServlet.*;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,8 @@ import javax.persistence.EntityManager;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Exporter/Importer for {@link Group}s.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||||
import org.libreccm.imexport.Exportable;
|
import org.libreccm.imexport.Exportable;
|
||||||
|
|
||||||
import javax.json.Json;
|
import javax.json.Json;
|
||||||
import javax.json.JsonObject;
|
|
||||||
import javax.json.JsonObjectBuilder;
|
import javax.json.JsonObjectBuilder;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,15 @@ import javax.persistence.EntityManager;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Exporter/Importer for {@link GroupMembership} entities.
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Processes(GroupMembership.class)
|
@Processes(GroupMembership.class)
|
||||||
public class GroupMembershipImExporter extends AbstractEntityImExporter<GroupMembership> {
|
public class GroupMembershipImExporter
|
||||||
|
extends AbstractEntityImExporter<GroupMembership> {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private EntityManager entityManager;
|
private EntityManager entityManager;
|
||||||
|
|
||||||
|
|
@ -44,14 +47,14 @@ public class GroupMembershipImExporter extends AbstractEntityImExporter<GroupMem
|
||||||
|
|
||||||
return GroupMembership.class;
|
return GroupMembership.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Set<Class<? extends Exportable>> getRequiredEntities() {
|
protected Set<Class<? extends Exportable>> getRequiredEntities() {
|
||||||
|
|
||||||
final Set<Class<? extends Exportable>> entities = new HashSet<>();
|
final Set<Class<? extends Exportable>> entities = new HashSet<>();
|
||||||
entities.add(User.class);
|
entities.add(User.class);
|
||||||
entities.add(Group.class);
|
entities.add(Group.class);
|
||||||
|
|
||||||
return entities;
|
return entities;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ import javax.transaction.Transactional;
|
||||||
import javax.ws.rs.POST;
|
import javax.ws.rs.POST;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* JAX-RS endpoint for generating JSON Web Tokens for authenticiation.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
|
@ -62,6 +63,16 @@ public class JwtProvider {
|
||||||
@Inject
|
@Inject
|
||||||
private Shiro shiro;
|
private Shiro shiro;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a new JSON Web Token
|
||||||
|
*
|
||||||
|
* @param requestCredentials Credentials for authentication as JSON object
|
||||||
|
* with the properties {@code username} and
|
||||||
|
* {@code password}.
|
||||||
|
*
|
||||||
|
* @return A response with the JSON Web Token for a Forbidden response if
|
||||||
|
* the credentials are incorrect.
|
||||||
|
*/
|
||||||
@POST
|
@POST
|
||||||
@Path("/")
|
@Path("/")
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
|
@ -74,7 +85,6 @@ public class JwtProvider {
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
final JsonObjectBuilder jsonObjBuilder = Json.createObjectBuilder();
|
|
||||||
final StringReader credentialsReader = new StringReader(
|
final StringReader credentialsReader = new StringReader(
|
||||||
requestCredentials);
|
requestCredentials);
|
||||||
final JsonReader jsonReader = Json.createReader(credentialsReader);
|
final JsonReader jsonReader = Json.createReader(credentialsReader);
|
||||||
|
|
@ -139,6 +149,12 @@ public class JwtProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method for generating a secret for the JSON Web Tokens.
|
||||||
|
*
|
||||||
|
* Only called if no secret if found in the {@link KernelConfig}. The secret
|
||||||
|
* is stored in the {@link KernelConfig}.
|
||||||
|
*/
|
||||||
private void generateSecret() {
|
private void generateSecret() {
|
||||||
final Random random = new SecureRandom();
|
final Random random = new SecureRandom();
|
||||||
final byte[] randomBytes = new byte[64];
|
final byte[] randomBytes = new byte[64];
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Shiro filter using JSON Web Tokens for authenticiation.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public class JwtVerifyingFilter extends AccessControlFilter {
|
public class JwtVerifyingFilter extends AccessControlFilter {
|
||||||
|
|
@ -62,8 +63,9 @@ public class JwtVerifyingFilter extends AccessControlFilter {
|
||||||
|
|
||||||
final String jwtClaims = jwt.substring(jwt.indexOf((" ")));
|
final String jwtClaims = jwt.substring(jwt.indexOf((" ")));
|
||||||
final Claims claims = Jwts
|
final Claims claims = Jwts
|
||||||
.parser()
|
.parserBuilder()
|
||||||
.setSigningKey(key)
|
.setSigningKey(key)
|
||||||
|
.build()
|
||||||
.parseClaimsJws(jwtClaims)
|
.parseClaimsJws(jwtClaims)
|
||||||
.getBody();
|
.getBody();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,27 @@
|
||||||
*/
|
*/
|
||||||
package org.libreccm.security;
|
package org.libreccm.security;
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.EnumType;
|
||||||
|
import javax.persistence.Enumerated;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.NamedQueries;
|
||||||
|
import javax.persistence.NamedQuery;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@code OneTimeAuthToken} is used as a one time authentication mechanism
|
* The {@code OneTimeAuthToken} is used as a one time authentication mechanism
|
||||||
* for several purposes. Usually a {@link OneTimeAuthToken} is used together
|
* for several purposes. Usually a {@link OneTimeAuthToken} is used together
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ import java.io.Serializable;
|
||||||
* @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 3/23/17
|
* @version created on 3/23/17
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
public class PartyIdResolver implements Serializable, ObjectIdResolver {
|
public class PartyIdResolver implements Serializable, ObjectIdResolver {
|
||||||
private static final long serialVersionUID = -1208121020457080214L;
|
private static final long serialVersionUID = -1208121020457080214L;
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,8 @@ import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A permission grants a privilege on an object or system wide to {@link Role}.
|
* A permission grants a privilege on an object or system wide to a
|
||||||
|
* {@link Role}.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
|
@ -63,48 +64,40 @@ import javax.persistence.TemporalType;
|
||||||
@Table(name = "PERMISSIONS", schema = DB_SCHEMA)
|
@Table(name = "PERMISSIONS", schema = DB_SCHEMA)
|
||||||
@NamedQueries({
|
@NamedQueries({
|
||||||
@NamedQuery(name = "Permission.findByUuid",
|
@NamedQuery(name = "Permission.findByUuid",
|
||||||
query = "SELECT p FROM Permission p WHERE p.uuid = :uuid")
|
query = "SELECT p FROM Permission p WHERE p.uuid = :uuid"),
|
||||||
,
|
|
||||||
@NamedQuery(name = "Permission.findByCustomPermId",
|
@NamedQuery(name = "Permission.findByCustomPermId",
|
||||||
query = "SELECT p FROM Permission p "
|
query = "SELECT p FROM Permission p "
|
||||||
+ "WHERE p.grantedPrivilege = :privilege "
|
+ "WHERE p.grantedPrivilege = :privilege "
|
||||||
+ "AND p.grantee = :grantee "
|
+ "AND p.grantee = :grantee "
|
||||||
+ "AND p.object = :object")
|
+ "AND p.object = :object"),
|
||||||
,
|
|
||||||
@NamedQuery(name = "Permission.existsForPrivilegeRoleObject",
|
@NamedQuery(name = "Permission.existsForPrivilegeRoleObject",
|
||||||
query = "SELECT COUNT(p) FROM Permission p "
|
query = "SELECT COUNT(p) FROM Permission p "
|
||||||
+ "WHERE p.grantedPrivilege = :privilege "
|
+ "WHERE p.grantedPrivilege = :privilege "
|
||||||
+ "AND p.grantee = :grantee "
|
+ "AND p.grantee = :grantee "
|
||||||
+ "AND p.object = :object")
|
+ "AND p.object = :object"),
|
||||||
,
|
|
||||||
@NamedQuery(name = "Permission.existsDirectForPrivilegeRoleObject",
|
@NamedQuery(name = "Permission.existsDirectForPrivilegeRoleObject",
|
||||||
query = "SELECT COUNT(p) FROM Permission p "
|
query = "SELECT COUNT(p) FROM Permission p "
|
||||||
+ "WHERE p.grantedPrivilege = :privilege "
|
+ "WHERE p.grantedPrivilege = :privilege "
|
||||||
+ "AND p.grantee = :grantee "
|
+ "AND p.grantee = :grantee "
|
||||||
+ "AND p.object = :object "
|
+ "AND p.object = :object "
|
||||||
+ "AND p.inherited = false")
|
+ "AND p.inherited = false"),
|
||||||
,
|
|
||||||
@NamedQuery(name = "Permission.existsInheritedForPrivilegeRoleObject",
|
@NamedQuery(name = "Permission.existsInheritedForPrivilegeRoleObject",
|
||||||
query = "SELECT COUNT(p) FROM Permission p "
|
query = "SELECT COUNT(p) FROM Permission p "
|
||||||
+ "WHERE p.grantedPrivilege = :privilege "
|
+ "WHERE p.grantedPrivilege = :privilege "
|
||||||
+ "AND p.grantee = :grantee "
|
+ "AND p.grantee = :grantee "
|
||||||
+ "AND p.object = :object "
|
+ "AND p.object = :object "
|
||||||
+ "AND p.inherited = true")
|
+ "AND p.inherited = true"),
|
||||||
,
|
|
||||||
@NamedQuery(name = "Permission.existsForPrivilegeAndRole",
|
@NamedQuery(name = "Permission.existsForPrivilegeAndRole",
|
||||||
query = "SELECT COUNT(p) FROM Permission p "
|
query = "SELECT COUNT(p) FROM Permission p "
|
||||||
+ "WHERE p.grantedPrivilege = :privilege "
|
+ "WHERE p.grantedPrivilege = :privilege "
|
||||||
+ "AND p.grantee = :grantee "
|
+ "AND p.grantee = :grantee "
|
||||||
+ "AND p.object IS NULL")
|
+ "AND p.object IS NULL"),
|
||||||
,
|
|
||||||
@NamedQuery(name = "Permission.findPermissionsForRole",
|
@NamedQuery(name = "Permission.findPermissionsForRole",
|
||||||
query = "SELECT p FROM Permission p "
|
query = "SELECT p FROM Permission p "
|
||||||
+ "WHERE p.grantee = :grantee")
|
+ "WHERE p.grantee = :grantee"),
|
||||||
,
|
|
||||||
@NamedQuery(name = "Permission.findPermissionsForCcmObject",
|
@NamedQuery(name = "Permission.findPermissionsForCcmObject",
|
||||||
query = "SELECT p FROM Permission p "
|
query = "SELECT p FROM Permission p "
|
||||||
+ "WHERE p.object = :object")
|
+ "WHERE p.object = :object"),
|
||||||
,
|
|
||||||
@NamedQuery(name = "Permission.findPermissionsForRoleAndObject",
|
@NamedQuery(name = "Permission.findPermissionsForRoleAndObject",
|
||||||
query = "SELECT p FROM Permission p "
|
query = "SELECT p FROM Permission p "
|
||||||
+ "WHERE p.object = :object and p.grantee = :grantee")
|
+ "WHERE p.object = :object and p.grantee = :grantee")
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,10 @@ import javax.enterprise.context.RequestScoped;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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 3/23/17
|
* @version created on 3/23/17
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
public class PermissionIdResolver implements Serializable, ObjectIdResolver {
|
public class PermissionIdResolver implements Serializable, ObjectIdResolver {
|
||||||
private static final long serialVersionUID = -8397366681202009916L;
|
private static final long serialVersionUID = -8397366681202009916L;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@ import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Exporter/Importer for {@link Permission}s.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* A repository class for {@link Permission}.
|
* A repository class for {@link Permission}.
|
||||||
*
|
*
|
||||||
* @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 3/29/17
|
* @version created on 3/29/17
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,11 @@ package org.libreccm.security;
|
||||||
|
|
||||||
import org.libreccm.core.CcmObject;
|
import org.libreccm.core.CcmObject;
|
||||||
|
|
||||||
import java.lang.annotation.*;
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Inherited;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This annotation is used together with the {@link AuthorizationRequired}
|
* This annotation is used together with the {@link AuthorizationRequired}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||||
import org.hibernate.search.annotations.Field;
|
import org.hibernate.search.annotations.Field;
|
||||||
import org.hibernate.validator.constraints.NotBlank;
|
|
||||||
import org.libreccm.l10n.LocalizedString;
|
import org.libreccm.l10n.LocalizedString;
|
||||||
import org.libreccm.workflow.TaskAssignment;
|
import org.libreccm.workflow.TaskAssignment;
|
||||||
|
|
||||||
|
|
@ -57,6 +56,7 @@ import javax.persistence.NamedQuery;
|
||||||
import javax.persistence.OneToMany;
|
import javax.persistence.OneToMany;
|
||||||
import javax.persistence.OrderBy;
|
import javax.persistence.OrderBy;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.xml.bind.annotation.XmlAccessType;
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
import javax.xml.bind.annotation.XmlAccessorType;
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,10 @@ import javax.enterprise.context.RequestScoped;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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 3/23/17
|
* @version created on 3/23/17
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
public class RoleIdResolver implements Serializable, ObjectIdResolver {
|
public class RoleIdResolver implements Serializable, ObjectIdResolver {
|
||||||
private static final long serialVersionUID = -1651704701257277011L;
|
private static final long serialVersionUID = -1651704701257277011L;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@ import java.util.Set;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Exporter/Importer for {@link Role}s.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Processes(Role.class)
|
@Processes(Role.class)
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ import java.util.UUID;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manager for roles providing methods for assigning the role the {@link Party}
|
* Manager for roles providing methods for assigning the role and adding and
|
||||||
* entities and for removing them.
|
* removing {@link Party} entities entities to the role and for removing them.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,8 @@ import javax.persistence.EntityManager;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Exporter/Importer for {@link RoleMembership}s.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Processes(RoleMembership.class)
|
@Processes(RoleMembership.class)
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ import java.io.Serializable;
|
||||||
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
|
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
public class UserIdResolver implements Serializable, ObjectIdResolver {
|
public class UserIdResolver implements Serializable, ObjectIdResolver {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,8 @@ import javax.persistence.EntityManager;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Exporter/Importer for users.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,6 @@ import java.io.Serializable;
|
||||||
/**
|
/**
|
||||||
* Provides various operations for user objects.
|
* Provides various operations for user objects.
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,8 @@ import javax.ws.rs.core.MediaType;
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Unstable! First try for a RESTful API for user management.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,8 @@ import java.io.PrintWriter;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Serves static theme resources from the classpath.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@WebServlet(urlPatterns = {"/themes/static/*"})
|
@WebServlet(urlPatterns = {"/themes/static/*"})
|
||||||
|
|
|
||||||
|
|
@ -38,15 +38,15 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* {@link ThemeProvider} implementation that loads themes from the file system
|
||||||
|
* using {@link CcmFiles}.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,9 @@ import javax.json.JsonObject;
|
||||||
import javax.json.JsonReader;
|
import javax.json.JsonReader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Implementation of {@link ThemeProvider} for serves themes stored in the
|
||||||
|
* classpath.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@
|
||||||
package org.libreccm.theming;
|
package org.libreccm.theming;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Some constants for the classes managing themes.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public final class ThemeConstants {
|
public final class ThemeConstants {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,9 @@ import javax.ws.rs.core.Response;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* JAX-RS endpoint for serving files from a theme.
|
||||||
|
*
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue