本文整理汇总了Java中com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor.setWsType方法的典型用法代码示例。如果您正苦于以下问题:Java ResourceDescriptor.setWsType方法的具体用法?Java ResourceDescriptor.setWsType怎么用?Java ResourceDescriptor.setWsType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor
的用法示例。
在下文中一共展示了ResourceDescriptor.setWsType方法的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);
}
}
示例2: checkConnection
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static boolean checkConnection(MServerProfile msp, IProgressMonitor monitor) throws Exception {
monitor.subTask("Connecting to " + msp.getDisplayText());
IConnection c = new ProxyConnection();
boolean cres = c.connect(monitor, msp.getValue());
if (cres) {
monitor.subTask("Connected");
msp.setWsClient(c);
monitor.subTask("Trying to read folder");
ResourceDescriptor rd = new ResourceDescriptor();
rd.setWsType(ResourceDescriptor.TYPE_FOLDER);
rd.setUriString("/");
c.get(monitor, rd, null);
} else
monitor.subTask("Not Connected");
return cres;
}
示例3: 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());
}
示例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 List<ResourceDescriptor> listFolder(ANode parent, IConnection client, String folderUri, IProgressMonitor monitor, int depth) throws Exception {
ResourceDescriptor rd = new ResourceDescriptor();
rd.setWsType(ResourceDescriptor.TYPE_FOLDER);
rd.setUriString(folderUri);
if (depth < 1) {
parent.removeChildren();
return listFolder(parent, -1, client, monitor, rd, depth);
}
return null;
}
示例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: getSecureMondrianConnection
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void getSecureMondrianConnection(ARestV2Connection rc, ClientSecureMondrianConnection cr, ResourceDescriptor rd) throws ParseException {
if (cr.getDataSource() != null)
rd.getChildren().add(getDataSource(rc, cr.getDataSource()));
if (cr.getSchema() != null)
rd.getChildren().add(getRDContainer(rc, (ClientResource<?>) cr.getSchema()));
if (cr.getAccessGrants() != null) {
for (ClientReferenceableFile crf : cr.getAccessGrants()) {
ResourceDescriptor ard = getRDContainer(rc, (ClientResource<?>) crf);
ard.setWsType(ResourceDescriptor.TYPE_ACCESS_GRANT_SCHEMA);
rd.getChildren().add(ard);
}
}
}
示例7: 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;
}
示例8: move
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
@Override
public ResourceDescriptor move(IProgressMonitor monitor, ResourceDescriptor rd, String destFolderURI) throws Exception {
client.move(rd, destFolderURI);
ResourceDescriptor nrd = new ResourceDescriptor();
nrd.setWsType(rd.getWsType());
nrd.setUriString(destFolderURI + "/" + rd.getName());
return parent.get(monitor, nrd, null);
}
示例9: runReportUnit
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static ReportExecution runReportUnit(IProgressMonitor monitor, ReportExecution repExec, Map<String, Object> parameters) throws Exception {
if (repExec.getResourceDescriptor() == null) {
ResourceDescriptor rd = new ResourceDescriptor();
rd.setUriString(repExec.getReportURI());
rd.setWsType(ResourceDescriptor.TYPE_REPORTUNIT);
repExec.setResourceDescriptor(rd);
}
repExec.setPrm(parameters);
if (repExec.getArgs() == null) {
List<Argument> args = new ArrayList<Argument>();
args.add(new Argument(Argument.RUN_OUTPUT_FORMAT, Argument.RUN_OUTPUT_FORMAT_JRPRINT));
repExec.setArgs(args);
}
return getClient(monitor, repExec.getReportURIFull()).runReport(monitor, repExec);
}
示例10: 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_LOV);
return rd;
}
示例11: getRD
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static ResourceDescriptor getRD(ARestV2Connection rc, ClientResource<?> cr, ResourceDescriptor rd) throws ParseException {
rd.getChildren().clear();
rd.setWsType(WsTypes.INST().toSoapType(cr));
rd.setIsNew(false);
rd.setParentFolder(RDUtil.getParentFolder(cr.getUri()));
rd.setUriString(cr.getUri());
rd.setLabel(cr.getLabel());
rd.setDescription(cr.getDescription());
rd.setName(RDUtil.getID(cr.getUri()));
rd.setVersion(Misc.nvl(cr.getVersion(), 0));
rd.setCreationDate(rc.toTimestamp(cr.getCreationDate()));
DiffFields.setSoapValue(rd, DiffFields.UPDATEDATE, cr.getUpdateDate());
rd.setPermissionMask(Misc.nvl(cr.getPermissionMask(), 0));
// look recursively
if (cr instanceof ClientDataType)
getDataType(rc, (ClientDataType) cr, rd);
else if (cr instanceof ClientAdhocDataView)
getAdhocDataView(rc, (ClientAdhocDataView) cr, rd);
else if (cr instanceof ClientJdbcDataSource)
getJdbcDataSource(rc, (ClientJdbcDataSource) cr, rd);
else if (cr instanceof ClientJndiJdbcDataSource)
getJndiDataSource(rc, (ClientJndiJdbcDataSource) cr, rd);
else if (cr instanceof ClientAwsDataSource)
getAWSDataSource(rc, (ClientAwsDataSource) cr, rd);
else if (cr instanceof ClientVirtualDataSource)
getVirtualDataSource(rc, (ClientVirtualDataSource) cr, rd);
else if (cr instanceof ClientCustomDataSource)
getCustomDataSource(rc, (ClientCustomDataSource) cr, rd);
else if (cr instanceof ClientBeanDataSource)
getBeanDataSource(rc, (ClientBeanDataSource) cr, rd);
else if (cr instanceof ClientOlapUnit)
getOlapUnit(rc, (ClientOlapUnit) cr, rd);
else if (cr instanceof ClientQuery)
getQuery(rc, (ClientQuery) cr, rd);
else if (cr instanceof ClientXmlaConnection)
getXmlaConnection(rc, (ClientXmlaConnection) cr, rd);
else if (cr instanceof ClientMondrianConnection)
getMondrianConnection(rc, (ClientMondrianConnection) cr, rd);
else if (cr instanceof ClientSecureMondrianConnection)
getSecureMondrianConnection(rc, (ClientSecureMondrianConnection) cr, rd);
else if (cr instanceof ClientMondrianXmlaDefinition)
getMondrianXmlaDefinition(rc, (ClientMondrianXmlaDefinition) cr, rd);
else if (cr instanceof ClientListOfValues)
getLOV(rc, (ClientListOfValues) cr, rd);
else if (cr instanceof AbstractClientReportUnit)
getReportUnit(rc, (AbstractClientReportUnit<?>) cr, rd);
else if (cr instanceof ClientInputControl)
getInputControl(rc, (ClientInputControl) cr, rd);
else if (cr instanceof ClientFile)
getFile(rc, (ClientFile) cr, rd);
else
rd = Misc.nvl(Activator.getExtManager().getRD(rc, cr, rd), rd);
return rd;
}
示例12: createDescriptor
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static ResourceDescriptor createDescriptor(MResource parent) {
ResourceDescriptor rd = MResource.createDescriptor(parent);
rd.setWsType(ResourceDescriptor.TYPE_DATASOURCE);
return rd;
}
示例13: 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_ACCESS_GRANT_SCHEMA);
return rd;
}
示例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_DATASOURCE_BEAN);
return rd;
}
示例15: getMainReport
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static ResourceDescriptor getMainReport(IProgressMonitor monitor, MReportUnit mrunit, JasperDesign jd) {
String jrxmln = jd.getProperty(AExporter.PROP_REPORTRESOURCE);
String unit = mrunit.getValue().getUriString();
if (jrxmln != null) {
if (unit != null && jrxmln.startsWith(unit) && jrxmln.length() > unit.length() && jrxmln.substring((unit + WSClientHelper._FILES).length()).indexOf('/') < 0) {
MServerProfile sp = (MServerProfile) mrunit.getRoot();
if (sp != null) {
ResourceDescriptor rd = new ResourceDescriptor();
rd.setName(jrxmln.substring((unit + WSClientHelper._FILES).length()));
rd.setLabel(IDStringValidator.safeChar(rd.getName()));
rd.setUriString(jrxmln);
rd.setParentFolder(unit + "_files");
rd.setUriString(rd.getParentFolder() + "/" + rd.getName());
rd.setIsNew(true);
rd.setWsType(ResourceDescriptor.TYPE_JRXML);
rd.setIsReference(false);
rd.setHasData(true);
try {
rd = sp.getWsClient(monitor).get(monitor, rd, null);
rd.setHasData(true);
if (rd != null)
return rd;
} catch (Exception e) {
rd.setMainReport(true);
return rd;
}
}
}
}
ResourceDescriptor mainr = new ResourceDescriptor();
mainr.setName(Messages.JrxmlPublishAction_defaultresourcename);
mainr.setLabel(Messages.JrxmlPublishAction_defaultresourcelabel);
mainr.setWsType(ResourceDescriptor.TYPE_JRXML);
mainr.setIsNew(true);
mainr.setMainReport(true);
mainr.setIsReference(false);
mainr.setHasData(true);
mainr.setParentFolder(unit + "_files");
mainr.setUriString(mainr.getParentFolder() + "/" + mainr.getName());
return mainr;
}