• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java RemoteMethod类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: questionIsSkip

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
/**
 * Checks whether a question (at least one of its answers) is used as 
 * a skip for any section(form) or for another question. Used for 
 * notifying the user on modifying/deleting such question.
 * @param questionId the question Id
 * @return whether the question is used as skip
 * @throws IOException 
 * @throws InterruptedException
 */
@RemoteMethod
public String questionIsSkip(Long questionId) throws IOException, InterruptedException {

	if(qaManager.isSkip(questionId)){
		log.debug("******************deleteQuestionIsSkip()****** questionId: " + questionId + " -- is associated with skips.");
		return "yes";
	}
	else {
		log.debug("******************deleteQuestionIsSkip()****** questionId: " + questionId + " -- is not associated with skips.");
		return "no";
	}
}
 
开发者ID:NCIP,项目名称:edct-formbuilder,代码行数:22,代码来源:QuestionDwrController.java


示例17: descriptionIsLinked

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public String descriptionIsLinked(String formElementId, String description) {
	log.debug("In descriptionIsLinked method");
	List<String> descriptions = qaManager.getLinkedFormElementDescriptions(formElementId);
	if ( descriptions.contains( description )) return "yes";
	else return "no";
}
 
开发者ID:NCIP,项目名称:edct-formbuilder,代码行数:8,代码来源:QuestionDwrController.java


示例18: batchCheckBeforeDelete

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
public String batchCheckBeforeDelete(String[] feUuids) {
	HashSet<String> uniqueUuid = new HashSet<String>(Arrays.asList(feUuids));
	Set<String> skipsUuidsFrom = qaManager.getSkipsUuidsFrom(uniqueUuid);
	Set<String> linkedFormElementUuids = qaManager.getLinkedFormElementUuids(uniqueUuid);
	JSONObject jsonObject = new JSONObject();
	for (String uuid : uniqueUuid) {
		JSONObject jsonStatusesObject = new JSONObject();
		jsonStatusesObject.put("hasSkips", skipsUuidsFrom.contains(uuid));
		jsonStatusesObject.put("hasLinks", linkedFormElementUuids.contains(uuid));
		jsonObject.put(uuid, jsonStatusesObject);
	}
	return jsonObject.toString();
}
 
开发者ID:NCIP,项目名称:edct-formbuilder,代码行数:15,代码来源:QuestionDwrController.java


示例19: checkDuplicate

import org.directwebremoting.annotations.RemoteMethod; //导入依赖的package包/类
@RemoteMethod
//	public int checkDuplicate( String formId, long id ) {
	public int checkDuplicate( String formId, String uuid ) {

		try {
			if (qaManager.isQuestionAlreadyExistsInForm(Long.parseLong(formId), uuid)) {
				return ALLREADY_EXISTS_STATUS;
			}
		}catch (Exception ex) {
			ex.printStackTrace();
			return ERR_STATUS;
		}
		return OK_STATUS;
	}
 
开发者ID:NCIP,项目名称:edct-formbuilder,代码行数:15,代码来源:FormElementSearchController.java


示例20: importFormElements

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java FileUnderConstructionEntry类代码示例发布时间:2022-05-22
下一篇:
Java NaiveBayesModel类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap