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


Java RestrictTo.PROTOTYPING属性代码示例

本文整理汇总了Java中org.apache.isis.applib.annotation.RestrictTo.PROTOTYPING属性的典型用法代码示例。如果您正苦于以下问题:Java RestrictTo.PROTOTYPING属性的具体用法?Java RestrictTo.PROTOTYPING怎么用?Java RestrictTo.PROTOTYPING使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.isis.applib.annotation.RestrictTo的用法示例。


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

示例1: runFixtureScript

@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,代码行数:18,代码来源:KitchensinkFixturesService.java

示例2: listAuditEntries

@Action(
        semantics = SemanticsOf.SAFE,
        restrictTo = RestrictTo.PROTOTYPING
)
@ActionLayout(
        named = "List Audit Entries (demo)"
)
public List<AuditEntry> listAuditEntries(
        @ParameterLayout(named = "From")
        @Parameter(optionality = Optionality.OPTIONAL)
        final LocalDate from,
        @ParameterLayout(named = "To")
        @Parameter(optionality = Optionality.OPTIONAL)
        final LocalDate to) {
    return auditingServiceRepository.findByFromAndTo(from, to);
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-audit,代码行数:16,代码来源:AuditEntries.java

示例3: demoException

@Action(
        semantics = SemanticsOf.SAFE,
        restrictTo = RestrictTo.PROTOTYPING
)
public void demoException(
        final DemoExceptionType type) {
    switch(type) {
    case NON_RECOVERABLE_EXCEPTION:
        throw new NonRecoverableException("Demo throwing " + type.name());
    case RECOVERABLE_EXCEPTION:
        throw new RecoverableException("Demo throwing " + type.name());
    case RECOVERABLE_EXCEPTION_AUTO_ESCALATED:
        try {
            // this will trigger an exception (because category cannot be null), causing the xactn to be aborted
            setCategory(null);
            transactionService.flushTransaction();
        } catch(final Exception e) {
            // it's a programming mistake to throw only a recoverable exception here, because of the xactn's state.
            // the framework should instead auto-escalate this to a non-recoverable exception
            throw new RecoverableException("Demo throwing " + type.name(), e);
        }
    }
}
 
开发者ID:isisaddons,项目名称:isis-app-todoapp,代码行数:23,代码来源:ToDoItem.java

示例4: installFixturesAndReturnFirstRole

@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,代码行数:16,代码来源:SecurityModuleAppFixturesService.java

示例5: updateAttribute

@Action(
        semantics = SemanticsOf.IDEMPOTENT,
        restrictTo = RestrictTo.PROTOTYPING
)
public Invoice updateAttribute(
        final InvoiceAttributeName name,
        @Parameter(maxLength = NotesType.Meta.MAX_LEN)
        @ParameterLayout(multiLine = Invoice.DescriptionType.Meta.MULTI_LINE) final String value,
        InvoiceAttributeAction action
) {
    final InvoiceAttribute invoiceAttribute = invoiceAttributeRepository.findByInvoiceAndName(this, name);
    if (invoiceAttribute == null) {
        invoiceAttributeRepository.newAttribute(this, name, value, action.isOverride());
    } else {
        if (action.isForceful())
            invoiceAttribute.setValue(value);
        invoiceAttribute.setOverridden(action.isOverride());
    }
    return this;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:20,代码来源:Invoice.java

示例6: createRetroInvoicesForLease

@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,代码行数:22,代码来源:EstatioFixtureScripts.java

示例7: impersonate

@Action(restrictTo = RestrictTo.PROTOTYPING)
@MemberOrder(sequence = "1")
public void impersonate(
        final ApplicationUser applicationUser,
        @Nullable
        final List<ApplicationRole> applicationRoleList) {

    if(estatioUserService.isImpersonating()) {
        stopImpersonating();
    }

    final List<String> roleNames = asRoleNames(applicationRoleList);

    estatioUserService.setUser(applicationUser.getUsername(), roleNames);

    messageService.informUser("Now impersonating " + applicationUser.getName());

}
 
开发者ID:estatio,项目名称:estatio,代码行数:18,代码来源:EstatioImpersonateMenu.java

示例8: findBadCommandTargets

@Action(semantics = SemanticsOf.SAFE, restrictTo = RestrictTo.PROTOTYPING)
public List<BadTarget> findBadCommandTargets() {

    Set<String> badObjectTypes = Sets.newTreeSet();

    List<Map<String, Object>> rows = isisJdoSupport
            .executeSql("select distinct(substring(target, 1, charindex(':', target)-1)) as objectType from isiscommand.Command order by 1");
    for (Map<String, Object> row : rows) {
        String targetStr = (String) row.get("objectType");
        addIfBad(badObjectTypes, targetStr);
    }

    return Lists.newArrayList(
            FluentIterable.from(badObjectTypes)
                          .transform(x -> new BadTarget(x))
                          .toList());
}
 
开发者ID:estatio,项目名称:estatio,代码行数:17,代码来源:BadCommandTargets.java

示例9: ordenar

@Action(semantics = SemanticsOf.SAFE, restrictTo = RestrictTo.PROTOTYPING)
@ActionLayout(cssClassFa = "fa-birthday-cake", named = "Cumpleaños Clientes")
public List<ClientesCumpleañosViewModel> cumpleaños() {
	final List<Cliente> clientes = clienteRepository.listarActivos();
	Iterator<Cliente> it = clientes.iterator();
	while (it.hasNext()) {
		Cliente item = it.next();
		if (item.getClienteFechaNacimiento() == null)
			it.remove();
	}
	List<ClientesCumpleañosViewModel> listaClientes = Lists.newArrayList(Iterables.transform(clientes, ordenar()));
	Collections.sort(listaClientes);
	return listaClientes;
}
 
开发者ID:leandrogonqn,项目名称:Proyecto2017Seguros,代码行数:14,代码来源:ClientesPorCumpleaños.java

示例10: goToDocs

@ActionLayout(
        cssClassFa = "fa-external-link"
)
@Action(
        semantics = SemanticsOf.SAFE,
        restrictTo = RestrictTo.PROTOTYPING
)
@MemberOrder(sequence="500.30.1")
public URL goToDocs(final ExternalLink link) throws MalformedURLException {
    return link.open();
}
 
开发者ID:incodehq,项目名称:ecpcrm,代码行数:11,代码来源:ExternalLinksService.java

示例11: recreateSimpleObjectsThenOpenDashboard

@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,代码行数:13,代码来源:EcpCrmPrototypingExtensions.java

示例12: recreateToDoItemsThenOpenDashboard

@Action(
        restrictTo = RestrictTo.PROTOTYPING
)
@ActionLayout(
    cssClassFa="fa fa-refresh"
)
@MemberOrder(sequence = "500.10.2")
public Object recreateToDoItemsThenOpenDashboard() {
    final FixtureScript fs = fixtureScripts.findFixtureScriptFor(
            RecreateToDoItemsForCurrentUser.class);
    fs.run(null);
    return toDoAppDashboardService.lookup();
}
 
开发者ID:isisaddons,项目名称:isis-app-todoapp,代码行数:13,代码来源:ToDoAppPrototypingExtensions.java

示例13: subscriberBehaviour

/**
 * To demo/test what occurs if a subscriber that might veto an event.
 */
@Action(
        semantics = SemanticsOf.IDEMPOTENT,
        restrictTo = RestrictTo.PROTOTYPING
)
@ActionLayout(
        named="Set subscriber behaviour",
        cssClassFa="phone"
)
@MemberOrder(sequence = "500.20.1")
public void subscriberBehaviour(
        final DemoBehaviour behaviour) {
    applicationSettingsService.set(DemoBehaviour.class, behaviour);
    container.informUser("Subscriber behaviour set to: " + behaviour);
}
 
开发者ID:isisaddons,项目名称:isis-app-todoapp,代码行数:17,代码来源:DemoDomainEventSubscriptions.java

示例14:

@Action(
        semantics = SemanticsOf.SAFE,
        restrictTo = RestrictTo.PROTOTYPING
)
@ActionLayout(
        cssClassFa = "fa-external-link",
        named = "As DTO v1.1"
)
@MemberOrder(sequence = "2")
public ToDoItemV1_1 $$() {
    return contentMappingServiceForToDoItem.newToDoItemV1_1(toDoItem);
}
 
开发者ID:isisaddons,项目名称:isis-app-todoapp,代码行数:12,代码来源:ToDoItem_asV1_1.java

示例15: openSourceCodeOnGithub

@Action(
        semantics = SemanticsOf.SAFE,
        restrictTo = RestrictTo.PROTOTYPING
)
public URL openSourceCodeOnGithub() throws MalformedURLException {
    return new URL("https://github.com/isisaddons/isis-app-todoapp/blob/master/dom/src/main/java/todoapp/dom/todoitem/ToDoItem.java");
}
 
开发者ID:isisaddons,项目名称:isis-app-todoapp,代码行数:7,代码来源:ToDoItem.java


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