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


Java ActionSemantics类代码示例

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


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

示例1: imprimirFactura

import org.apache.isis.applib.annotation.ActionSemantics; //导入依赖的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; //导入依赖的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; //导入依赖的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; //导入依赖的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; //导入依赖的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: listAll

import org.apache.isis.applib.annotation.ActionSemantics; //导入依赖的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

示例7: listar

import org.apache.isis.applib.annotation.ActionSemantics; //导入依赖的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

示例8: listarEncargadosAlta

import org.apache.isis.applib.annotation.ActionSemantics; //导入依赖的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

示例9: listarEncargadosTodos

import org.apache.isis.applib.annotation.ActionSemantics; //导入依赖的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

示例10: listarCocinerosAlta

import org.apache.isis.applib.annotation.ActionSemantics; //导入依赖的package包/类
/**
 * Obtiene una lista de Cocineros de alta
 * @see dom.persona.Persona.getBaja()
 * @return List<Cocinero>
 */
@Named("Cocineros")
@MemberOrder(name = "Empleados", sequence = "10.2")
@ActionSemantics(Of.SAFE)
public List<Cocinero> listarCocinerosAlta() {
	return allMatches(Cocinero.class, new Predicate<Cocinero>() {

		@Override
		public boolean apply(Cocinero input) {
			// TODO Auto-generated method stub
			return input.getBaja() ? false : true;
		}
	});
}
 
开发者ID:resto-tesis,项目名称:resto-tesis,代码行数:19,代码来源:CocineroServicio.java

示例11: listarCocinerosTodos

import org.apache.isis.applib.annotation.ActionSemantics; //导入依赖的package包/类
/**
 * Obtiene una lista de todos los Cocinero
 * @return listaCocinero List<Cocinero>
 */
@Named("Cocineros")
@MemberOrder(name = "Empleados", sequence = "10.2")
@ActionSemantics(Of.SAFE)
public List<Cocinero> listarCocinerosTodos() {
	final List<Cocinero> listaCocinero = allInstances(Cocinero.class);
	return listaCocinero;
}
 
开发者ID:resto-tesis,项目名称:resto-tesis,代码行数:12,代码来源:CocineroServicio.java

示例12: listarMesasTodas

import org.apache.isis.applib.annotation.ActionSemantics; //导入依赖的package包/类
/**
 * Permite listar todas las Mesas
 * @return List<Mesa>
 */
@Named("Listar")
@ActionSemantics(Of.SAFE)
@MemberOrder(sequence = "2")
public List<Mesa> listarMesasTodas() {
	return allInstances(Mesa.class);
}
 
开发者ID:resto-tesis,项目名称:resto-tesis,代码行数:11,代码来源:MesaServicio.java

示例13: listarClientesAlta

import org.apache.isis.applib.annotation.ActionSemantics; //导入依赖的package包/类
/**
 * Obtiene una lista de clientes Activos
 * 
 * @return List<Cliente>
 */
@Named("Listar")
@ActionSemantics(Of.SAFE)
@MemberOrder(sequence = "2")
public List<Cliente> listarClientesAlta() {
	return allMatches(Cliente.class, new Predicate<Cliente>() {

		@Override
		public boolean apply(Cliente input) {
			// TODO Auto-generated method stub
			return input.getBaja() ? false : true;
		}
	});
}
 
开发者ID:resto-tesis,项目名称:resto-tesis,代码行数:19,代码来源:ClienteServicio.java

示例14: listarClientesTodos

import org.apache.isis.applib.annotation.ActionSemantics; //导入依赖的package包/类
/**
 * Obtiene una lista de todos los clientes
 * 
 * @return listaDeClientes List<Cliente>
 */
@Named("Listar Todos")
@ActionSemantics(Of.SAFE)
@MemberOrder(sequence = "2")
public List<Cliente> listarClientesTodos() {
	final List<Cliente> listaDeClientes = allInstances(Cliente.class);
	return listaDeClientes;
}
 
开发者ID:resto-tesis,项目名称:resto-tesis,代码行数:13,代码来源:ClienteServicio.java

示例15: listarMozosAlta

import org.apache.isis.applib.annotation.ActionSemantics; //导入依赖的package包/类
/**
 * Obtiene una lista de Mozos de alta
 * @see dom.persona.Persona.getBaja()
 * @return List<Mozo>
 */
@Named("Mozos")
@ActionSemantics(Of.SAFE)
@MemberOrder(name = "Empleados", sequence = "10.1")
public List<Mozo> listarMozosAlta() {
	return allMatches(Mozo.class, new Predicate<Mozo>() {

		@Override
		public boolean apply(Mozo input) {
			// TODO Auto-generated method stub
			return input.getBaja() ? false : true;
		}
	});
}
 
开发者ID:resto-tesis,项目名称:resto-tesis,代码行数:19,代码来源:MozoServicio.java


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