Some more documentation for the base classes of authoring steps.
parent
da268c2947
commit
1dfd4def77
|
|
@ -43,6 +43,7 @@ import javax.ws.rs.WebApplicationException;
|
|||
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>
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import java.util.Set;
|
|||
import javax.enterprise.context.ApplicationScoped;
|
||||
|
||||
/**
|
||||
* The class is used by
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@ import java.lang.annotation.Target;
|
|||
* class.
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*
|
||||
* @see AbstractMvcDocumentCreateStep
|
||||
* @see AbstractMvcAuthoringStep
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
|
|||
|
|
@ -23,12 +23,18 @@ import org.librecms.contentsection.ContentItem;
|
|||
import org.librecms.contentsection.ContentSection;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.core.Application;
|
||||
|
||||
/**
|
||||
* Base interface for authoring steps. For buidling authoring steps it is
|
||||
* recommanned to use the {@link AbstractMvcAuthoringStep} as base that
|
||||
* 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>
|
||||
*/
|
||||
public interface MvcAuthoringStep {
|
||||
|
|
@ -88,10 +94,8 @@ public interface MvcAuthoringStep {
|
|||
* the path of the item, the step MUST call this method to update the
|
||||
* document path used by the step.
|
||||
*
|
||||
* @throws
|
||||
* org.librecms.ui.contentsections.documents.ContentSectionNotFoundException
|
||||
* @throws
|
||||
* org.librecms.ui.contentsections.documents.DocumentNotFoundException
|
||||
* @throws ContentSectionNotFoundException
|
||||
* @throws DocumentNotFoundException
|
||||
*/
|
||||
void updateDocumentPath() throws ContentSectionNotFoundException,
|
||||
DocumentNotFoundException;
|
||||
|
|
@ -105,10 +109,8 @@ public interface MvcAuthoringStep {
|
|||
* @return The redirect path. If the the implementing class is not annotated
|
||||
* with {@link Path} an empty string is returned.
|
||||
*
|
||||
* @throws
|
||||
* org.librecms.ui.contentsections.documents.ContentSectionNotFoundException
|
||||
* @throws
|
||||
* org.librecms.ui.contentsections.documents.DocumentNotFoundException
|
||||
* @throws ContentSectionNotFoundException
|
||||
* @throws DocumentNotFoundException
|
||||
*/
|
||||
String buildRedirectPathForStep() throws ContentSectionNotFoundException,
|
||||
DocumentNotFoundException;
|
||||
|
|
@ -123,10 +125,8 @@ public interface MvcAuthoringStep {
|
|||
* @return The redirect path. If the the implemeting class is not annotated
|
||||
* with {@link Path} an empty string is returned.
|
||||
*
|
||||
* @throws
|
||||
* org.librecms.ui.contentsections.documents.ContentSectionNotFoundException
|
||||
* @throws
|
||||
* org.librecms.ui.contentsections.documents.DocumentNotFoundException
|
||||
* @throws ContentSectionNotFoundException
|
||||
* @throws DocumentNotFoundException
|
||||
*/
|
||||
String buildRedirectPathForStep(final String subPath) throws
|
||||
ContentSectionNotFoundException, DocumentNotFoundException;
|
||||
|
|
|
|||
|
|
@ -18,10 +18,17 @@
|
|||
*/
|
||||
package org.librecms.ui.contentsections.documents;
|
||||
|
||||
import org.librecms.ui.contentsections.ContentSectionApplication;
|
||||
|
||||
import java.util.Collections;
|
||||
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>
|
||||
*/
|
||||
|
|
@ -38,8 +45,19 @@ public interface MvcAuthoringSteps {
|
|||
public static final String DOCUMENT_PATH_PATH_PARAM
|
||||
= 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();
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue