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


Java ResourceDescriptor.setListOfValues方法代码示例

本文整理汇总了Java中com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor.setListOfValues方法的典型用法代码示例。如果您正苦于以下问题:Java ResourceDescriptor.setListOfValues方法的具体用法?Java ResourceDescriptor.setListOfValues怎么用?Java ResourceDescriptor.setListOfValues使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor的用法示例。


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

示例1: getLOV

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void getLOV(ARestV2Connection rc, ClientListOfValues cr, ResourceDescriptor rd) throws ParseException {
	List<ListItem> lovs = new ArrayList<ListItem>();
	if (cr.getItems() != null)
		for (ClientListOfValuesItem sds : cr.getItems())
			lovs.add(new ListItem(sds.getLabel(), sds.getValue()));
	rd.setListOfValues(lovs);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:8,代码来源:Rest2Soap.java

示例2: copyFields

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static void copyFields(ResourceDescriptor rd, ResourceDescriptor rnew) {
	rnew.setParameters(rd.getParameters());
	rnew.setProperties(rd.getProperties());
	rnew.setChildren(rd.getChildren());

	rnew.setQueryData(rd.getQueryData());
	rnew.setQueryValueColumn(rd.getQueryValueColumn());
	rnew.setQueryVisibleColumns(rd.getQueryVisibleColumns());

	rnew.setListOfValues(rd.getListOfValues());

	rnew.setPattern(rd.getPattern());
	rnew.setMinValue(rd.getMinValue());
	rnew.setMaxValue(rd.getMaxValue());
	rnew.setStrictMin(rd.isStrictMin());
	rnew.setStrictMax(rd.isStrictMax());
	rnew.setDataType(rd.getDataType());

	rnew.setJndiName(rd.getJndiName());

	rnew.setBeanMethod(rd.getBeanMethod());
	rnew.setBeanName(rd.getBeanName());

	rnew.setDriverClass(rd.getDriverClass());
	rnew.setUsername(rd.getUsername());
	rnew.setPassword(rd.getPassword());
	rnew.setConnectionUrl(rd.getConnectionUrl());

	rnew.setName(rd.getName());
	rnew.setLabel(rd.getLabel());
	rnew.setDescription(rd.getDescription());

	rnew.setData(rd.getData());
	rnew.setHasData(rd.getHasData());
	rnew.setSql(rd.getSql());
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:37,代码来源:ASelector.java

示例3: publish

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public void publish(MReportUnit mrunit, IProgressMonitor monitor, JasperDesign jasper, JasperReportsConfiguration jrConfig) throws Exception {
	ResourceDescriptor runit = mrunit.getValue();
	for (JRParameter p : jasper.getParametersList()) {
		if (p.isSystemDefined() || !p.isForPrompting())
			continue;

		ResourceDescriptor rd = MInputControl.createDescriptor(mrunit);
		rd.setName(p.getName());
		rd.setLabel(p.getName());
		rd.setDescription(p.getDescription());
		rd.setVisible(true);
		rd.setReadOnly(false);
		rd.setMandatory(false);
		rd.setResourceProperty(ResourceDescriptor.PROP_INPUTCONTROL_TYPE, ResourceDescriptor.IC_TYPE_SINGLE_VALUE);
		rd.setParentFolder(runit.getUriString() + "_files");
		rd.setUriString(runit.getUriString() + "_files/" + rd.getName());

		MInputControl mres = (MInputControl) ResourceFactory.getResource(mrunit, rd, -1);

		if (Boolean.class.isAssignableFrom(p.getValueClass())) {
			rd.setControlType(ResourceDescriptor.IC_TYPE_BOOLEAN);
		} else if (String.class.isAssignableFrom(p.getValueClass())) {
			addType(rd, mres, ResourceDescriptor.DT_TYPE_TEXT);
		} else if (Timestamp.class.isAssignableFrom(p.getValueClass())) {
			addType(rd, mres, ResourceDescriptor.DT_TYPE_DATE_TIME);
		} else if (Date.class.isAssignableFrom(p.getValueClass())) {
			addType(rd, mres, ResourceDescriptor.DT_TYPE_DATE);
		} else if (TimestampRange.class.isAssignableFrom(p.getValueClass())) {
			addType(rd, mres, ResourceDescriptor.DT_TYPE_DATE_TIME);
		} else if (DateRange.class.isAssignableFrom(p.getValueClass())) {
			addType(rd, mres, ResourceDescriptor.DT_TYPE_DATE);
		} else if (Number.class.isAssignableFrom(p.getValueClass())) {
			addType(rd, mres, ResourceDescriptor.DT_TYPE_NUMBER);
		} else if (Collection.class.isAssignableFrom(p.getValueClass())) {
			rd.setControlType(ResourceDescriptor.IC_TYPE_MULTI_SELECT_LIST_OF_VALUES);

			ResourceDescriptor dt = new ResourceDescriptor();
			dt.setWsType(ResourceDescriptor.TYPE_LOV);
			dt.setName("lov_" + rd.getName());
			dt.setLabel("lov_" + rd.getName());
			dt.setIsNew(true);
			dt.setParentFolder(rd.getUriString() + "_files");
			dt.setUriString(dt.getParentFolder() + "/" + rd.getName());
			List<ListItem> values = new ArrayList<ListItem>();

			dt.setListOfValues(values);
			rd.getChildren().add(dt);
		} else {
			mrunit.removeChild(mres);
			continue;
		}

		mres.setPublishOptions(new PublishOptions());

		PublishUtil.getResources(mrunit, monitor, jrConfig).add(mres);
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:58,代码来源:ImpInputControls.java

示例4: initInputControls

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
@Override
public ResourceDescriptor initInputControls(String uri, IProgressMonitor monitor) throws Exception {
	ResourceDescriptor rdrepunit = WSClientHelper.getReportUnit(monitor, uri);
	// List<ResourceDescriptor> list = list(monitor, rdrepunit);
	List<ResourceDescriptor> inputcontrols = new ArrayList<ResourceDescriptor>();
	Set<String> icNames = new HashSet<String>();
	String dsUri = null;
	for (ResourceDescriptor sub_rd : rdrepunit.getChildren()) {
		String wsType = sub_rd.getWsType();
		if (wsType.equals(ResourceDescriptor.TYPE_INPUT_CONTROL)) {
			inputcontrols.add(sub_rd);
			icNames.add(sub_rd.getName());
		} else if (wsType.equals(ResourceDescriptor.TYPE_DATASOURCE) && sub_rd.getIsReference())
			dsUri = sub_rd.getReferenceUri();
		else if (SelectorDatasource.isDatasource(sub_rd))
			dsUri = sub_rd.getUriString();
	}

	for (int i = 0; i < inputcontrols.size(); ++i) {
		ResourceDescriptor ic = inputcontrols.get(i);
		if (InputControlsManager.isICQuery(ic)) {
			String dsUriQuery = getDataSourceQueryURI(dsUri, ic);
			ic.setResourceProperty(ResourceDescriptor.PROP_QUERY_DATA, null);
			// Ask to add values to the control....
			List<Argument> args = new ArrayList<Argument>();
			args.add(new Argument(Argument.IC_GET_QUERY_DATA, dsUriQuery));
			args.add(new Argument(Argument.RU_REF_URI, uri));
			ic = client.get(ic, null, args);
			cascadingDependencies(ic, icNames);
		} else if (InputControlsManager.isICListOfValues(ic) && !ic.getChildren().isEmpty()) {
			ResourceDescriptor rd2 = (ResourceDescriptor) ic.getChildren().get(0);
			if (rd2.getWsType().equals(ResourceDescriptor.TYPE_REFERENCE)) {
				ResourceDescriptor tmpRd = new ResourceDescriptor();
				tmpRd.setUriString(rd2.getReferenceUri());
				tmpRd = get(monitor, tmpRd, null);
				ic.setListOfValues(tmpRd.getListOfValues());
			} else
				ic.setListOfValues(rd2.getListOfValues());
		}
		for (int j = 0; j < rdrepunit.getChildren().size(); j++) {
			ResourceDescriptor r = rdrepunit.getChildren().get(j);
			if (r.getName() != null && r.getName().equals(ic.getName()))
				rdrepunit.getChildren().set(j, ic);
		}
	}
	return rdrepunit;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:48,代码来源:SoapConnection.java


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