Some more documentation for the base classes of authoring steps.
parent
da268c2947
commit
1dfd4def77
|
|
@ -43,7 +43,8 @@ import javax.ws.rs.WebApplicationException;
|
||||||
import javax.ws.rs.core.UriBuilder;
|
import javax.ws.rs.core.UriBuilder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Base class for implementing authoring steps for {@link ContentItem}s.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractMvcAuthoringStep implements MvcAuthoringStep {
|
public abstract class AbstractMvcAuthoringStep implements MvcAuthoringStep {
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,8 @@ import java.util.Set;
|
||||||
import javax.enterprise.context.ApplicationScoped;
|
import javax.enterprise.context.ApplicationScoped;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* The class is used by
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@ApplicationScoped
|
@ApplicationScoped
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,9 @@ import java.lang.annotation.Target;
|
||||||
* class.
|
* class.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*
|
||||||
|
* @see AbstractMvcDocumentCreateStep
|
||||||
|
* @see AbstractMvcAuthoringStep
|
||||||
*/
|
*/
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
|
|
||||||
|
|
@ -23,12 +23,18 @@ import org.librecms.contentsection.ContentItem;
|
||||||
import org.librecms.contentsection.ContentSection;
|
import org.librecms.contentsection.ContentSection;
|
||||||
|
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.core.Application;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base interface for authoring steps. For buidling authoring steps it is
|
* Base interface for authoring steps. For buidling authoring steps it is
|
||||||
* recommanned to use the {@link AbstractMvcAuthoringStep} as base that
|
* recommanned to use the {@link AbstractMvcAuthoringStep} as base that
|
||||||
* implements most of the methods defined by this interface.
|
* implements most of the methods defined by this interface.
|
||||||
*
|
*
|
||||||
|
* To be active all authoring steps must also be added to an implementation of
|
||||||
|
* the {@link MvcAuthoringSteps} interface. There should be one implementation
|
||||||
|
* of {@link MvcAuthoringSteps} per module. For the ccm-cms module this is
|
||||||
|
* {@link CmsMvcAuthoringSteps}.
|
||||||
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
public interface MvcAuthoringStep {
|
public interface MvcAuthoringStep {
|
||||||
|
|
@ -88,10 +94,8 @@ public interface MvcAuthoringStep {
|
||||||
* the path of the item, the step MUST call this method to update the
|
* the path of the item, the step MUST call this method to update the
|
||||||
* document path used by the step.
|
* document path used by the step.
|
||||||
*
|
*
|
||||||
* @throws
|
* @throws ContentSectionNotFoundException
|
||||||
* org.librecms.ui.contentsections.documents.ContentSectionNotFoundException
|
* @throws DocumentNotFoundException
|
||||||
* @throws
|
|
||||||
* org.librecms.ui.contentsections.documents.DocumentNotFoundException
|
|
||||||
*/
|
*/
|
||||||
void updateDocumentPath() throws ContentSectionNotFoundException,
|
void updateDocumentPath() throws ContentSectionNotFoundException,
|
||||||
DocumentNotFoundException;
|
DocumentNotFoundException;
|
||||||
|
|
@ -105,10 +109,8 @@ public interface MvcAuthoringStep {
|
||||||
* @return The redirect path. If the the implementing class is not annotated
|
* @return The redirect path. If the the implementing class is not annotated
|
||||||
* with {@link Path} an empty string is returned.
|
* with {@link Path} an empty string is returned.
|
||||||
*
|
*
|
||||||
* @throws
|
* @throws ContentSectionNotFoundException
|
||||||
* org.librecms.ui.contentsections.documents.ContentSectionNotFoundException
|
* @throws DocumentNotFoundException
|
||||||
* @throws
|
|
||||||
* org.librecms.ui.contentsections.documents.DocumentNotFoundException
|
|
||||||
*/
|
*/
|
||||||
String buildRedirectPathForStep() throws ContentSectionNotFoundException,
|
String buildRedirectPathForStep() throws ContentSectionNotFoundException,
|
||||||
DocumentNotFoundException;
|
DocumentNotFoundException;
|
||||||
|
|
@ -123,10 +125,8 @@ public interface MvcAuthoringStep {
|
||||||
* @return The redirect path. If the the implemeting class is not annotated
|
* @return The redirect path. If the the implemeting class is not annotated
|
||||||
* with {@link Path} an empty string is returned.
|
* with {@link Path} an empty string is returned.
|
||||||
*
|
*
|
||||||
* @throws
|
* @throws ContentSectionNotFoundException
|
||||||
* org.librecms.ui.contentsections.documents.ContentSectionNotFoundException
|
* @throws DocumentNotFoundException
|
||||||
* @throws
|
|
||||||
* org.librecms.ui.contentsections.documents.DocumentNotFoundException
|
|
||||||
*/
|
*/
|
||||||
String buildRedirectPathForStep(final String subPath) throws
|
String buildRedirectPathForStep(final String subPath) throws
|
||||||
ContentSectionNotFoundException, DocumentNotFoundException;
|
ContentSectionNotFoundException, DocumentNotFoundException;
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,17 @@
|
||||||
*/
|
*/
|
||||||
package org.librecms.ui.contentsections.documents;
|
package org.librecms.ui.contentsections.documents;
|
||||||
|
|
||||||
|
import org.librecms.ui.contentsections.ContentSectionApplication;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import javax.enterprise.context.ApplicationScoped;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Used by {@link ContentSectionApplication} to add all authoring steps to the
|
||||||
|
* {@link ContentSectionApplication}. Implementation MUST be
|
||||||
|
* {@link ApplicationScoped} CDI beans.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
|
@ -38,8 +45,19 @@ public interface MvcAuthoringSteps {
|
||||||
public static final String DOCUMENT_PATH_PATH_PARAM
|
public static final String DOCUMENT_PATH_PATH_PARAM
|
||||||
= DOCUMENT_PATH_PATH_PARAM_NAME + ":(.+)?";
|
= DOCUMENT_PATH_PATH_PARAM_NAME + ":(.+)?";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Authoring step classes provided by the module.
|
||||||
|
*
|
||||||
|
* @return A set of the {@link MvcAuthoringStep}s provided by the module.
|
||||||
|
*/
|
||||||
Set<Class<?>> getClasses();
|
Set<Class<?>> getClasses();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extra resource classes providing resources for the UI of the authoring
|
||||||
|
* step (for example JSON data).
|
||||||
|
*
|
||||||
|
* @return A set of extra resource classes used by authoring steps.
|
||||||
|
*/
|
||||||
default Set<Class<?>> getResourceClasses() {
|
default Set<Class<?>> getResourceClasses() {
|
||||||
return Collections.emptySet();
|
return Collections.emptySet();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue