本文整理汇总了Java中com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor.setReferenceUri方法的典型用法代码示例。如果您正苦于以下问题:Java ResourceDescriptor.setReferenceUri方法的具体用法?Java ResourceDescriptor.setReferenceUri怎么用?Java ResourceDescriptor.setReferenceUri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor
的用法示例。
在下文中一共展示了ResourceDescriptor.setReferenceUri方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例2: 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);
}
}
示例3: 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();
}
示例4: 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;
}
示例5: 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);
}
示例6: 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);
}
}
示例7: createReportUnit
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void createReportUnit(WSClient client, String folder, String name, String label, String jrxmlFile) throws Exception {
String reportUnitUri = folder + "/" + name;
ResourceDescriptor rd = new ResourceDescriptor();
rd.setName(name);
rd.setLabel(label);
rd.setWsType(ResourceDescriptor.TYPE_REPORTUNIT);
rd.setUriString(folder + "/" + name);
rd.setParentFolder(folder);
// If you want delete the report in case it already exists, just uncomment this code
//try {
// client.delete(rd);
//} catch (Exception ex) { }
rd.setIsNew(true);
rd.setResourceProperty(ResourceDescriptor.PROP_RU_ALWAYS_PROPMT_CONTROLS, true);
ResourceDescriptor datasource = new ResourceDescriptor();
datasource.setIsNew(true);
datasource.setWsType(ResourceDescriptor.TYPE_DATASOURCE);
datasource.setIsReference(true);
datasource.setReferenceUri("/datasources/JServerJdbcDS");
rd.getChildren().add(datasource);
ResourceDescriptor jrxmlDescriptor = new ResourceDescriptor();
jrxmlDescriptor.setName("main_jrxml");
jrxmlDescriptor.setLabel("Main Jrxml");
jrxmlDescriptor.setWsType( ResourceDescriptor.TYPE_JRXML );
jrxmlDescriptor.setIsNew(true);
jrxmlDescriptor.setMainReport(true);
jrxmlDescriptor.setIsReference(false);
jrxmlDescriptor.setHasData(true);
rd.getChildren().add( jrxmlDescriptor );
client.addOrModifyResource( rd, new File(jrxmlFile));
System.out.println(" Created report " + label);
System.out.flush();
}