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


Java ResourceDescriptor类代码示例

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


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

示例1: modifyReportUnitResource

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
@Override
public ResourceDescriptor modifyReportUnitResource(IProgressMonitor monitor, ResourceDescriptor runit, ResourceDescriptor rd, File inFile) throws Exception {
	try {
		rd = c.modifyReportUnitResource(monitor, runit, rd, inFile);
	} catch (Exception e) {
		if (e instanceof HttpResponseException) {
			HttpResponseException he = (HttpResponseException) e;
			if (he.getStatusCode() == 401) {
				c.connect(monitor, getServerProfile());
				error401 = true;
				return c.modifyReportUnitResource(monitor, runit, rd, inFile);
			}
		}
		error401 = false;
		throw e;
	}
	rd.setChildrenDirty(false);
	return rd;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:20,代码来源:ProxyConnection.java

示例2: reorderInputControls

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
@Override
public void reorderInputControls(String uri, List<ResourceDescriptor> rd, IProgressMonitor monitor) throws Exception {
	try {
		c.reorderInputControls(uri, rd, monitor);
	} catch (Exception e) {
		if (e instanceof HttpResponseException) {
			HttpResponseException he = (HttpResponseException) e;
			if (he.getStatusCode() == 401) {
				c.connect(monitor, getServerProfile());
				error401 = true;
				c.reorderInputControls(uri, rd, monitor);
				return;
			}
		}
		error401 = false;
		throw e;
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:19,代码来源:ProxyConnection.java

示例3: getPermissionMask

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
@Override
public Integer getPermissionMask(ResourceDescriptor rd, IProgressMonitor monitor) throws Exception {
	try {
		return c.getPermissionMask(rd, monitor);
	} catch (Exception e) {
		if (e instanceof HttpResponseException) {
			HttpResponseException he = (HttpResponseException) e;
			if (he.getStatusCode() == 401) {
				c.connect(monitor, getServerProfile());
				error401 = true;
				return c.getPermissionMask(rd, monitor);
			}
		}
		error401 = false;
		throw e;
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:ProxyConnection.java

示例4: listFolder

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
/**
 * This function shows how to create a folder in the root directory.
 * Subfolders can be created just specifying a proper Uri string i.e.
 * rd.setUriString("/this/is/my/new/folder");
 * 
 * @param client
 * @param folderLabel
 * @param folderName
 * @throws IOException
 */
public static void listFolder(WSClient client, String folderUri)
		throws Exception {
	ResourceDescriptor rd = new ResourceDescriptor();
	rd.setWsType(ResourceDescriptor.TYPE_FOLDER);
	rd.setUriString(folderUri);

	List<ResourceDescriptor> children = client.list(rd);

	for (ResourceDescriptor r : children) {
		for (int i = 0; i < depth; ++i)
			System.out.print("  ");
		if (r.getWsType().equals(ResourceDescriptor.TYPE_FOLDER)) {
			System.out.println("[" + r.getLabel() + "]");
			depth++;
			listFolder(client, r.getUriString());
			depth--;
		} else if (r.getWsType().equals(ResourceDescriptor.TYPE_REPORTUNIT)) {
			r = client.get(r, null);
			listFolder(client, r.getUriString());
		} else {
			System.out.println("" + r.getLabel() + "");
		}
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:35,代码来源:ListRepository.java

示例5: createContent

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
@Override
public Control createContent(Composite parent) {
	Composite cmp = new Composite(parent, SWT.NONE);
	cmp.setLayout(new GridLayout(2, false));

	UIUtil.createLabel(cmp, "Catalog");

	Text tCatalog = new Text(cmp, SWT.BORDER);
	tCatalog.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	List<ResourceProperty> props = res.getValue().getProperties();
	ResourceProperty resprop = ResourceDescriptorUtil.getProperty(ResourceDescriptor.PROP_XMLA_CATALOG, props);

	bindingContext.bindValue(SWTObservables.observeText(tCatalog, SWT.Modify), PojoObservables.observeValue(resprop, "value"));

	Control c = super.createContent(cmp);
	GridData gd = new GridData(GridData.FILL_BOTH);
	gd.horizontalSpan = 2;
	c.setLayoutData(gd);
	return cmp;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:22,代码来源:SecureMondrianContent.java

示例6: getValueClass

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
private Class<?> getValueClass(ResourceDescriptor rd) throws Exception {
	if (rd.getControlType() == ResourceDescriptor.IC_TYPE_SINGLE_VALUE) {
		ResourceDescriptor rdtype = (ResourceDescriptor) rd.getChildren().get(0);
		if (rdtype.getWsType().equals(ResourceDescriptor.TYPE_REFERENCE)) {
			ResourceDescriptor tmpRd = new ResourceDescriptor();
			tmpRd.setUriString(rdtype.getReferenceUri());
			rdtype = getWsClient().get(new NullProgressMonitor(), tmpRd, null);
		}
		if (rdtype != null) {
			if (rdtype.getDataType() == ResourceDescriptor.DT_TYPE_DATE)
				return Date.class;
			if (rdtype.getDataType() == ResourceDescriptor.DT_TYPE_DATE_TIME)
				return Timestamp.class;
			if (rdtype.getDataType() == ResourceDescriptor.DT_TYPE_TEXT)
				return String.class;
			if (rdtype.getDataType() == ResourceDescriptor.DT_TYPE_NUMBER)
				return BigDecimal.class;
		}
	} else if (rd.getControlType() == ResourceDescriptor.IC_TYPE_BOOLEAN)
		return java.lang.Boolean.class;
	else if (InputControlsManager.isICListOfValues(rd))
		return List.class;
	else if (InputControlsManager.isICQuery(rd))
		return ResourceDescriptor.class;
	return rd.getClass();
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:27,代码来源:PResourceDescriptor.java

示例7: loadPreferences

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
public static void loadPreferences(IProgressMonitor monitor, IFile ifile, MResource f) {
	PublishOptions popt = f.getPublishOptions();
	String prefix = f.getValue().getName();
	try {
		String ovw = ifile.getPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, prefix + ".overwrite"));
		if (ovw != null)
			popt.setOverwrite(Boolean.parseBoolean(ovw));
		String ref = ifile.getPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, prefix + ".reference"));
		if (ref != null) {
			popt.setPublishMethod(ResourcePublishMethod.valueOf(ref));
			String path = ifile.getPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, prefix + ".refPATH"));
			if (path != null) {
				ResourceDescriptor rd = new ResourceDescriptor();
				rd.setParentFolder(RDUtil.getParentFolder(path));
				rd.setUriString(path);
				rd.setWsType(f.getValue().getWsType());
				popt.setReferencedResource(WSClientHelper.getResource(monitor, f, rd, FileUtils.createTempFile("tmp", "")));
			} else
				popt.setPublishMethod(ResourcePublishMethod.LOCAL);
		}
	} catch (Exception e) {
		popt.setPublishMethod(ResourcePublishMethod.LOCAL);
		e.printStackTrace();
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:26,代码来源:PublishUtil.java

示例8: setRemoteResource

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
private void setRemoteResource(MResource res, ResourceDescriptor rd, ANode pnode) {
	ResourceDescriptor runit = res.getValue();
	try {
		rd = WSClientHelper.getResource(new NullProgressMonitor(), pnode, rd);
		rd.setIsReference(true);
		rd.setReferenceUri(rd.getUriString());
		rd.setParentFolder(runit.getParentFolder() + "/" + runit.getName() + "_files"); //$NON-NLS-1$ //$NON-NLS-2$
		rd.setUriString(rd.getParentFolder() + "/" + rd.getName());//$NON-NLS-1$
		setupResource(rd);
		replaceChildren(res, rd);

		jsRefDS.setText(rd.getReferenceUri());
	} catch (Exception e1) {
		UIUtils.showError(e1);
	}
	firePageComplete();
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:ASelector.java

示例9: createInput

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
@Override
public void createInput(Composite parent, final IParameter param,
		final Map<String, Object> params) {
	super.createInput(parent, param, params);
	rdprm = (PResourceDescriptor) param;

	if (getRD().getControlType() == ResourceDescriptor.IC_TYPE_SINGLE_SELECT_QUERY) {
		iinput = new ListInput(this, param, params);
		iinput.createControl(parent, SWT.SINGLE);
	} else if (getRD().getControlType() == ResourceDescriptor.IC_TYPE_SINGLE_SELECT_QUERY_RADIO) {
		iinput = new TableInput(this, param, params);
		iinput.createControl(parent, SWT.SINGLE | SWT.RADIO);
	} else if (getRD().getControlType() == ResourceDescriptor.IC_TYPE_MULTI_SELECT_QUERY) {
		iinput = new TableInput(this, param, params);
		iinput.createControl(parent, SWT.MULTI);
	} else if (getRD().getControlType() == ResourceDescriptor.IC_TYPE_MULTI_SELECT_QUERY_CHECKBOX) {
		iinput = new TableInput(this, param, params);
		iinput.createControl(parent, SWT.MULTI | SWT.CHECK);
	} else
		return;

	setMandatory(param, iinput.getControl());

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

示例10: checkFieldsFilled

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
public boolean checkFieldsFilled() {
	if (icm.isAnyVisible()) {
		boolean rAlwaysPrompt = rdrepunit.getResourcePropertyValueAsBoolean(ResourceDescriptor.PROP_RU_ALWAYS_PROPMT_CONTROLS);

		boolean hasDirty = false;
		for (ResourceDescriptor p : icm.getInputControls()) {
			String pname = p.getName();
			if (p.isVisible() && !p.isReadOnly() && incontrols.containsKey(pname)) {
				if (incontrols.get(pname).isDirty())
					hasDirty = true;
				if (p.isMandatory() && icm.getParameters().containsKey(pname) && !hasDirty)
					return false;
			}
		}
		if (rAlwaysPrompt && !hasDirty)
			return false;
	}
	return true;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:20,代码来源:VInputControls.java

示例11: listDatasources

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
@Override
public List<ResourceDescriptor> listDatasources(IProgressMonitor monitor, IDatasourceFilter f) throws Exception {
	List<ResourceDescriptor> rds = new ArrayList<ResourceDescriptor>();
	WebTarget tgt = target.path("resources");
	if (f == null)
		f = new DatasourcesAllFilter();
	for (String type : f.getFilterTypes())
		tgt = tgt.queryParam("type", WsTypes.INST().toRestType(type));
	tgt = tgt.queryParam("sortBy", "label");
	tgt = tgt.queryParam("limit", 0);

	Builder req = tgt.request();
	ClientResourceListWrapper resources = toObj(connector.get(req, monitor), ClientResourceListWrapper.class, monitor);
	if (resources != null)
		for (ClientResourceLookup crl : resources.getResourceLookups())
			rds.add(Rest2Soap.getRDLookup(this, crl));
	return rds;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:19,代码来源:RestV2ConnectionJersey.java

示例12: setRemoteResource

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
private void setRemoteResource(MResource res, ResourceDescriptor rd, ANode parent) {
	ResourceDescriptor runit = res.getValue();
	try {
		rd = WSClientHelper.getResource(new NullProgressMonitor(), parent, rd);
		rd.setIsReference(true);
		rd.setMainReport(true);
		rd.setReferenceUri(rd.getUriString());
		rd.setParentFolder(runit.getParentFolder() + "/" + runit.getName() + "_files");
		rd.setWsType(ResourceDescriptor.TYPE_JRXML);
		rd.setUriString(rd.getParentFolder() + "/" + rd.getName());
		replaceMainReport(res, rd);
		rd.setDirty(false);
		fireSelectionChanged();

		jsRefDS.setText(rd.getUriString());
	} catch (Exception e1) {
		UIUtils.showError(e1);
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:20,代码来源:SelectorJrxml.java

示例13: initType

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
protected static void initType(String rtype) {
	ResourceDescriptor rd = new ResourceDescriptor();
	rd.setWsType(WsTypes.INST().toSoapType(rtype));
	MResource r = getResource(null, rd, -1);
	tIcons.put(rtype, r.getThisIconDescriptor().getIcon16());
	tName.put(rtype, r.getThisIconDescriptor().getTitle());
	System.out.println(rtype + ":" + r.getThisIconDescriptor().getTitle());
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:9,代码来源:ResourceFactory.java

示例14: getResource

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
public MResource getResource(ANode parent, ResourceDescriptor resource, int index) {
	for (IResourceFactory r : resources) {
		MResource mr = r.getResource(parent, resource, index);
		if (mr != null)
			return mr;
	}
	return null;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:9,代码来源:ExtensionManager.java

示例15: getRD

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入依赖的package包/类
public ResourceDescriptor getRD(ARestV2Connection rc, ClientResource<?> cr, ResourceDescriptor rd) throws ParseException {
	for (IResourceFactory r : resources) {
		ResourceDescriptor nrd = r.getRD(rc, cr, rd);
		if (nrd != null)
			return nrd;
	}
	return null;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:9,代码来源:ExtensionManager.java


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