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


Java Action.SUCCESS属性代码示例

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


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

示例1: doImport

/**
    * Run import if not in progress or already done, otherwise return Wait view
    * 
    * @return 'success'
    * @throws Exception
    *                 When errors occurred
    */
   public String doImport()  {
boolean alreadyDone;
try {
    alreadyDone = isImportAlreadyDone();
} catch (ImporterMetaDataException e) {
   errorMessage = e.getMessage();
   return ERROR;
}
if (importerManager.isInProgress() || alreadyDone) {
    return WAIT;
}
ImportAction.logger.info("doImport");
this.importerManager.importAll();
return Action.SUCCESS;
   }
 
开发者ID:gisgraphy,项目名称:gisgraphy,代码行数:22,代码来源:ImportAction.java

示例2: findById

public String findById(){
	HttpServletRequest request = ServletActionContext.getRequest();
	String  strId = request.getParameter("id");
	if(strId != null && strId.length()> 0){
		Integer id = Integer.valueOf(strId);
		
		SysUser sysUser = this.sysUserService.findById(id);
		resultMap = new HashMap<String,Object>();
		resultMap.put("error", "false");
		resultMap.put("status", "ok");
		resultMap.put("result", sysUser);
		return Action.SUCCESS;
	}else{
		return Action.ERROR;
	}
}
 
开发者ID:huligong1234,项目名称:springbyexample,代码行数:16,代码来源:SysUserJSONAction.java

示例3: execute

public String execute() throws Exception{
	
	try{
	solrNum=null;
	dynamodbNum=null;
	//modules=brandService.findModuleByName(moduleName);
	modules=brandService.findModuleByScope(moduleName);
		solrNum=brandService.findSolrNum(modules);
		dynamodbNum=brandService.findDynamoNum(modules);
	}catch(Exception e){
		System.out.println(e.toString());
		e.printStackTrace();
		error="查询出错!";
	}
	

	
	return Action.SUCCESS;
	
}
 
开发者ID:yancykim,项目名称:support,代码行数:20,代码来源:ModuleAction.java

示例4: execute

public String execute() throws Exception{
	error=null;
	try{
		//为了判断7天内的曲线趋势,所以选七天前的日期开始
		if(month==0||year==0||day==0){
			year=DateUtil.getTSDA(7)[0];
			month=DateUtil.getTSDA(7)[1];
			day=DateUtil.getTSDA(7)[2];
		}
		weiboAnalyticsList=weiboService.findAnalyticsByScope(scope, month, year, day);
		weiboAnalyticsId=new ArrayList<WeiboAnalyticsId>();
		for(Iterator<WeiboAnalytics> it=weiboAnalyticsList.iterator();it.hasNext();){
			weiboAnalyticsId.add(it.next().getId());
		}
	}catch(Exception e){
		error="没有数据,或查询出错!";
	}
	
	return Action.SUCCESS;
}
 
开发者ID:yancykim,项目名称:support,代码行数:20,代码来源:WeiboAnalyticsAction.java

示例5: update

public String update() throws Exception {
	logger.debug("updating...");
	logger.debug("update: id is " + id);
	logger.debug("update: Button is " + typebutton);
	logger.debug("update: workingvenue is " + workingvenue);
	if (typebutton != null) {
		// Here we need to validate some stuff.
		if (workingvenue.getVenueName().length() < 1) {
			logger.debug("No venue name specified .  Returning INPUT");
			message="Please specify a name for this venue";
			return INPUT;
		}
		logger.debug("updateagain: Button is " + typebutton);
		logger.debug("update: saving, this is an update...");
		venueDAO.update(workingvenue);
	}
	logger.debug("Exiting update()");
	return Action.SUCCESS;
}
 
开发者ID:shevett,项目名称:congo,代码行数:19,代码来源:EditVenue.java

示例6: onejson

public String onejson() throws Exception {
	if (countrycode==null){
		logger.info("not countrycode specified");
		statsAsJson = "{}";
		return Action.SUCCESS;
	}
	statsAsJson = statsDataManager.getOneInJson(countrycode, refresh);
	return Action.SUCCESS;
}
 
开发者ID:gisgraphy,项目名称:gisgraphy,代码行数:9,代码来源:StatsDataAction.java

示例7: execute

@Override
   public String execute() throws Exception {
statsUsages = statsUsageDao.getAll();
totalUsage = 0L;
for (StatsUsage statsUsage: statsUsages){
    totalUsage = totalUsage + statsUsage.getUsage();
}
return Action.SUCCESS;
   }
 
开发者ID:gisgraphy,项目名称:gisgraphy,代码行数:9,代码来源:StatsAction.java

示例8: execute

@SuppressWarnings("unchecked")
   @Override
   public String execute() throws Exception {
try {

    if (city != null) {
	if (countryCode == null || "".equals(countryCode)) {
	    errorMessage = getText("search.country.required");
	    return Action.SUCCESS;
	}
	FulltextQuery fulltextQuery = new FulltextQuery(city,
		Pagination.DEFAULT_PAGINATION, Output.DEFAULT_OUTPUT,
		Constants.ONLY_CITY_PLACETYPE, getCountryCode());
	ambiguousCities = fullTextSearchEngine.executeQuery(
		fulltextQuery).getResults();
	int numberOfPossibleCitiesThatMatches = ambiguousCities.size();
	if (numberOfPossibleCitiesThatMatches == 0) {
	    return Action.SUCCESS;
	} else if (numberOfPossibleCitiesThatMatches == 1) {
	    SolrResponseDto cityfound = ambiguousCities.get(0);
	    lat = cityfound.getLat().toString();
	    lng = cityfound.getLng().toString();
	    city = buildCityDisplayName(cityfound); 
	    cityFound = true;
	    return Action.SUCCESS;
	} else {
	    //more than one city suits
	    return Action.SUCCESS;
	}

    } else if (ambiguousCity != null) {
	return Action.SUCCESS;
    }

} catch (Exception e) {
    errorMessage = getText("search.error", e.getMessage());
}

return Action.SUCCESS;
   }
 
