Extended properties steps for CollectedVolume and
ArticleInCollectedVolumepull/1/head
parent
08428246a5
commit
ec97dad42e
|
|
@ -0,0 +1,163 @@
|
||||||
|
package org.scientificcms.publications.ui.contenttypes;
|
||||||
|
|
||||||
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
import org.librecms.ui.contentsections.documents.MvcAuthoringStepDef;
|
||||||
|
import org.librecms.ui.contentsections.documents.MvcAuthoringSteps;
|
||||||
|
import org.scientificcms.publications.ArticleInCollectedVolume;
|
||||||
|
import org.scientificcms.publications.contenttypes.ArticleInCollectedVolumeItem;
|
||||||
|
import org.scientificcms.publications.contenttypes.MonographItem;
|
||||||
|
import org.scientificcms.publications.ui.SciPublicationsUiConstants;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.mvc.Controller;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import javax.ws.rs.FormParam;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.PathParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Path(MvcAuthoringSteps.PATH_PREFIX
|
||||||
|
+ "articleincollectedvolume-extendedproperties")
|
||||||
|
@Controller
|
||||||
|
@MvcAuthoringStepDef(
|
||||||
|
bundle = SciPublicationsUiConstants.BUNDLE,
|
||||||
|
descriptionKey = "authoringsteps.extendedproperties.description",
|
||||||
|
labelKey = "authoringsteps.extendedproperties.label",
|
||||||
|
supportedDocumentType = MonographItem.class
|
||||||
|
)
|
||||||
|
public class ArticleInCollectedVolumeExtendedPropertiesStep
|
||||||
|
extends AbstractPublicationExtendedPropertiesStep<ArticleInCollectedVolumeItem, ArticleInCollectedVolume> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<ArticleInCollectedVolumeExtendedPropertiesStep> getStepClass() {
|
||||||
|
return ArticleInCollectedVolumeExtendedPropertiesStep.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<ArticleInCollectedVolume> getPublicationClass() {
|
||||||
|
return ArticleInCollectedVolume.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getEditStepUrlFragment() {
|
||||||
|
return "articleincollectedvolume-extendedproperties";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getStepTemplatePath() {
|
||||||
|
return "org/scientificcms/contenttypes/ui/articleincollectedvolume/edit-extended-properties.xhtml";
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String showStep(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath
|
||||||
|
) {
|
||||||
|
return super.showStep(sectionIdentifier, documentPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/properties")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String updateProperties(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath,
|
||||||
|
@FormParam("languageOfPublication")
|
||||||
|
final String languageOfPublicationParam,
|
||||||
|
@FormParam("peerReviewed")
|
||||||
|
final String peerReviewedParam,
|
||||||
|
@FormParam("yearFirstPublished")
|
||||||
|
final String yearFirstPublishedParam
|
||||||
|
) {
|
||||||
|
return super.updateProperties(
|
||||||
|
sectionIdentifier,
|
||||||
|
documentPath,
|
||||||
|
languageOfPublicationParam,
|
||||||
|
peerReviewedParam,
|
||||||
|
yearFirstPublishedParam
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/series")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public String addSeries(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath,
|
||||||
|
@FormParam("seriesIdentifier")
|
||||||
|
final String seriesIdentifier,
|
||||||
|
@FormParam("volumeOfSeries")
|
||||||
|
final String volumeOfSeries
|
||||||
|
) {
|
||||||
|
return super.addSeries(
|
||||||
|
sectionIdentifier,
|
||||||
|
documentPath,
|
||||||
|
seriesIdentifier,
|
||||||
|
volumeOfSeries
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/series/{volumeInSeriesUuid}")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String editVolumeInSeries(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath,
|
||||||
|
@PathParam("volumeInSeriesUuid")
|
||||||
|
final String volumeInSeriesUuid,
|
||||||
|
@FormParam("volumeOfSeries")
|
||||||
|
final String volumeOfSeries
|
||||||
|
) {
|
||||||
|
return super.editVolumeInSeries(
|
||||||
|
sectionIdentifier,
|
||||||
|
documentPath,
|
||||||
|
volumeInSeriesUuid,
|
||||||
|
volumeOfSeries
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/series/{volumeInSeriesUuid}/remove")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String removeVolumeInSeries(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath,
|
||||||
|
@PathParam("volumeInSeriesUuid")
|
||||||
|
final String volumeInSeriesUuid
|
||||||
|
) {
|
||||||
|
return super.removeVolumeInSeries(
|
||||||
|
sectionIdentifier,
|
||||||
|
documentPath,
|
||||||
|
volumeInSeriesUuid
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,229 @@
|
||||||
|
package org.scientificcms.publications.ui.contenttypes;
|
||||||
|
|
||||||
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
import org.librecms.ui.contentsections.documents.MvcAuthoringStepDef;
|
||||||
|
import org.librecms.ui.contentsections.documents.MvcAuthoringSteps;
|
||||||
|
import org.scientificcms.publications.CollectedVolume;
|
||||||
|
import org.scientificcms.publications.contenttypes.CollectedVolumeItem;
|
||||||
|
import org.scientificcms.publications.ui.SciPublicationsUiConstants;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.mvc.Controller;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import javax.ws.rs.FormParam;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.PathParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Path(MvcAuthoringSteps.PATH_PREFIX + "collectedvolume-extendedproperties")
|
||||||
|
@Controller
|
||||||
|
@MvcAuthoringStepDef(
|
||||||
|
bundle = SciPublicationsUiConstants.BUNDLE,
|
||||||
|
descriptionKey = "authoringsteps.extendedproperties.description",
|
||||||
|
labelKey = "authoringsteps.extendedproperties.label",
|
||||||
|
supportedDocumentType = CollectedVolumeItem.class
|
||||||
|
)
|
||||||
|
public class CollectedVolumeExtendedPropertiesStep
|
||||||
|
extends AbstractPublicationWithPublisherExtendedPropertiesStep<CollectedVolumeItem, CollectedVolume> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<CollectedVolumeExtendedPropertiesStep> getStepClass() {
|
||||||
|
return CollectedVolumeExtendedPropertiesStep.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<CollectedVolume> getPublicationClass() {
|
||||||
|
return CollectedVolume.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getEditStepUrlFragment() {
|
||||||
|
return "collectedvolume-extendedproperties";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getStepTemplatePath() {
|
||||||
|
return "org/scientificcms/contenttypes/ui/collectedvolume/edit-extended-properties.xhtml";
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String showStep(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath
|
||||||
|
) {
|
||||||
|
return super.showStep(sectionIdentifier, documentPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/properties")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String updateProperties(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath,
|
||||||
|
@FormParam("languageOfPublication")
|
||||||
|
final String languageOfPublicationParam,
|
||||||
|
@FormParam("peerReviewed")
|
||||||
|
final String peerReviewedParam,
|
||||||
|
@FormParam("yearFirstPublished")
|
||||||
|
final String yearFirstPublishedParam,
|
||||||
|
@FormParam("isbn10")
|
||||||
|
final String isbn10,
|
||||||
|
@FormParam("isbn13")
|
||||||
|
final String isbn13,
|
||||||
|
@FormParam("numberOfPages")
|
||||||
|
final String numberOfPagesParam,
|
||||||
|
@FormParam("numberOfVolumes")
|
||||||
|
final String numberOfVolumesParam,
|
||||||
|
@FormParam("volume")
|
||||||
|
final String volumeParam
|
||||||
|
) {
|
||||||
|
return super.updateProperties(
|
||||||
|
sectionIdentifier,
|
||||||
|
documentPath,
|
||||||
|
languageOfPublicationParam,
|
||||||
|
peerReviewedParam,
|
||||||
|
yearFirstPublishedParam,
|
||||||
|
isbn10,
|
||||||
|
isbn13,
|
||||||
|
numberOfPagesParam,
|
||||||
|
numberOfVolumesParam,
|
||||||
|
volumeParam
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/edition/@add")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String addEditionValue(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath,
|
||||||
|
@FormParam("locale") final String localeParam,
|
||||||
|
@FormParam("value") final String value
|
||||||
|
) {
|
||||||
|
return super.addEditionValue(
|
||||||
|
sectionIdentifier, documentPath, localeParam, value
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/edition/@edit/{locale}")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String editEditionValue(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath,
|
||||||
|
@PathParam("locale") final String localeParam,
|
||||||
|
@FormParam("value") final String value
|
||||||
|
) {
|
||||||
|
return super.editEditionValue(
|
||||||
|
sectionIdentifier, documentPath, localeParam, value
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/edition/@remove/{locale}")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String removeEditionValue(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath,
|
||||||
|
@PathParam("locale") final String localeParam
|
||||||
|
) {
|
||||||
|
return super.removeEditionValue(
|
||||||
|
sectionIdentifier, documentPath, localeParam
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/series")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public String addSeries(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath,
|
||||||
|
@FormParam("seriesIdentifier")
|
||||||
|
final String seriesIdentifier,
|
||||||
|
@FormParam("volumeOfSeries")
|
||||||
|
final String volumeOfSeries
|
||||||
|
) {
|
||||||
|
return super.addSeries(
|
||||||
|
sectionIdentifier,
|
||||||
|
documentPath,
|
||||||
|
seriesIdentifier,
|
||||||
|
volumeOfSeries
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/series/{volumeInSeriesUuid}")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String editVolumeInSeries(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath,
|
||||||
|
@PathParam("volumeInSeriesUuid")
|
||||||
|
final String volumeInSeriesUuid,
|
||||||
|
@FormParam("volumeOfSeries")
|
||||||
|
final String volumeOfSeries
|
||||||
|
) {
|
||||||
|
return super.editVolumeInSeries(
|
||||||
|
sectionIdentifier,
|
||||||
|
documentPath,
|
||||||
|
volumeInSeriesUuid,
|
||||||
|
volumeOfSeries
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/series/{volumeInSeriesUuid}/remove")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String removeVolumeInSeries(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath,
|
||||||
|
@PathParam("volumeInSeriesUuid")
|
||||||
|
final String volumeInSeriesUuid
|
||||||
|
) {
|
||||||
|
return super.removeVolumeInSeries(
|
||||||
|
sectionIdentifier,
|
||||||
|
documentPath,
|
||||||
|
volumeInSeriesUuid
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue