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


Java ResourceDescriptor.setResourceProperty方法代码示例

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


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

示例1: updateControl

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private ResourceDescriptor updateControl(String runit, String dsUri, ResourceDescriptor rd, IProgressMonitor monitor) throws Exception {
	List<Argument> args = new ArrayList<Argument>();

	args.add(new Argument(Argument.IC_GET_QUERY_DATA, getDataSourceQueryURI(dsUri, rd)));
	args.add(new Argument(Argument.RU_REF_URI, runit));

	rd.getParameters().clear();
	rd.setResourceProperty(ResourceDescriptor.PROP_QUERY_DATA, null);
	Map<String, Object> parameters = rd.getIcValues();
	for (String key : parameters.keySet()) {
		Object value = parameters.get(key);
		if (value == null)
			continue;
		if (value instanceof Collection)
			for (String item : ((Collection<String>) value)) {
				ListItem l = new ListItem(key, item);
				l.setIsListItem(true);
				rd.getParameters().add(l);
			}
		else
			rd.getParameters().add(new ListItem(key, value));
	}
	return client.get(rd, null, args);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:25,代码来源:SoapConnection.java

示例2: getXmlaConnection

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void getXmlaConnection(ARestV2Connection rc, ClientXmlaConnection cr, ResourceDescriptor rd) throws ParseException {
	rd.setResourceProperty(ResourceDescriptor.PROP_XMLA_URI, Misc.nvl(cr.getUrl()));
	rd.setResourceProperty(ResourceDescriptor.PROP_XMLA_DATASOURCE, Misc.nvl(cr.getDataSource()));
	rd.setResourceProperty(ResourceDescriptor.PROP_XMLA_CATALOG, Misc.nvl(cr.getCatalog()));
	rd.setResourceProperty(ResourceDescriptor.PROP_XMLA_USERNAME, Misc.nvl(cr.getUsername()));
	rd.setResourceProperty(ResourceDescriptor.PROP_XMLA_PASSWORD, Misc.nvl(cr.getPassword()));
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:8,代码来源:Rest2Soap.java

示例3: getCustomDataSource

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void getCustomDataSource(ARestV2Connection rc, ClientCustomDataSource cr, ResourceDescriptor rd) throws ParseException {
	rd.setServiceClass(cr.getServiceClass());
	if (cr.getProperties() != null) {
		ResourceProperty rp = new ResourceProperty(MRDatasourceCustom.PROP_DATASOURCE_CUSTOM_PROPERTY_MAP);
		List<ResourceProperty> props = new ArrayList<ResourceProperty>();
		for (ClientProperty cp : cr.getProperties())
			props.add(new ResourceProperty(cp.getKey(), cp.getValue()));
		rp.setProperties(props);
		rd.setResourceProperty(rp);
	}
	DiffFields.setSoapValue(rd, DiffFields.DATASOURCENAME, cr.getDataSourceName());
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:13,代码来源:Rest2Soap.java

示例4: getVirtualDataSource

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void getVirtualDataSource(ARestV2Connection rc, ClientVirtualDataSource cr, ResourceDescriptor rd) throws ParseException {
	if (cr.getSubDataSources() != null)
		for (ClientSubDataSourceReference sds : cr.getSubDataSources()) {
			ResourceDescriptor r = new ResourceDescriptor();
			r.setName(rd.getName());
			r.setLabel(rd.getLabel());
			r.setIsReference(true);
			r.setReferenceUri(sds.getUri());
			r.setWsType(ResourceDescriptor.TYPE_DATASOURCE);
			r.setIsNew(true);
			r.setResourceProperty("PROP_DATASOURCE_SUB_DS_ID", sds.getId());
			rd.getChildren().add(r);
		}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:15,代码来源:Rest2Soap.java

示例5: getNewRunit

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private MReportUnit getNewRunit() {
	if (newrunit == null) {
		ResourceDescriptor rd = MReportUnit.createDescriptor(null);
		rd.setName(null);
		rd.setResourceProperty(ResourceDescriptor.PROP_RU_ALWAYS_PROPMT_CONTROLS, true);
		newrunit = new MReportUnit(null, rd, -1);
	}
	PublishUtil.initRUnitName(newrunit, jDesign);
	return newrunit;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:11,代码来源:RUnitLocationPage.java

示例6: createDescriptor

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static ResourceDescriptor createDescriptor(ANode parent) {
	ResourceDescriptor rd = MResource.createDescriptor(parent);
	rd.setWsType(ResourceDescriptor.TYPE_OLAP_XMLA_CONNECTION);

	rd.setResourceProperty(MROlapXmlaConnection.PROP_XMLA_URI, "uri");
	rd.setResourceProperty(MROlapXmlaConnection.PROP_XMLA_CATALOG, "catalog");
	rd.setResourceProperty(MROlapXmlaConnection.PROP_XMLA_DATASOURCE, "datasource");
	rd.setResourceProperty(MROlapXmlaConnection.PROP_XMLA_USERNAME, "username");
	rd.setResourceProperty(MROlapXmlaConnection.PROP_XMLA_PASSWORD, "");

	return rd;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:13,代码来源:MROlapXmlaConnection.java

示例7: addReportInputControl

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void addReportInputControl(WSClient client, String reportUnitUri, String name, String label) throws Exception {



        // Let's add a simple input controls...
        ResourceDescriptor icDescriptor = new ResourceDescriptor();
        icDescriptor.setName(name);
        icDescriptor.setLabel(label);
        icDescriptor.setIsNew(true);
        icDescriptor.setIsReference(false);
        icDescriptor.setWsType( ResourceDescriptor.TYPE_INPUT_CONTROL );
        icDescriptor.setResourceProperty( ResourceDescriptor.PROP_INPUTCONTROL_TYPE, ResourceDescriptor.IC_TYPE_SINGLE_VALUE);
        icDescriptor.setUriString(reportUnitUri+"/<controls>/"+name);

        

        // Now we need to add the input control data type...
        ResourceDescriptor dataTypeDescriptor = new ResourceDescriptor();
        dataTypeDescriptor.setName("myDatatype");
        dataTypeDescriptor.setLabel("Simple text data type");
        dataTypeDescriptor.setIsNew(true);
        dataTypeDescriptor.setIsReference(false);
        dataTypeDescriptor.setWsType( ResourceDescriptor.TYPE_DATA_TYPE );
        dataTypeDescriptor.setDataType( ResourceDescriptor.DT_TYPE_TEXT);
        dataTypeDescriptor.setUriString(reportUnitUri+"/<controls>/" + name +"/myDatatype");

        
        if (icDescriptor.getChildren() == null) icDescriptor.setChildren(new java.util.ArrayList());
        icDescriptor.getChildren().add(dataTypeDescriptor);
        
        client.modifyReportUnitResource(reportUnitUri, icDescriptor, null);

        System.out.println("  Input control " + name + " added to the report");
        System.out.flush();

    }
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:37,代码来源:CreateReportUnit.java

示例8: setSoapValue

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static void setSoapValue(ResourceDescriptor rd, String key, String v) {
	rd.setResourceProperty(new ResourceProperty(key, v));
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:4,代码来源:DiffFields.java

示例9: getQuery

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void getQuery(ARestV2Connection rc, ClientQuery cr, ResourceDescriptor rd) throws ParseException {
	rd.setResourceProperty(ResourceDescriptor.PROP_QUERY_LANGUAGE, cr.getLanguage());
	rd.setSql(cr.getValue());
	if (cr.getDataSource() != null)
		rd.getChildren().add(getDataSource(rc, cr.getDataSource()));
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:7,代码来源:Rest2Soap.java

示例10: getMondrianXmlaDefinition

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void getMondrianXmlaDefinition(ARestV2Connection rc, ClientMondrianXmlaDefinition cr, ResourceDescriptor rd) throws ParseException {
	rd.setResourceProperty(ResourceDescriptor.PROP_XMLA_CATALOG, cr.getCatalog());
	if (cr.getMondrianConnection() != null)
		rd.getChildren().add(getRDContainer(rc, (ClientResource<?>) cr.getMondrianConnection()));
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:6,代码来源:Rest2Soap.java

示例11: getOlapUnit

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void getOlapUnit(ARestV2Connection rc, ClientOlapUnit cr, ResourceDescriptor rd) throws ParseException {
	rd.setSql(cr.getMdxQuery());
	rd.setResourceProperty(ResourceDescriptor.PROP_QUERY_LANGUAGE, "mdx");
	if (cr.getOlapConnection() != null)
		rd.getChildren().add(getRDContainer(rc, (ClientResource<?>) cr.getOlapConnection()));
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:7,代码来源:Rest2Soap.java

示例12: getReportUnit

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void getReportUnit(ARestV2Connection rc, AbstractClientReportUnit<?> cr, ResourceDescriptor rd) throws ParseException {
	rd.setResourceProperty(ResourceDescriptor.PROP_RU_ALWAYS_PROPMT_CONTROLS, cr.isAlwaysPromptControls());
	rd.setResourceProperty(ResourceDescriptor.PROP_RU_INPUTCONTROL_RENDERING_VIEW, cr.getInputControlRenderingView());
	rd.setResourceProperty(ResourceDescriptor.PROP_RU_REPORT_RENDERING_VIEW, cr.getReportRenderingView());
	if (cr.getControlsLayout() == ControlsLayoutType.popupScreen)
		rd.setResourceProperty(ResourceDescriptor.PROP_RU_CONTROLS_LAYOUT, ResourceDescriptor.RU_CONTROLS_LAYOUT_POPUP_SCREEN);
	if (cr.getControlsLayout() == ControlsLayoutType.separatePage)
		rd.setResourceProperty(ResourceDescriptor.PROP_RU_CONTROLS_LAYOUT, ResourceDescriptor.RU_CONTROLS_LAYOUT_SEPARATE_PAGE);
	if (cr.getControlsLayout() == ControlsLayoutType.topOfPage)
		rd.setResourceProperty(ResourceDescriptor.PROP_RU_CONTROLS_LAYOUT, ResourceDescriptor.RU_CONTROLS_LAYOUT_TOP_OF_PAGE);
	if (cr.getControlsLayout() == ControlsLayoutType.inPage)
		rd.setResourceProperty(ResourceDescriptor.PROP_RU_CONTROLS_LAYOUT, 4);

	rd.getChildren().clear();

	if (cr.getDataSource() != null)
		rd.getChildren().add(getDataSource(rc, cr.getDataSource()));
	if (cr.getQuery() != null)
		rd.getChildren().add(getRDContainer(rc, (ClientQuery) cr.getQuery()));
	if (cr.getJrxml() != null) {
		ResourceDescriptor mjrxml = getRDContainer(rc, (ClientResource<?>) cr.getJrxml());
		mjrxml.setMainReport(true);
		rd.getChildren().add(mjrxml);
	}

	if (cr.getInputControls() != null)
		for (ClientReferenceableInputControl cric : cr.getInputControls())
			rd.getChildren().add(getRDContainer(rc, (ClientResource<?>) cric));
	if (cr.getFiles() != null)
		for (String key : cr.getFiles().keySet()) {
			ClientReferenceableFile crf = cr.getFiles().get(key);
			ResourceDescriptor r = getRDContainer(rc, (ClientResource<?>) crf);
			r.setName(key);
			rd.getChildren().add(r);
		}
	Collections.sort(rd.getChildren(), new Comparator<ResourceDescriptor>() {

		@Override
		public int compare(ResourceDescriptor arg0, ResourceDescriptor arg1) {
			if (arg0.getLabel() == arg1.getLabel())
				return 0;
			if (arg0.getLabel() == null)
				return -1;
			if (arg1.getLabel() == null)
				return 1;
			String wsType0 = arg0.getWsType();
			String wsType1 = arg1.getWsType();
			if (wsType0.equals(wsType1)) {
				if (wsType0.equals(ResourceDescriptor.TYPE_JRXML)) {
					if (arg0.isMainReport())
						return -1;
					if (arg1.isMainReport())
						return 1;
					return arg0.getLabel().compareTo(arg1.getLabel());
				} else if (wsType0.equals(ResourceDescriptor.TYPE_INPUT_CONTROL))
					// ignore input controls
					return 0;
				return arg0.getLabel().compareTo(arg1.getLabel());
			}
			if (DatasourcesAllFilter.getTypes().contains(wsType0))
				return -1;
			if (DatasourcesAllFilter.getTypes().contains(wsType1))
				return 1;
			if (wsType0.equals(ResourceDescriptor.TYPE_JRXML))
				return -1;
			if (wsType1.equals(ResourceDescriptor.TYPE_JRXML))
				return 1;
			if (wsType0.equals(ResourceDescriptor.TYPE_QUERY))
				return -1;
			if (wsType1.equals(ResourceDescriptor.TYPE_QUERY))
				return 1;
			if (wsType0.equals(ResourceDescriptor.TYPE_INPUT_CONTROL))
				return -1;
			if (wsType1.equals(ResourceDescriptor.TYPE_INPUT_CONTROL))
				return 1;

			return wsType0.compareTo(wsType1);
		}
	});
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:81,代码来源:Rest2Soap.java

示例13: 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

示例14: createDescriptor

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static ResourceDescriptor createDescriptor(ANode parent) {
	ResourceDescriptor rd = MResource.createDescriptor(parent);
	rd.setWsType(ResourceDescriptor.TYPE_SECURE_MONDRIAN_CONNECTION);
	rd.setResourceProperty(MROlapXmlaConnection.PROP_XMLA_CATALOG, "catalog");
	return rd;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:7,代码来源:MRSecureMondrianConnection.java

示例15: createDescriptor

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static ResourceDescriptor createDescriptor(ANode parent) {
	ResourceDescriptor rd = MResource.createDescriptor(parent);
	rd.setWsType(ResourceDescriptor.TYPE_QUERY);
	rd.setResourceProperty(ResourceDescriptor.PROP_QUERY_LANGUAGE, "sql");
	return rd;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:7,代码来源:MRQuery.java


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