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


Java RemoteMethod类代码示例

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


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

示例1: registerUser

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@Transactional
@RemoteMethod
@Override
public void registerUser(RegisterForm registerForm) {
	CustomerInfo customerInfo = new CustomerInfo();
	customerInfo.setFirstName(registerForm.getFirstName());
	customerInfo.setMiddleName(registerForm.getMiddleName());
	customerInfo.setLastName(registerForm.getLastName());
	customerInfo.setAge(registerForm.getAge());
	
	registerDao.setCustomerInfo(customerInfo);
	Login login = new Login();
	login.setCustomerInfo(customerInfo);
	login.setUsername(registerForm.getUsername());
	login.setPassword(registerForm.getPassword());
	registerDao.setLogin(login);

}
 
开发者ID:PacktPublishing,项目名称:Spring-MVC-Blueprints,代码行数:19,代码来源:RegisterServiceImpl.java

示例2: toggleLock

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public String toggleLock(final Long formId, final String currentLockStatus) {
	try {
		if(LOCKED_FORM.equalsIgnoreCase(currentLockStatus)) {
			formManager.unlockForm(formId);
		} else if(UNLOCKED_FORM.equalsIgnoreCase(currentLockStatus)) {
			formManager.lockForm(formId);
		} else if(ADMIN_UNLOCKED_FORM.equalsIgnoreCase(currentLockStatus)){
			formManager.unlockForm(formId);
		} else {			
			throw new RuntimeException("Unexpected lock status '" + currentLockStatus + "'");
		}
	} catch (Exception e) {
		return "Error: " + e.getMessage();
	}
	return OK_RESPONCE;
}
 
开发者ID:NCIP,项目名称:edct-formbuilder,代码行数:18,代码来源:FormListController.java

示例3: includeShowFoundQuestions

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public String includeShowFoundQuestions(int searchCriteria, String query, Long categoryId) throws IOException, InterruptedException {
	long begin = System.currentTimeMillis();
	StringBuilder url = new StringBuilder("/questionSearch");
	url.append("?crit=").append(searchCriteria);
	if(StringUtils.isNotBlank(query)) {
		url.append("&q=").append(URLEncoder.encode(query, "UTF-8"));
	}
	if(categoryId != null) {
		url.append("&categoryId=").append(categoryId);
	}
       String html = IOUtils.getURLContent(url.toString());
       long end = System.currentTimeMillis();
       long dif = end - begin;
       if (dif < DISPLAY_LOADER_IN_MILLIS) { //if loading data was less then 1s
       	Thread.sleep(DISPLAY_LOADER_IN_MILLIS - dif);
       }
       return html;
   }
 
开发者ID:NCIP,项目名称:edct-formbuilder,代码行数:20,代码来源:FormElementSearchController.java

示例4: obterPercentual

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
/**
 * Obtem o percentual de consultas realizadas
 * 
 * @param id
 *            pedido de valida��o
 * @return percentual
 */
@RemoteMethod
public Float obterPercentual(Long id) {

	// obtem um dao de pedido validacao
	IPedValidacaoDAO dao = facade.getRepositorio().getPedValidacaoDAO();

	// carrega o pedido de validacao
	PedValidacaoVO pedidoValidacao = dao.findById(id);

	// quantidade de registros do arquivo
	Integer quantidadeRegistros = pedidoValidacao.getQtdeRegistrosArq();

	if (quantidadeRegistros == null || quantidadeRegistros == 0) {
		return 0F;
	}

	// quantidade de pessoas no pedido de validacao
	Integer qtdPessoas = 0;
	
	Float percentual = 0F;
	
	List<PessoaVO> list = facade.getListaPessoaPorPedidoValidacao(pedidoValidacao);
	
	if (list != null) {
		qtdPessoas = list.size();
	}

	percentual = qtdPessoas.floatValue() / quantidadeRegistros.floatValue();

	percentual = percentual * 100;

	if (percentual > 100) {
		percentual = 100f;
	}

	return percentual;
}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:45,代码来源:PedidoValidacaoAjax.java

示例5: listarPorDesc

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public Dth[] listarPorDesc(final String descricao) throws Exception {
  final List<Dth> lista = this.dao.findByNamedQuery("Dth.findByDesc", descricao);
  if (lista != null && !lista.isEmpty()) {
    Collections.sort(lista);
  }
  return lista.toArray(new Dth[0]);
}
 
开发者ID:wagnerlopes,项目名称:esculapio,代码行数:9,代码来源:DthService.java

示例6: recuperar

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public Dth recuperar(final Integer id) throws Exception {
  if (id == null) {
    throw new IllegalArgumentException("ID do DTH n�o foi informado");
  }
  return this.dao.findById(id);
}
 
开发者ID:wagnerlopes,项目名称:esculapio,代码行数:8,代码来源:DthService.java

