Skip to content

Commit

Permalink
(#24): Interview Reporter (UI stub)
Browse files Browse the repository at this point in the history
  • Loading branch information
andi-huber committed Jun 13, 2024
1 parent be95c88 commit 9e2a6b2
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// Auto-generated by Causeway-Stuff code generator.
package dita.globodiet.survey.dom;

import jakarta.inject.Inject;

import org.springframework.beans.factory.annotation.Qualifier;

import org.apache.causeway.applib.annotation.Action;
import org.apache.causeway.applib.annotation.ActionLayout;
import org.apache.causeway.applib.annotation.ActionLayout.Position;
import org.apache.causeway.applib.annotation.MemberSupport;
import org.apache.causeway.applib.annotation.SemanticsOf;
import org.apache.causeway.applib.value.Clob;
import org.apache.causeway.applib.value.NamedWithMimeType.CommonMimeType;

import lombok.RequiredArgsConstructor;

import io.github.causewaystuff.blobstore.applib.BlobStore;

@Action(
semantics = SemanticsOf.IDEMPOTENT
)
@ActionLayout(
fieldSetId = "interviewUploads",
sequence = "2",
position = Position.PANEL,
cssClass = "btn-primary",
cssClassFa = "solid file-export",
describedAs = "Generates an Interview Report.")
@RequiredArgsConstructor
public class Campaign_generateReport {

@Inject @Qualifier("survey") private BlobStore surveyBlobStore;

final Campaign mixee;

@MemberSupport
public Clob act() {
var interviewSet = Campaigns.interviewSet(mixee, surveyBlobStore);
return Clob.of("report", CommonMimeType.YAML, interviewSet.toYaml());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
@Action(semantics = SemanticsOf.NON_IDEMPOTENT)
@ActionLayout(
fieldSetId = "interviewUploads",
sequence = "1",
position = Position.PANEL,
cssClass = "btn-success",
cssClassFa = "solid fa-binoculars",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@

import jakarta.inject.Inject;

import io.github.causewaystuff.blobstore.applib.BlobDescriptor;
import io.github.causewaystuff.blobstore.applib.BlobDescriptor.Compression;
import io.github.causewaystuff.blobstore.applib.BlobStore;

import org.springframework.beans.factory.annotation.Qualifier;

import org.apache.causeway.applib.annotation.Action;
Expand All @@ -46,13 +42,16 @@

import dita.commons.util.BlobUtils;
import dita.globodiet.survey.view.SurveyTreeHelperService;
import io.github.causewaystuff.blobstore.applib.BlobDescriptor;
import io.github.causewaystuff.blobstore.applib.BlobDescriptor.Compression;
import io.github.causewaystuff.blobstore.applib.BlobStore;

@Action(
semantics = SemanticsOf.IDEMPOTENT
)
@ActionLayout(
fieldSetId = "interviewUploads",
sequence = "1",
sequence = "3",
describedAs = "Uploads an interview XML file.",
position = ActionLayout.Position.PANEL
)
Expand Down

0 comments on commit 9e2a6b2

Please sign in to comment.