本文整理汇总了Java中org.apache.isis.applib.annotation.ActionSemantics.Of类的典型用法代码示例。如果您正苦于以下问题:Java Of类的具体用法?Java Of怎么用?Java Of使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Of类属于org.apache.isis.applib.annotation.ActionSemantics包,在下文中一共展示了Of类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: imprimirFactura
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
@NotContributed(NotContributed.As.ASSOCIATION)
@NotInServiceMenu
@ActionSemantics(Of.SAFE)
@MemberOrder(sequence = "10")
public Blob imprimirFactura(final Factura _factura) throws Exception {
try (PDDocument pdfDocument = cargarPlantilla(_factura)) {
final ByteArrayOutputStream target = new ByteArrayOutputStream();
pdfDocument.save(target);
final String name = "Factura-" + _factura.getNumero() + ".pdf";
final String mimeType = "application/pdf";
final byte[] bytes = target.toByteArray();
return new Blob(name, mimeType, bytes);
}
}
开发者ID:resto-tesis,项目名称:resto-tesis,代码行数:19,代码来源:FacturaServicio.java
示例2: listarMesasAsignadas
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
/**
* Permite listar mesas asignadas a los mozos, si es que estos poseen
* @see dom.persona.Persona.getUsuario()
* @see dom.usuario.Usuario.getNombre()
* @return List<Mesa>
*/
@Named("Listar")
@ActionSemantics(Of.SAFE)
@MemberOrder(sequence = "2")
public List<Mesa> listarMesasAsignadas() {
final Mozo mozo = uniqueMatch(Mozo.class, new Predicate<Mozo>() {
@Override
public boolean apply(Mozo _mozo) {
// TODO Auto-generated method stub
return _mozo.getUsuario().getNombre()
.equals(getUser().getName());
}
});
if (mozo == null) {
informUser("No tiene mesas asignadas.");
return null;
}
return mozo.getListamesas();
}
开发者ID:resto-tesis,项目名称:resto-tesis,代码行数:26,代码来源:MesaServicio.java
示例3: listarOfertasAlta
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
/**
* Obtiene una lista de Ofertas que se encuentren de alta
* @return List<Oferta>
*/
@Named("Listar")
@ActionSemantics(Of.SAFE)
@MemberOrder(sequence = "2")
public List<Oferta> listarOfertasAlta() {
return allMatches(Oferta.class, new Predicate<Oferta>() {
@Override
public boolean apply(Oferta input) {
// TODO Auto-generated method stub
return (!input.getBaja())
&& input.getFechaInicio().before(new Date())
&& input.getCaducidad().after(new Date()) ? true
: false;
}
});
}
开发者ID:resto-tesis,项目名称:resto-tesis,代码行数:21,代码来源:OfertaServicio.java
示例4: downloadCustomerConfirmation
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
@NotContributed(NotContributed.As.ASSOCIATION) // ie contributed as action
@NotInServiceMenu
@ActionSemantics(Of.SAFE)
@MemberOrder(sequence = "10")
public Blob downloadCustomerConfirmation(
final Order order) throws Exception {
try (PDDocument pdfDocument = loadAndPopulateTemplate(order)) {
final ByteArrayOutputStream target = new ByteArrayOutputStream();
pdfDocument.save(target);
final String name = "customerConfirmation-" + order.getNumber() + ".pdf";
final String mimeType = "application/pdf";
final byte[] bytes = target.toByteArray();
return new Blob(name, mimeType, bytes);
}
}
开发者ID:martin-g,项目名称:isis-module-pdf,代码行数:20,代码来源:CustomerConfirmation.java
示例5: recentChanges
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
/**
* Depending on which services are available, returns either a list of {@link CommandJdo command}s that have
* caused a change in the domain object or a list of {@link AuditEntryJdo audit entries} capturing the 'effect'
* of that change.
*
* <p>
* If {@link CommandJdo command}s are returned, then the corresponding {@link AuditEntryJdo audit entries} are
* available from each command.
*/
@NotInServiceMenu
@ActionSemantics(Of.SAFE)
@MemberOrder(sequence="30")
public List<? extends DomainChangeJdoAbstract> recentChanges (
final Object targetDomainObject,
final @Optional @Named("From") LocalDate from,
final @Optional @Named("To") LocalDate to) {
final Bookmark targetBookmark = bookmarkService.bookmarkFor(targetDomainObject);
final List<DomainChangeJdoAbstract> changes = Lists.newArrayList();
if(commandServiceRepository != null) {
changes.addAll(commandServiceRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
}
if(publishingServiceRepository != null) {
changes.addAll(publishingServiceRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
}
changes.addAll(auditingServiceRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
Collections.sort(changes, DomainChangeJdoAbstract.compareByTimestampDescThenType());
return changes;
}
开发者ID:IUSISProyecto,项目名称:IUSIS,代码行数:29,代码来源:AdminContributions.java
示例6: putCharge
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
@ActionSemantics(Of.IDEMPOTENT)
public void putCharge(
@Named("atPath") final String atPath,
@Named("reference") final String reference,
@Named("name") final String name,
@Named("description") @Optional final String description,
@Named("taxReference") final String taxReference,
@Named("sortOrder") @Optional final String sortOrder,
@Named("chargeGroupReference") final String chargeGroupReference,
@Named("chargeGroupName") final String chargeGroupName,
@Named("externalReference") @Optional final String externalReference) {
final ChargeGroup chargeGroup = fetchOrCreateChargeGroup(chargeGroupReference, chargeGroupName);
final ApplicationTenancy applicationTenancy = applicationTenancies.findTenancyByPath(atPath);
final Tax tax = taxes.findOrCreate(taxReference, taxReference, applicationTenancy);
final Charge charge = charges.newCharge(applicationTenancy, reference, name, description, tax, chargeGroup);
charge.setExternalReference(externalReference);
charge.setSortOrder(sortOrder);
}
开发者ID:estatio,项目名称:estatio,代码行数:23,代码来源:Api.java
示例7: putApplicationTenancy
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
@ActionSemantics(Of.IDEMPOTENT)
public void putApplicationTenancy(
@Named("path") final String path,
@Named("name") final String name) {
ApplicationTenancy applicationTenancy = applicationTenancies.findTenancyByPath(path);
if (applicationTenancy == null) {
final ApplicationTenancyLevel parentLevel = ApplicationTenancyLevel.of(path).parent();
final ApplicationTenancy parentApplicationTenancy =
parentLevel != null
? applicationTenancies.findTenancyByPath(parentLevel.getPath())
: null;
applicationTenancy = applicationTenancies.newTenancy(name, path, parentApplicationTenancy);
}
applicationTenancy.setName(name);
// TODO: EST-467, to remove
getContainer().flush();
}
开发者ID:estatio,项目名称:estatio,代码行数:19,代码来源:Api.java
示例8: putTax
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
@ActionSemantics(Of.IDEMPOTENT)
public void putTax(
@Named("atPath") final String atPath,
@Named("reference") final String reference,
@Named("name") final String name,
@Named("description") final String description,
@Named("externalReference") @Optional final String externalReference,
@Named("ratePercentage") final BigDecimal percentage,
@Named("rateStartDate") final LocalDate startDate,
@Named("rateExternalReference") @Optional final String rateExternalReference) {
final ApplicationTenancy applicationTenancy = applicationTenancies.findTenancyByPath(atPath);
final Tax tax = taxes.findOrCreate(reference, name, applicationTenancy);
tax.setExternalReference(externalReference);
tax.setDescription(description);
final TaxRate rate = tax.newRate(startDate, percentage);
rate.setExternalReference(rateExternalReference);
}
开发者ID:estatio,项目名称:estatio,代码行数:20,代码来源:Api.java
示例9: putPerson
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
@ActionSemantics(Of.IDEMPOTENT)
public void putPerson(
@Named("atPath") final String atPath,
@Named("reference") final String reference,
@Named("initials") @Optional final String initials,
@Named("firstName") final String firstName,
@Named("lastName") final String lastName,
@Named("Gender") @Optional final String gender) {
final ApplicationTenancy applicationTenancy = applicationTenancies.findTenancyByPath(atPath);
Person person = (Person) parties.findPartyByReference(reference);
if (person == null) {
person = persons.newPerson(
reference,
initials,
firstName,
lastName,
gender == null ? PersonGenderType.UNKNOWN : PersonGenderType.valueOf(gender), applicationTenancy);
}
person.setApplicationTenancyPath(applicationTenancy.getPath());
person.setFirstName(firstName);
person.setLastName(lastName);
}
开发者ID:estatio,项目名称:estatio,代码行数:23,代码来源:Api.java
示例10: putOrganisation
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
@ActionSemantics(Of.IDEMPOTENT)
public void putOrganisation(
@Named("atPath") final String atPath,
@Named("reference") final String reference,
@Named("name") final String name,
@Named("vatCode") @Optional final String vatCode,
@Named("fiscalCode") @Optional final String fiscalCode) {
final ApplicationTenancy applicationTenancy = applicationTenancies.findTenancyByPath(atPath);
Organisation org = (Organisation) parties.findPartyByReferenceOrNull(reference);
if (org == null) {
org = organisations.newOrganisation(reference, name, applicationTenancy);
}
org.setApplicationTenancyPath(atPath);
org.setName(name);
org.setFiscalCode(fiscalCode);
org.setVatCode(vatCode);
}
开发者ID:estatio,项目名称:estatio,代码行数:20,代码来源:Api.java
示例11: putPropertyPostalAddress
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
@ActionSemantics(Of.IDEMPOTENT)
public void putPropertyPostalAddress(
@Named("propertyReference") final String propertyReference,
@Named("address1") @Optional final String address1,
@Named("address2") @Optional final String address2,
@Named("city") final String city,
@Named("postalCode") @Optional final String postalCode,
@Named("stateCode") @Optional final String stateCode,
@Named("countryCode") final String countryCode) {
final Property property = properties.findPropertyByReferenceElseNull(propertyReference);
if (property == null) {
throw new ApplicationException(String.format("Property with reference %s not found.", propertyReference));
}
final CommunicationChannel comm = communicationChannelContributions.findCommunicationChannelForType(property, null);
if (comm == null) {
communicationChannelContributions.newPostal(property, CommunicationChannelType.POSTAL_ADDRESS, countries.findCountry(countryCode), states.findState(stateCode), address1, address2, null, postalCode, city);
}
}
开发者ID:estatio,项目名称:estatio,代码行数:19,代码来源:Api.java
示例12: putPartyEmailAddress
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
@ActionSemantics(Of.IDEMPOTENT)
public void putPartyEmailAddress(
@Named("reference") final String partyReference,
@Named("emailAddress") final String emailAddress,
@Named("legal") @Optional final Boolean legal
) {
final Party party = fetchParty(partyReference);
CommunicationChannel comm = emailAddresses.findByEmailAddress(party, emailAddress);
if (comm == null) {
comm = communicationChannels.newEmail(party, CommunicationChannelType.EMAIL_ADDRESS, emailAddress);
if (legal != null) {
comm.setLegal(legal);
}
}
}
开发者ID:estatio,项目名称:estatio,代码行数:18,代码来源:Api.java
示例13: putLease
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
@ActionSemantics(Of.IDEMPOTENT)
public void putLease(
@Named("reference") final String reference,
@Named("name") final String name,
@Named("tenantReference") final String tenantReference,
@Named("landlordReference") final String landlordReference,
@Named("type") final String type,
@Named("startDate") @Optional final LocalDate startDate,
@Named("endDate") @Optional final LocalDate endDate,
@Named("tenancyStartDate") @Optional final LocalDate tenancyStartDate,
@Named("tenancyEndDate") @Optional final LocalDate tenancyEndDate,
@Named("propertyReference") @Optional final String propertyReference
) {
final Party tenant = fetchParty(tenantReference);
final Party landlord = fetchParty(landlordReference);
Lease lease = leases.findLeaseByReferenceElseNull(reference);
final LeaseType leaseType = leaseTypes.findOrCreate(type, null);
final Property property = fetchProperty(propertyReference, null, false);
if (lease == null) {
lease = leases.newLease(property.getApplicationTenancy(), reference, name, leaseType, startDate, endDate, tenancyStartDate, tenancyEndDate, landlord, tenant);
}
lease.setTenancyStartDate(tenancyStartDate);
lease.setTenancyEndDate(tenancyEndDate);
}
开发者ID:estatio,项目名称:estatio,代码行数:26,代码来源:Api.java
示例14: putLeaseTermForTurnoverRent
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
@ActionSemantics(Of.IDEMPOTENT)
public void putLeaseTermForTurnoverRent(
// start generic fields
@Named("leaseReference") final String leaseReference,
@Named("tenantReference") final String tenantReference,
@Named("unitReference") @Optional final String unitReference,
@Named("itemSequence") final BigInteger itemSequence,
@Named("itemType") final String itemType,
@Named("itemStartDate") final LocalDate itemStartDate,
@Named("sequence") final BigInteger sequence,
@Named("startDate") @Optional final LocalDate startDate,
@Named("endDate") @Optional final LocalDate endDate,
@Named("status") @Optional final String status,
// end generic fields
@Named("turnoverRentRule") @Optional final String turnoverRentRule,
@Named("auditedTurnover") @Optional final BigDecimal auditedTurnover,
@Named("auditedTurnoverRent") @Optional final BigDecimal auditedTurnoverRent) {
final LeaseTermForTurnoverRent term = (LeaseTermForTurnoverRent) putLeaseTerm(leaseReference, unitReference, itemSequence, itemType, itemStartDate, startDate, endDate, sequence, status);
if (term != null) {
term.setTurnoverRentRule(turnoverRentRule);
term.setAuditedTurnover(auditedTurnover);
term.setAuditedTurnoverRent(auditedTurnoverRent);
}
}
开发者ID:estatio,项目名称:estatio,代码行数:25,代码来源:Api.java
示例15: putLeaseTermForServiceCharge
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
@ActionSemantics(Of.IDEMPOTENT)
public void putLeaseTermForServiceCharge(
// start generic fields
@Named("leaseReference") final String leaseReference,
@Named("tenantReference") final String tenantReference,
@Named("unitReference") @Optional final String unitReference,
@Named("itemSequence") final BigInteger itemSequence,
@Named("itemType") final String itemType,
@Named("itemStartDate") final LocalDate itemStartDate,
@Named("sequence") final BigInteger sequence,
@Named("startDate") @Optional final LocalDate startDate,
@Named("endDate") @Optional final LocalDate endDate,
@Named("status") @Optional final String status,
// end generic fields
@Named("auditedValue") @Optional final BigDecimal auditedValue,
@Named("budgetedValue") @Optional final BigDecimal budgetedValue) {
final LeaseTermForServiceCharge term = (LeaseTermForServiceCharge) putLeaseTerm(leaseReference, unitReference, itemSequence, itemType, itemStartDate, startDate, endDate, sequence, status);
if (term != null) {
term.setAuditedValue(auditedValue);
term.setBudgetedValue(budgetedValue);
}
}
开发者ID:estatio,项目名称:estatio,代码行数:23,代码来源:Api.java
示例16: putBreakOption
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
@ActionSemantics(Of.IDEMPOTENT)
public void putBreakOption(
@Named("leaseReference") final String leaseReference,
@Named("breakType") final String breakTypeStr,
@Named("breakExcerciseType") final String breakExcerciseTypeStr,
@Named("breakDate") final LocalDate breakDate,
@Named("notificationDate") final LocalDate notificationDate,
@Named("notificationPeriod") @Optional String notificationPeriodStr,
@Named("description") @Optional final String description
) {
final Lease lease = fetchLease(leaseReference);
final BreakType breakType = BreakType.valueOf(breakTypeStr);
final BreakExerciseType breakExerciseType = BreakExerciseType.valueOf(breakExcerciseTypeStr);
if (notificationDate != null) {
final Period period = new Period(notificationDate, breakDate);
notificationPeriodStr = JodaPeriodUtils.asSimpleString(period);
}
wrapperFactory.wrap(breakOptions.newBreakOption(lease, breakDate, notificationPeriodStr, breakType, breakExerciseType, description));
}
开发者ID:estatio,项目名称:estatio,代码行数:21,代码来源:Api.java
示例17: listAll
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
@Bookmarkable
@ActionSemantics(Of.SAFE)
@MemberOrder(sequence = "1")
@Prototype
public List<Owner> listAll() {
return container.allInstances(Owner.class);
}
开发者ID:danhaywood,项目名称:isis-app-petclinic,代码行数:8,代码来源:Owners.java
示例18: listar
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
/**
* Obtiene una lista de todas las facturas
*
* @return List<Factura> lista
*/
@Named("Listar")
@ActionSemantics(Of.SAFE)
@MemberOrder(sequence = "60")
public List<Factura> listar() {
final List<Factura> lista = allInstances(Factura.class);
return lista;
}
开发者ID:resto-tesis,项目名称:resto-tesis,代码行数:13,代码来源:FacturaServicio.java
示例19: listarEncargadosAlta
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
/**
* Obtiene una lista de Cocineros de alta
* @see dom.persona.Persona.getBaja()
* @return List<Encargado>
*/
@Named("Encargados")
@ActionSemantics(Of.SAFE)
@MemberOrder(name = "Empleados", sequence = "10.3")
public List<Encargado> listarEncargadosAlta() {
return allMatches(Encargado.class, new Predicate<Encargado>() {
@Override
public boolean apply(Encargado input) {
// TODO Auto-generated method stub
return input.getBaja() ? false : true;
}
});
}
开发者ID:resto-tesis,项目名称:resto-tesis,代码行数:19,代码来源:EncargadoServicio.java
示例20: listarEncargadosTodos
import org.apache.isis.applib.annotation.ActionSemantics.Of; //导入依赖的package包/类
/**
* Obtiene una lista de todos los Encargados
* @return listaencargados List<Encargado>
*/
@Named("Encargados")
@ActionSemantics(Of.SAFE)
@MemberOrder(name = "Empleados", sequence = "10.3")
public List<Encargado> listarEncargadosTodos() {
final List<Encargado> listaencargados = allInstances(Encargado.class);
return listaencargados;
}
开发者ID:resto-tesis,项目名称:resto-tesis,代码行数:12,代码来源:EncargadoServicio.java
注:本文中的org.apache.isis.applib.annotation.ActionSemantics.Of类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论