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


Java ResourceDescriptor.setIsReference方法代码示例

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


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

示例1: setResource

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private void setResource(MResource res, ResourceDescriptor rd) {
	ResourceDescriptor runit = res.getValue();
	try {
		rd = WSClientHelper.getResource(new NullProgressMonitor(), parent, rd);
		rd.setIsReference(true);
		rd.setReferenceUri(rd.getUriString());
		rd.setParentFolder(runit.getParentFolder() + "/" + runit.getName() + "_files"); //$NON-NLS-1$ //$NON-NLS-2$
		rd.setWsType(rd.getWsType());
		rd.setUriString(rd.getParentFolder() + "/" + rd.getName());//$NON-NLS-1$
		SelectorDatasource.replaceDatasource(res, rd);
		rd.setDirty(false);

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

示例2: createDescriptor

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static ResourceDescriptor createDescriptor(ANode parent) {
	ResourceDescriptor rd = new ResourceDescriptor();
	rd.setIsNew(true);
	rd.setIsReference(false);
	rd.setName("NewResource");
	// rd.setLabel(rd.getName());
	if (parent != null) {
		if (parent instanceof MResource)
			if (parent instanceof MFolder)
				rd.setParentFolder(((MResource) parent).getValue().getUriString());
			else
				rd.setParentFolder(((MResource) parent).getValue().getUriString() + "_files");
		else
			rd.setParentFolder("/");
	}
	return rd;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:MResource.java

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

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

示例5: getLocalResource

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
@Override
protected MResource getLocalResource(MResource res, ResourceDescriptor runit, ANode pnode) {
	AddResourceWizard wizard = new AddResourceWizard(res, true);
	wizard.setMondrianOnly(true);
	WizardDialog dialog = new WizardDialog(UIUtils.getShell(), wizard);
	dialog.create();
	if (dialog.open() != Dialog.OK)
		return null;
	MResource r = wizard.getResource();
	ResourceDescriptor ref = r.getValue();
	ref.setIsNew(true);
	ref.setIsReference(false);
	ref.setParentFolder(runit.getParentFolder() + "/" + runit.getName() + "_files"); //$NON-NLS-1$
	ref.setDirty(true);
	return r;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:17,代码来源:SelectorMondrianConnection.java

示例6: getLocalResource

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
@Override
protected MResource getLocalResource(MResource res, ResourceDescriptor runit, ANode pnode) {
	AddResourceWizard wizard = new AddResourceWizard(res, true);
	wizard.setOlapOnly(true);
	WizardDialog dialog = new WizardDialog(UIUtils.getShell(), wizard);
	dialog.create();
	if (dialog.open() != Dialog.OK)
		return null;
	MResource r = wizard.getResource();
	ResourceDescriptor ref = r.getValue();
	ref.setIsNew(true);
	ref.setIsReference(false);
	ref.setParentFolder(runit.getParentFolder() + "/" + runit.getName() + "_files"); //$NON-NLS-1$
	ref.setDirty(true);
	return r;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:17,代码来源:SelectorOlapConnection.java

示例7: getResourceContainer

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static Object getResourceContainer(ARestV2Connection rc, ResourceDescriptor rd) throws ParseException {
	if (rd.getParentFolder() != null && !rd.getParentFolder().endsWith("_files"))
		rd.setIsReference(true);
	if (rd.getIsReference())
		return new ClientReference(Misc.nvl(rd.getReferenceUri(), rd.getUriString()));
	if (!rd.getIsNew() && !rd.hasDirtyChildren())
		return new ClientReference(Misc.nvl(rd.getReferenceUri(), rd.getUriString()));
	ClientResource<?> res = getResource(rc, rd);
	if (rd.getIsNew())
		res.setVersion(-1);
	return res;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:13,代码来源:Soap2Rest.java

示例8: getRDContainer

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static ResourceDescriptor getRDContainer(ARestV2Connection rc, ClientResource<?> cr) throws ParseException {
	ResourceDescriptor rd = new ResourceDescriptor();
	getRD(rc, cr, rd);
	if (!(RDUtil.getParentFolder(cr.getUri()).endsWith("_files"))) {
		rd.setIsReference(true);
		rd.setReferenceUri(cr.getUri());
	}
	return rd;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:10,代码来源:Rest2Soap.java

示例9: getDataSource

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static ResourceDescriptor getDataSource(ARestV2Connection rc, ClientReferenceableDataSource crds) throws ParseException {
	if (crds instanceof ClientReference) {
		ResourceDescriptor rd = new ResourceDescriptor();
		rd.setReferenceUri(crds.getUri());
		rd.setIsReference(true);
		rd.setWsType(ResourceDescriptor.TYPE_REFERENCE);
		return rd;
	}
	return getRDContainer(rc, (ClientResource<?>) crds);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:11,代码来源:Rest2Soap.java

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

示例11: addType

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static ResourceDescriptor addType(ResourceDescriptor rd, MInputControl mres, byte type) {
	ResourceDescriptor rdtype = MDataType.createDescriptor(mres);
	String name = "myDatatype";
	rdtype.setName(name);
	rdtype.setLabel(name);
	rdtype.setIsNew(true);
	rdtype.setDataType(type);
	rdtype.setIsReference(false);
	rdtype.setParentFolder(rd.getUriString() + "_files");
	rdtype.setUriString(rdtype.getParentFolder() + "/" + name);

	rd.getChildren().add(rdtype);
	return rdtype;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:15,代码来源:ImpInputControls.java

示例12: getLocalResource

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
protected MResource getLocalResource(MResource res, ResourceDescriptor runit, ANode pnode) {
	ResourceDescriptor ref = createLocal(res);
	ref.setIsNew(true);
	ref.setIsReference(false);
	ref.setParentFolder(runit.getParentFolder() + "/" + runit.getName() + "_files"); //$NON-NLS-1$
	setupResource(ref);
	ref.setDirty(true);

	MResource r = ResourceFactory.getResource(null, ref, -1);
	if (!showLocalWizard(r, pnode))
		return null;
	return r;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:14,代码来源:ASelector.java

示例13: cloneResource

import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static ResourceDescriptor cloneResource(ResourceDescriptor rd) {
	ResourceDescriptor rnew = new ResourceDescriptor();
	copyFields(rd, rnew);

	rnew.setIsNew(rd.getIsNew());
	rnew.setIsReference(rd.getIsReference());

	rnew.setUriString(rd.getUriString());
	rnew.setParentFolder(rd.getParentFolder());
	rnew.setDataSourceType(rd.getDataSourceType());
	rnew.setWsType(rd.getWsType());

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

示例14: 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 {
	rd.fixStructure();
	if (rd.getIsReference()) {
		if (!rd.getWsType().equals(ResourceDescriptor.TYPE_REFERENCE)) {
			rd.setIsReference(false);
			return client.addOrModifyResource(rd, inFile);
		}
	}
	return client.modifyReportUnitResource(runit.getUriString(), rd, inFile);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:12,代码来源:SoapConnection.java

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


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