use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class Classification method remove.
@Action(domainEvent = RemoveDomainEvent.class, semantics = SemanticsOf.IDEMPOTENT_ARE_YOU_SURE)
@ActionLayout(cssClass = "btn-warning", cssClassFa = "trash")
public Object remove() {
final Object aliased = getClassified();
classificationRepository.remove(this);
return aliased;
}
use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class Alias method remove.
@Action(domainEvent = RemoveDomainEvent.class, semantics = SemanticsOf.IDEMPOTENT_ARE_YOU_SURE)
@ActionLayout(cssClass = "btn-warning", cssClassFa = "trash")
public Object remove() {
final Object aliased = getAliased();
aliasRepository.remove(this);
return aliased;
}
use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class Taxonomy method applicable.
@Action(domainEvent = ApplicableToDomainEvent.class)
@ActionLayout(cssClassFa = "fa-plus")
@MemberOrder(name = "appliesTo", sequence = "1")
public Category applicable(@ParameterLayout(named = "Application tenancy") final String atPath, @ParameterLayout(named = "Domain type") final String domainTypeName) {
Applicability applicability = new Applicability(this, atPath, domainTypeName);
repositoryService.persistAndFlush(applicability);
return this;
}
use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class BudgetImportExportManager method exportBudget.
@Action(semantics = SemanticsOf.SAFE)
@ActionLayout(cssClassFa = "fa-download")
public Blob exportBudget() {
final String fileName = withExtension(getFileName(), ".xlsx");
WorksheetSpec spec1 = new WorksheetSpec(BudgetImportExport.class, "budget");
WorksheetSpec spec2 = new WorksheetSpec(KeyItemImportExportLineItem.class, "keyItems");
WorksheetSpec spec3 = new WorksheetSpec(BudgetOverrideImportExport.class, "overrides");
WorksheetSpec spec4 = new WorksheetSpec(ChargeImport.class, "charges");
WorksheetContent worksheetContent = new WorksheetContent(getLines(), spec1);
WorksheetContent keyItemsContent = new WorksheetContent(getKeyItemLines(), spec2);
WorksheetContent overridesContent = new WorksheetContent(getOverrides(), spec3);
WorksheetContent chargesContent = new WorksheetContent(getCharges(), spec4);
return excelService.toExcel(Arrays.asList(worksheetContent, keyItemsContent, overridesContent, chargesContent), fileName);
}
use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class BudgetImportExportManager method importBudget.
@Action(publishing = Publishing.DISABLED, semantics = SemanticsOf.IDEMPOTENT)
@ActionLayout()
@CollectionLayout()
public Budget importBudget(@Parameter(fileAccept = ".xlsx") @ParameterLayout(named = "Excel spreadsheet") final Blob spreadsheet) {
WorksheetSpec spec1 = new WorksheetSpec(BudgetImportExport.class, "budget");
WorksheetSpec spec2 = new WorksheetSpec(KeyItemImportExportLineItem.class, "keyItems");
WorksheetSpec spec3 = new WorksheetSpec(BudgetOverrideImportExport.class, "overrides");
WorksheetSpec spec4 = new WorksheetSpec(ChargeImport.class, "charges");
List<List<?>> objects = excelService.fromExcel(spreadsheet, Arrays.asList(spec1, spec2, spec3, spec4));
// first upsert charges
List<ChargeImport> chargeImportLines = (List<ChargeImport>) objects.get(3);
for (ChargeImport lineItem : chargeImportLines) {
lineItem.importData(null);
}
// import budget en items
List<BudgetImportExport> budgetItemLines = importBudgetAndItems(objects);
// import keyTables
importKeyTables(budgetItemLines, objects);
// import overrides
importOverrides(objects);
return getBudget();
}
Aggregations