本文整理汇总了Java中com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor.setDescription方法的典型用法代码示例。如果您正苦于以下问题:Java ResourceDescriptor.setDescription方法的具体用法?Java ResourceDescriptor.setDescription怎么用?Java ResourceDescriptor.setDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor
的用法示例。
在下文中一共展示了ResourceDescriptor.setDescription方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setChild
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static void setChild(ResourceDescriptor rd, ResourceDescriptor child) {
List<ResourceDescriptor> children = rd.getChildren();
for (int i = 0; i < children.size(); i++) {
ResourceDescriptor r = children.get(i);
if (r.isMainReport() && child.isMainReport()) {
child.setName(r.getName());
child.setLabel(r.getLabel());
child.setDescription(r.getDescription());
child.setUriString(r.getUriString());
children.set(i, child);
return;
}
if ((child.getUriString() == null && r.getUriString() == null && child.getWsType().equals(r.getWsType())) || (r.getUriString() != null && r.getUriString().equals(child.getUriString()))) {
if (r.isMainReport())
child.setMainReport(true);
children.set(i, child);
return;
}
}
children.add(child);
}
示例2: getInputControl
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static ResourceDescriptor getInputControl(ARestV2Connection rc, ReportInputControl cr, ResourceDescriptor rd) throws ParseException {
rd.setName(cr.getId());
rd.setUriString(cr.getUri());
rd.setLabel(cr.getLabel());
rd.setDescription(cr.getDescription());
rd.setWsType(ResourceDescriptor.TYPE_INPUT_CONTROL);
rd.setValue(cr);
return rd;
}
示例3: copyFields
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static void copyFields(ResourceDescriptor rd, ResourceDescriptor rnew) {
rnew.setParameters(rd.getParameters());
rnew.setProperties(rd.getProperties());
rnew.setChildren(rd.getChildren());
rnew.setQueryData(rd.getQueryData());
rnew.setQueryValueColumn(rd.getQueryValueColumn());
rnew.setQueryVisibleColumns(rd.getQueryVisibleColumns());
rnew.setListOfValues(rd.getListOfValues());
rnew.setPattern(rd.getPattern());
rnew.setMinValue(rd.getMinValue());
rnew.setMaxValue(rd.getMaxValue());
rnew.setStrictMin(rd.isStrictMin());
rnew.setStrictMax(rd.isStrictMax());
rnew.setDataType(rd.getDataType());
rnew.setJndiName(rd.getJndiName());
rnew.setBeanMethod(rd.getBeanMethod());
rnew.setBeanName(rd.getBeanName());
rnew.setDriverClass(rd.getDriverClass());
rnew.setUsername(rd.getUsername());
rnew.setPassword(rd.getPassword());
rnew.setConnectionUrl(rd.getConnectionUrl());
rnew.setName(rd.getName());
rnew.setLabel(rd.getLabel());
rnew.setDescription(rd.getDescription());
rnew.setData(rd.getData());
rnew.setHasData(rd.getHasData());
rnew.setSql(rd.getSql());
}
示例4: 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;
}
示例5: 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);
}
}
示例6: handleSelectionChanged
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
protected void handleSelectionChanged(Object obj) {
if (isRefresh)
return;
isRefresh = true;
boolean isFolder = obj instanceof MFolder;
bnRunit.setSelection(isFolder);
bnRunit.setEnabled(isFolder);
ruLabel.setEnabled(bnRunit.getSelection() && isFolder);
ruID.setEnabled(bnRunit.getSelection() && isFolder);
ruDescription.setEnabled(bnRunit.getSelection() && isFolder);
reportUnit = getNewRunit();
if (obj instanceof MReportUnit) {
reportUnit = getNewRunit();
reportUnit = (MReportUnit) obj;
ruLabel.setText(Misc.nvl(reportUnit.getValue().getLabel()));
ruID.setText(Misc.nvl(reportUnit.getValue().getName()));
ruDescription.setText(Misc.nvl(reportUnit.getValue().getDescription()));
} else if (obj instanceof MFolder) {
newrunit = getNewRunit();
newrunit.setParent((ANode) obj, -1);
newjrxml = getNewJrxml();
newjrxml.setParent((ANode) obj, -1);
if (bnRunit.getSelection())
reportUnit = newrunit;
else
reportUnit = newjrxml;
ResourceDescriptor nrd = reportUnit.getValue();
nrd.setName(ruID.getText());
nrd.setLabel(ruLabel.getText());
nrd.setDescription(ruDescription.getText());
String uri = ((MFolder) obj).getValue().getUriString();
nrd.setParentFolder(uri);
nrd.setUriString(uri + "/" + nrd.getName()); //$NON-NLS-1$
} else if (obj instanceof MJrxml) {
reportUnit = getNewJrxml();
reportUnit = (MJrxml) obj;
ruLabel.setText(Misc.nvl(reportUnit.getValue().getLabel()));
ruID.setText(Misc.nvl(reportUnit.getValue().getName()));
ruDescription.setText(Misc.nvl(reportUnit.getValue().getDescription()));
} else if (obj instanceof MResource) {
ANode mparent = ((MResource) obj).getParent();
treeViewer.setSelection(new StructuredSelection(mparent), true);
handleSelectionChanged(mparent);
} else
setPageComplete(false);
performPageChecks();
isRefresh = false;
}