Skip to content

Commit

Permalink
kitodo#3408 fix reformating
Browse files Browse the repository at this point in the history
  • Loading branch information
markusweigelt committed Sep 23, 2021
1 parent eac8cb8 commit a728b1b
Showing 1 changed file with 10 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ public class ProcessDataTab {
/**
* Set docType.
*
* @param docType
* as java.lang.String
* @param docType as java.lang.String
*/
public void setDocType(String docType) {
if (Objects.isNull(allDocTypes) || allDocTypes.isEmpty()) {
Expand All @@ -67,16 +66,15 @@ public void setDocType(String docType) {
this.docType = docType;
} else {
this.docType = (String) allDocTypes.get(0).getValue();
Helper.setErrorMessage("docTypeNotFound", new Object[] {docType });
Helper.setErrorMessage("docTypeNotFound", new Object[] {docType});
}
if (!this.createProcessForm.getProcesses().isEmpty()) {
this.createProcessForm.getProcesses().get(0).getWorkpiece().getLogicalStructure().setType(this.docType);
if (this.docType.isEmpty()) {
this.createProcessForm.getProcessMetadataTab().setProcessDetails(ProcessFieldedMetadata.EMPTY);
} else {
ProcessFieldedMetadata metadata = this.createProcessForm.getProcessMetadataTab()
.initializeProcessDetails(
this.createProcessForm.getProcesses().get(0).getWorkpiece().getLogicalStructure());
.initializeProcessDetails(this.createProcessForm.getProcesses().get(0).getWorkpiece().getLogicalStructure());
this.createProcessForm.getProcessMetadataTab().setProcessDetails(metadata);
}
}
Expand Down Expand Up @@ -112,8 +110,7 @@ public boolean isUsingTemplates() {
/**
* Set useTemplate.
*
* @param usingTemplates
* as boolean
* @param usingTemplates as boolean
*/
public void setUsingTemplates(boolean usingTemplates) {
ServiceManager.getImportService().setUsingTemplates(usingTemplates);
Expand All @@ -131,8 +128,7 @@ public String getTiffHeaderImageDescription() {
/**
* Set tiffHeaderImageDescription.
*
* @param tiffHeaderImageDescription
* as java.lang.String
* @param tiffHeaderImageDescription as java.lang.String
*/
public void setTiffHeaderImageDescription(String tiffHeaderImageDescription) {
this.tiffHeaderImageDescription = tiffHeaderImageDescription;
Expand All @@ -150,8 +146,7 @@ public String getTiffHeaderDocumentName() {
/**
* Set tiffHeaderDocumentName.
*
* @param tiffHeaderDocumentName
* as java.lang.String
* @param tiffHeaderDocumentName as java.lang.String
*/
public void setTiffHeaderDocumentName(String tiffHeaderDocumentName) {
this.tiffHeaderDocumentName = tiffHeaderDocumentName;
Expand All @@ -169,8 +164,7 @@ public int getGuessedImages() {
/**
* Set guessedImages.
*
* @param guessedImages
* as int
* @param guessedImages as int
*/
public void setGuessedImages(int guessedImages) {
this.guessedImages = guessedImages;
Expand All @@ -188,8 +182,7 @@ public List<SelectItem> getAllDoctypes() {
/**
* Set allDocTypes.
*
* @param allDocTypes
* as java.util.List
* @param allDocTypes as java.util.List
*/
void setAllDocTypes(List<SelectItem> allDocTypes) {
this.allDocTypes = allDocTypes;
Expand All @@ -207,9 +200,8 @@ public void generateProcessTitleAndTiffHeader() {
List<ProcessDetail> processDetails = this.createProcessForm.getProcessMetadataTab().getProcessDetailsElements();
Process process = this.createProcessForm.getMainProcess();
try {
StructuralElementViewInterface docTypeView = createProcessForm.getRulesetManagement()
.getStructuralElementView(docType, createProcessForm.getAcquisitionStage(),
createProcessForm.getPriorityList());
StructuralElementViewInterface docTypeView = createProcessForm.getRulesetManagement().getStructuralElementView(
docType, createProcessForm.getAcquisitionStage(), createProcessForm.getPriorityList());
String processTitle = docTypeView.getProcessTitle().orElse("");
if (processTitle.isEmpty()) {
Helper.setErrorMessage("newProcess.titleGeneration.creationRuleNotFound",
Expand Down

0 comments on commit a728b1b

Please sign in to comment.