示例7: listarOcsPM

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public OcsPm[] listarOcsPM(final Integer id, final String tipo) throws Exception {
  List<OcsPm> lista = null;
  if ("ocs".equals(tipo)){
    lista = this.dao.findByNamedQuery("OcsPm.findByOCS", id);
  }
  else {
    lista = this.dao.findByNamedQuery("OcsPm.findByPM", id);
  }
  Collections.sort(lista);
  return lista.toArray(new OcsPm[0]);
}
 
开发者ID:wagnerlopes,项目名称:esculapio,代码行数:13,代码来源:OcsPmService.java

示例8: recuperar

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public OcsPm recuperar(final Integer id) throws Exception {
  if (id == null) {
    throw new IllegalArgumentException("ID do OCS/PM n�o foi informado");
  }
  return this.dao.findById(id);
}
 
开发者ID:wagnerlopes,项目名称:esculapio,代码行数:8,代码来源:OcsPmService.java

示例9: getAllLibraryForms

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public String getAllLibraryForms()throws IOException, InterruptedException
{
	long begin = System.currentTimeMillis();
	StringBuilder url = new StringBuilder("/allLibraryForms");
       String html = IOUtils.getURLContent(url.toString());
       long end = System.currentTimeMillis();
       long dif = end - begin;
       if (dif < DISPLAY_LOADER_IN_MILLIS) { //if loading data was less then 1s
       	Thread.sleep(DISPLAY_LOADER_IN_MILLIS - dif);
       }
       return html;
}
 
开发者ID:NCIP,项目名称:edct-formbuilder,代码行数:14,代码来源:FormSearchController.java

示例10: searchForms

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public String searchForms(String query) throws IOException, InterruptedException
{
	long begin = System.currentTimeMillis();
	StringBuilder url = new StringBuilder("/formSearch");
	url.append("?query=").append(IOUtils.convertStringToStringQuery(query));
       String html = IOUtils.getURLContent(url.toString());
       long end = System.currentTimeMillis();
       long dif = end - begin;
       if (dif < DISPLAY_LOADER_IN_MILLIS) { //if loading data was less then 1s
       	Thread.sleep(DISPLAY_LOADER_IN_MILLIS - dif);
       }
       return html;
}
 
开发者ID:NCIP,项目名称:edct-formbuilder,代码行数:15,代码来源:FormSearchController.java

示例11: importForms

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public int importForms(String moduleId, String[] formSet){
	try {
		formManager.importForms(Long.parseLong(moduleId), formSet);
	} catch (Exception ex) {
		ex.printStackTrace();
		return ERR_STATUS;
	}
	return OK_STATUS;
}
 
开发者ID:NCIP,项目名称:edct-formbuilder,代码行数:11,代码来源:FormSearchController.java

示例12: importFormQuestions

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public int importFormQuestions(String[] formSet, String formId){	
	try{
		for (String formUuid : formSet) {			
			formManager.getFormQuestions(formUuid,formId);	
		}			
	} catch (Exception ex) {
		ex.printStackTrace();
		return ERR_STATUS;
	}
	return OK_STATUS;
}
 
开发者ID:NCIP,项目名称:edct-formbuilder,代码行数:13,代码来源:FormSearchController.java

示例13: answerValueIsSkip

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public String answerValueIsSkip(String permAnswerValueId, Long formId) throws IOException, InterruptedException {

	if(qaManager.isAnswerValueSkip(permAnswerValueId, formId)){
		return "yes";
	}

	log.info("******************deleteAnswerValueIsSkip()****** permAnswerValueId: " + permAnswerValueId);

	return "no";
}
 
开发者ID:NCIP,项目名称:edct-formbuilder,代码行数:12,代码来源:QuestionDwrController.java

示例14: answerValueIsSkipTable

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public String answerValueIsSkipTable(String [] permAnswerValueIdArray, Long formId) throws IOException, InterruptedException {

	for(String pav: permAnswerValueIdArray){
		log.info("******************answerValueIsSkipTable()****** permAnswerValueId: " + pav);
		if(qaManager.isAnswerValueSkip(pav, formId)){
			return "yes";
		}
	}

	return "no";
}
 
开发者ID:NCIP,项目名称:edct-formbuilder,代码行数:13,代码来源:QuestionDwrController.java

示例15: answerValueIsSkipTableRow

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public String answerValueIsSkipTableRow(Long answerId) throws IOException, InterruptedException {

	if(qaManager.isAnswerValueSkipTableRow(answerId)){
		return "yes";
	}

	log.info("******************answerValueIsSkipTableRow()****** answerId: " + answerId);

	return "no";
}
 
开发者ID:NCIP,项目名称:edct-formbuilder,代码行数:12,代码来源:QuestionDwrController.java


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