当前位置: 首页>>代码示例>>Java>>正文


Java FixtureResult类代码示例

本文整理汇总了Java中org.apache.isis.applib.fixturescripts.FixtureResult的典型用法代码示例。如果您正苦于以下问题:Java FixtureResult类的具体用法?Java FixtureResult怎么用?Java FixtureResult使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FixtureResult类属于org.apache.isis.applib.fixturescripts包,在下文中一共展示了FixtureResult类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: runFixtureScript

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
@Action(
        restrictTo = RestrictTo.PROTOTYPING
)
@ActionLayout(
        cssClassFa="fa fa-bolt"
)
@MemberOrder(sequence = "499.10.1")
@Override
public List<FixtureResult> runFixtureScript(
        final FixtureScript fixtureScript,
        @ParameterLayout(
                named="Parameters",
                describedAs = "Script-specific parameters (key=value) ",
                multiLine = 10)
        @Parameter(optionality = Optionality.OPTIONAL)
        final String parameters) {
    return super.runFixtureScript(fixtureScript, parameters);
}
 
开发者ID:isisaddons,项目名称:isis-app-kitchensink,代码行数:19,代码来源:KitchensinkFixturesService.java

示例2: installFixturesAndReturnFirstRole

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
@Action(
        semantics = SemanticsOf.NON_IDEMPOTENT,
        restrictTo = RestrictTo.PROTOTYPING
)
@MemberOrder(sequence="20")
public Object installFixturesAndReturnFirstRole() {
    final List<FixtureResult> fixtureResultList = findFixtureScriptFor(SecurityModuleAppSetUp.class).run(null);
    for (FixtureResult fixtureResult : fixtureResultList) {
        final Object object = fixtureResult.getObject();
        if(object instanceof ApplicationRole) {
            return object;
        }
    }
    getContainer().warnUser("No rules found in fixture; returning all results");
    return fixtureResultList;
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:17,代码来源:SecurityModuleAppFixturesService.java

示例3: testResults

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
@Test
public void testResults() throws Exception{

    assertThat(fixtureResults.size(), is(8));

    List<ExcelModuleDemoToDoItemRowHandler2> resultToTest = new ArrayList<>();
    for (FixtureResult fr : fixtureResults){
        resultToTest.add((ExcelModuleDemoToDoItemRowHandler2) fr.getObject());
    }

    assertThat(resultToTest.get(0).getExcelRowNumber(), is(1));
    assertThat(resultToTest.get(0).getExcelSheetName(), is("Sheet2"));

    assertThat(resultToTest.get(6).getExcelRowNumber(), is(7));
    assertThat(resultToTest.get(6).getExcelSheetName(), is("Sheet2"));

    assertThat(resultToTest.get(7).getExcelRowNumber(), is(3));
    assertThat(resultToTest.get(7).getExcelSheetName(), is("Sheet3"));
    assertThat(resultToTest.get(7).getDescription(), is("Another Item"));

}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-excel,代码行数:22,代码来源:ExcelModuleDemoMetaDataEnabledIntegTest.java

示例4: installFixturesAndReturnFirstRole

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
@Action(
        semantics = SemanticsOf.NON_IDEMPOTENT,
        restrictTo = RestrictTo.PROTOTYPING
)
@ActionLayout(
        cssClassFa = "fa-bolt"
)
@MemberOrder(sequence = "20")
public Object installFixturesAndReturnFirstRole() {
    final List<FixtureResult> fixtureResultList = fixtureScripts.findFixtureScriptFor(EstatioSecurityModuleSeedFixture.class).run(null);
    for (FixtureResult fixtureResult : fixtureResultList) {
        final Object object = fixtureResult.getObject();
        if (object instanceof ApplicationRole) {
            return object;
        }
    }
    container.warnUser("No rules found in fixture; returning all results");
    return fixtureResultList;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:20,代码来源:EstatioSecurityModuleFixturesMenu.java

示例5: createRetroInvoicesForProperty

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
@Action(
        restrictTo = RestrictTo.PROTOTYPING
)
@MemberOrder(sequence = "2")
public List<FixtureResult> createRetroInvoicesForProperty(
        final Property property,
        @ParameterLayout(
                named = "Start due date"
        )
        final LocalDate startDueDate,
        @Parameter(optionality = Optionality.OPTIONAL)
        @ParameterLayout(
                named = "Nextdue date"
        )
        final LocalDate nextDueDate) {
    final CreateRetroInvoices creator = container.newTransientInstance(CreateRetroInvoices.class);
    final FixtureScript.ExecutionContext executionContext = fixtureScripts.newExecutionContext(null);
    creator.createProperty(property, startDueDate, nextDueDate, executionContext);
    return executionContext.getResults();
}
 
开发者ID:estatio,项目名称:estatio,代码行数:21,代码来源:EstatioFixtureScripts.java

示例6: createRetroInvoicesForLease

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
@Action(
        restrictTo = RestrictTo.PROTOTYPING
)
@ActionLayout(
        cssClassFa = "fa-bolt"
)
@MemberOrder(sequence = "3")
public List<FixtureResult> createRetroInvoicesForLease(
        final Lease lease,
        @ParameterLayout(
                named = "Start due date"
        )
        final LocalDate startDueDate,
        @ParameterLayout(
                named = "Nextdue date"
        )
        final LocalDate nextDueDate) {
    final CreateRetroInvoices creator = container.newTransientInstance(CreateRetroInvoices.class);
    final FixtureScript.ExecutionContext executionContext = fixtureScripts.newExecutionContext(null);
    creator.createLease(lease, startDueDate, nextDueDate, executionContext);
    return executionContext.getResults();
}
 
开发者ID:estatio,项目名称:estatio,代码行数:23,代码来源:EstatioFixtureScripts.java

示例7: recreateSimpleObjectsThenOpenDashboard

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
@Action(
        restrictTo = RestrictTo.PROTOTYPING
)
@ActionLayout(
    cssClassFa="fa fa-refresh"
)
@MemberOrder(sequence = "500.10.2")
public Object recreateSimpleObjectsThenOpenDashboard() {
    final FixtureScript fs = fixtureScripts.findFixtureScriptFor(
            DemoFixture.class);
    final List<FixtureResult> unusedResults = fs.run(null);
    return homePageService.homePage();
}
 
开发者ID:incodehq,项目名称:ecpcrm,代码行数:14,代码来源:EcpCrmPrototypingExtensions.java

示例8: recreateObjectsAndReturnFirst

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
@Action(
        restrictTo = RestrictTo.NO_RESTRICTIONS
)
@ActionLayout(
        cssClassFa="fa fa-refresh"
)
@MemberOrder(sequence="20")
public Object recreateObjectsAndReturnFirst() {
    final List<FixtureResult> run = findFixtureScriptFor(RecrearEquipo.class).run(null);
    return run.get(0).getObject();
}
 
开发者ID:TesisTarjetasMejorar,项目名称:TarjetasISIS,代码行数:12,代码来源:DominioFixturesService.java

示例9: installFixturesAndReturnFirst

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
@Action(
        restrictTo = RestrictTo.PROTOTYPING
)
@MemberOrder(sequence="20")
public Object installFixturesAndReturnFirst() {
    final List<FixtureResult> run = findFixtureScriptFor(DevUtilsDemoObjectsFixture.class).run(null);
    return run.get(0).getObject();
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-devutils,代码行数:9,代码来源:DevUtilsDemoObjectsFixturesService.java

示例10: installFixturesAndReturnFirst

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
@Action(
        restrictTo = RestrictTo.PROTOTYPING
)
@ActionLayout(
        cssClassFa="fa fa-refresh"
)
@MemberOrder(sequence = "499.10.2")
public Object installFixturesAndReturnFirst() {
    final List<FixtureResult> run = findFixtureScriptFor(KitchensinkSetupFixture.class).run(null);
    isInstalled = true;
    return run.get(0).getObject();
}
 
开发者ID:isisaddons,项目名称:isis-app-kitchensink,代码行数:13,代码来源:KitchensinkFixturesService.java

示例11: runFixtureScript

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
@Override
public List<FixtureResult> runFixtureScript(
        final FixtureScript fixtureScript,
        @Parameter(optionality = Optionality.OPTIONAL)
        @ParameterLayout(
            named = "Parameters",
            describedAs = "Script-specific parameters (if any).  The format depends on the script implementation (eg key=value, CSV, JSON, XML etc)",
            multiLine = 10
        )
        final String parameters) {
    return super.runFixtureScript(fixtureScript, parameters);
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:13,代码来源:SecurityModuleAppFixturesService.java

示例12: execute

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
@Override
protected void execute(ExecutionContext executionContext) {
    newClassPermissions(
            ApplicationPermissionRule.ALLOW,
            ApplicationPermissionMode.CHANGING,
            FixtureResult.class);
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:8,代码来源:IsisApplibFixtureResultsRoleAndPermissions.java

示例13: uploadSpreadsheet

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
public List<FixtureResult> uploadSpreadsheet(
        @ParameterLayout(named = "spreadsheet")
        final Blob file,
        @ParameterLayout(named = "ExcelFixture parameters")
        @Parameter(optionality = Optionality.OPTIONAL)
        final String parameters){
    FixtureScript script = new ExcelFixture(
            file,
            ExcelModuleDemoToDoItemRowHandler.class,
            ExcelModuleDemoProfessionalImp.class);
    return fixtureScripts.runFixtureScript(script, parameters);
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-excel,代码行数:13,代码来源:ExcelModuleDemoUploadService.java

示例14: runFixtureScript

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
@Action(
        restrictTo = RestrictTo.PROTOTYPING
)
@ActionLayout(
        cssClassFa = "fa-bolt",
        named = "Run Security Fixture Script"
)
public List<FixtureResult> runFixtureScript(FixtureScript fixtureScript, @ParameterLayout(
        named = "Parameters",
        describedAs = "Script-specific parameters (if any).  The format depends on the script implementation (eg key=value, CSV, JSON, XML etc)",
        multiLine = 10) @Optional String parameters) {
    return fixtureScripts.runFixtureScript(fixtureScript, parameters);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:14,代码来源:EstatioSecurityModuleFixturesMenu.java

示例15: execute

import org.apache.isis.applib.fixturescripts.FixtureResult; //导入依赖的package包/类
@Override
protected void execute(final ExecutionContext executionContext) {

    setExcelResource(Resources.getResource(getClass(), "OrderInvoiceImportForDemo.xlsx"));

    setMatcher(sheetName -> {
        if(sheetName.startsWith("OXFORD")) {
            return new WorksheetSpec(
                    rowFactoryFor(OrderInvoiceImportHandler.class, executionContext),
                    sheetName,
                    Mode.RELAXED);
        }
        else {
            return null;
        }
    });


    super.execute(executionContext);

    for (FixtureResult result : executionContext.getResults()){
        if (result.getClassName().equals(OrderInvoiceLine.class.getName())){
            OrderInvoiceLine line = (OrderInvoiceLine) result.getObject();
            OrderInvoiceLine._apply applyMixin = factoryService.mixin(OrderInvoiceLine._apply.class, line);
            if(applyMixin.disableAct() == null) {
                applyMixin.act();
            }
        }
    }
}
 
开发者ID:estatio,项目名称:estatio,代码行数:31,代码来源:OrderInvoiceImportForDemoXlsxFixture.java


注:本文中的org.apache.isis.applib.fixturescripts.FixtureResult类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。