开发者ID:gisgraphy,项目名称:gisgraphy,代码行数:40,代码来源:GeocodingAction.java

示例9: execute

public String execute(){
	IncomeDao incomedao=new IncomeDao();
	ActionContext ctx = ActionContext.getContext();
	Map<String, Object> session = ctx.getSession();
	Parking parking = (Parking) session.get("parking");
	System.out.println((income.getPlatnumber()));
	System.out.println("00="+parking.getParkid());
	income = incomedao.getincomebyplatnumber(income.getPlatnumber(),parking.getParkid());
	if(income==null){
		addActionMessage("无对应车辆,请检查输入是否正确");
		return Action.ERROR;
	}
	SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm");//设置日期格式
	//System.out.println("入场时间"+income.getCarin());
	Date datein = null;
	try {
		datein = df.parse(income.getCarin());
	} catch (ParseException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	Date dateout = new Date();
	long temp = dateout.getTime() - datein.getTime();    //相差毫秒数 
       long hours = temp / 1000 / 3600;//相差小时数 
       long temp2 = temp % (1000 * 3600);
       if(temp2!=0){
       	hours = hours+1;
       }
       int price = income.getPark().getPrice();
       int money = (int)(price*hours);
	String carout = df.format(dateout);
	income.setCarout(carout);
	income.setMoney(money);
	session.put("income", income);
	//System.out.println("金额"+money);
	return Action.SUCCESS;
}
 
开发者ID:foryuki,项目名称:viewpark,代码行数:37,代码来源:ChargeAction.java

示例10: execute

public String execute() throws Exception {
	// TODO Auto-generated method stub
	ParkingDao cDao=new ParkingDao();	
	cDao.updatepark(c);
	
	return Action.SUCCESS;
}
 
开发者ID:foryuki,项目名称:viewpark,代码行数:7,代码来源:PriceEditAction.java

示例11: doDefault

@Override
public String doDefault() throws Exception {
	resultsParamString = "";
	List<DeploymentObject> deploymentObjects = null;
	final HttpServletRequest request = ServletActionContext.getRequest();
	final String rawParams = request.getParameter("params");

	if (rawParams != null) {
		deploymentObjects = getDeploymentInfoFromParams(rawParams);
	}
	if (deploymentObjects == null) {
		return Action.ERROR;
	}

	for (DeploymentObject deploymentObject : deploymentObjects) {
		// Create deployment context and start deployment
		User user = bambooAuthenticationContext.getUser();

		EnvironmentTriggeringAction environmentTriggeringAction =
			triggeringActionFactory.createManualEnvironmentTriggeringAction(
				deploymentObject.getTargetEnvironment(), deploymentObject.getVersion(), user);

		ExecutionRequestResult executionRequestResult =
			deploymentExecutionService.execute(deploymentObject.getTargetEnvironment(), environmentTriggeringAction);

		if (executionRequestResult.getDeploymentResultId() != null) {
			DeploymentResult deploymentResult =
				deploymentResultService.getDeploymentResult(executionRequestResult.getDeploymentResultId());
			deploymentObject.setResult(deploymentResult);

			// Generate the response string
			resultsParamString += deploymentObject.serialize() + ";";
		}
	}
	return Action.SUCCESS;
}
 
开发者ID:AutoGeneral,项目名称:bamboo-mass-deployment,代码行数:36,代码来源:DeploymentExecution.java

示例12: doDefault

@Override
public String doDefault() throws Exception {
	final HttpServletRequest request = ServletActionContext.getRequest();
	final String rawParams = request.getParameter("results");

	if (rawParams != null) {
		deploymentObjects = getDeploymentInfoFromParams(rawParams);
	}

	return Action.SUCCESS;
}
 
开发者ID:AutoGeneral,项目名称:bamboo-mass-deployment,代码行数:11,代码来源:DeploymentResultsForm.java

示例13: findById

public String findById(){
	String result = Action.SUCCESS;
	HttpServletRequest request = ServletActionContext.getRequest();
	String  strId = request.getParameter("id");
	if(strId != null && strId.length()> 0){
		Integer id = Integer.valueOf(strId);
		sysUser = this.sysUserService.findById(id);
		return result;
	}else{
		result = Action.ERROR;
	}
	return result;
}
 
开发者ID:huligong1234,项目名称:springbyexample,代码行数:13,代码来源:SysUserAction.java

示例14: execute

public String execute() throws Exception{
	error=null;
	try{
		threadsCount=brandService.findCountByScope(scope);
	}catch(Exception e){
		error="没有数据,或查询出错!";
	}
	
	return Action.SUCCESS;
}
 
开发者ID:yancykim,项目名称:support,代码行数:10,代码来源:ThreadsAction.java

示例15: find

public String find(){
	List<SysUser> list = this.sysUserService.find();
	resultMap = new HashMap<String,Object>();
	resultMap.put("error", "false");
	resultMap.put("status", "ok");
	resultMap.put("result", list);
	return Action.SUCCESS;
}
 
开发者ID:huligong1234,项目名称:springbyexample,代码行数:8,代码来源:SysUserJSONAction.java


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