本文整理汇总了Java中com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor.getChildren方法的典型用法代码示例。如果您正苦于以下问题:Java ResourceDescriptor.getChildren方法的具体用法?Java ResourceDescriptor.getChildren怎么用?Java ResourceDescriptor.getChildren使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor
的用法示例。
在下文中一共展示了ResourceDescriptor.getChildren方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: cascadeInputControls
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
@Override
public List<ResourceDescriptor> cascadeInputControls(ResourceDescriptor runit, List<ResourceDescriptor> ics, IProgressMonitor monitor) throws Exception {
String dsUri = null;
for (ResourceDescriptor sub_rd : runit.getChildren()) {
String wsType = sub_rd.getWsType();
if (wsType.equals(ResourceDescriptor.TYPE_DATASOURCE) && sub_rd.getIsReference())
dsUri = sub_rd.getReferenceUri();
else if (SelectorDatasource.isDatasource(sub_rd))
dsUri = sub_rd.getUriString();
}
String ruri = runit.getUriString();
List<ResourceDescriptor> res = new ArrayList<ResourceDescriptor>();
for (ResourceDescriptor rd : ics)
res.add(updateControl(ruri, dsUri, rd, monitor));
return res;
}
示例2: getInputControl
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void getInputControl(ARestV2Connection rc, ClientInputControl cr, ResourceDescriptor rd) throws ParseException {
cr.setMandatory(rd.isMandatory());
cr.setReadOnly(rd.isReadOnly());
cr.setVisible(rd.isVisible());
cr.setType(rd.getControlType());
cr.setValueColumn(rd.getQueryValueColumn());
if (rd.getQueryVisibleColumns() != null)
cr.setVisibleColumns(Arrays.asList(rd.getQueryVisibleColumns()));
List<ResourceDescriptor> children = rd.getChildren();
for (ResourceDescriptor r : children) {
if (r.getWsType().equals(ResourceDescriptor.TYPE_LOV))
cr.setListOfValues((ClientReferenceableListOfValues) getResourceContainer(rc, r));
else if (r.getWsType().equals(ResourceDescriptor.TYPE_QUERY))
cr.setQuery((ClientReferenceableQuery) getResourceContainer(rc, r));
else if (r.getWsType().equals(ResourceDescriptor.TYPE_DATA_TYPE))
cr.setDataType((ClientReferenceableDataType) getResourceContainer(rc, r));
}
}
示例3: list
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
@Override
public List<ResourceDescriptor> list(IProgressMonitor monitor, ResourceDescriptor rd) throws Exception {
List<ResourceDescriptor> rds = new ArrayList<ResourceDescriptor>();
if (rd.getWsType().equals(ResourceDescriptor.TYPE_REPORTUNIT)) {
rd = get(monitor, rd, null);
return rd.getChildren();
} else {
URIBuilder ub = new URIBuilder(url("resources"));
ub.addParameter("folderUri", rd.getUriString());
ub.addParameter("recursive", "false");
ub.addParameter("sortBy", "label");
ub.addParameter("limit", Integer.toString(Integer.MAX_VALUE));
ClientResourceListWrapper resources = toObj(HttpUtils.get(ub.build().toASCIIString(), sp), ClientResourceListWrapper.class, monitor);
if (resources != null)
for (ClientResourceLookup crl : resources.getResourceLookups())
rds.add(Rest2Soap.getRDLookup(this, crl));
}
return rds;
}
示例4: 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);
}
示例5: getMondrianConnection
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void getMondrianConnection(ARestV2Connection rc, ClientMondrianConnection cr, ResourceDescriptor rd) throws ParseException {
for (ResourceDescriptor r : (List<ResourceDescriptor>) rd.getChildren()) {
if (SelectorDatasource.isDatasource(r))
cr.setDataSource((ClientReferenceableDataSource) getResourceContainer(rc, r));
else if (r.getWsType().equals(ResourceDescriptor.TYPE_MONDRIAN_SCHEMA))
cr.setSchema((ClientReferenceableFile) getResourceContainer(rc, r));
}
}
示例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 {
for (ResourceDescriptor r : (List<ResourceDescriptor>) rd.getChildren()) {
if (SelectorDatasource.isDatasource(r))
cr.setDataSource((ClientReferenceableDataSource) getResourceContainer(rc, r));
else if (r.getWsType().equals(ResourceDescriptor.TYPE_MONDRIAN_SCHEMA))
cr.setSchema((ClientReferenceableFile) getResourceContainer(rc, r));
else if (r.getWsType().equals(ResourceDescriptor.TYPE_ACCESS_GRANT_SCHEMA)) {
if (cr.getAccessGrants() == null)
cr.setAccessGrants(new ArrayList<ClientReferenceableFile>());
cr.getAccessGrants().add((ClientReferenceableFile) getResourceContainer(rc, r));
}
}
}
示例7: getOlapUnit
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void getOlapUnit(ARestV2Connection rc, ClientOlapUnit cr, ResourceDescriptor rd) throws ParseException {
cr.setMdxQuery(rd.getSql());
for (ResourceDescriptor r : (List<ResourceDescriptor>) rd.getChildren()) {
if (r.getWsType().equals(ResourceDescriptor.TYPE_OLAP_XMLA_CONNECTION) || r.getWsType().equals(ResourceDescriptor.TYPE_OLAP_MONDRIAN_CONNECTION)
|| r.getWsType().equals(ResourceDescriptor.TYPE_SECURE_MONDRIAN_CONNECTION))
cr.setOlapConnection((ClientReferenciableOlapConnection) getResourceContainer(rc, r));
}
}
示例8: getVirtualDataSource
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void getVirtualDataSource(ARestV2Connection rc, ClientVirtualDataSource cr, ResourceDescriptor rd) {
List<ClientSubDataSourceReference> ds = new ArrayList<ClientSubDataSourceReference>();
for (ResourceDescriptor r : (List<ResourceDescriptor>) rd.getChildren()) {
ClientSubDataSourceReference d = new ClientSubDataSourceReference();
d.setId(r.getResourcePropertyValue("PROP_DATASOURCE_SUB_DS_ID"));
d.setUri(r.getReferenceUri());
ds.add(d);
}
cr.setSubDataSources(ds);
}
示例9: getResourceDescriptor
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
protected ResourceDescriptor getResourceDescriptor(ResourceDescriptor ru) {
for (Object obj : ru.getChildren()) {
ResourceDescriptor r = (ResourceDescriptor) obj;
if (r.getWsType().equals(ResourceDescriptor.TYPE_ACCESS_GRANT_SCHEMA))
return r;
}
return null;
}
示例10: getResourceDescriptor
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
protected ResourceDescriptor getResourceDescriptor(ResourceDescriptor ru) {
for (Object obj : ru.getChildren()) {
ResourceDescriptor r = (ResourceDescriptor) obj;
if (r.getWsType().equals(ResourceDescriptor.TYPE_JRXML) && r.isMainReport())
return r;
}
return null;
}
示例11: initInputControls
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public void initInputControls(ResourceDescriptor rdrepunit) {
this.rdrepunit = rdrepunit;
inputcontrols = new ArrayList<ResourceDescriptor>();
if (rdrepunit != null)
for (ResourceDescriptor sub_rd : rdrepunit.getChildren()) {
String wsType = sub_rd.getWsType();
if (wsType.equals(ResourceDescriptor.TYPE_INPUT_CONTROL))
inputcontrols.add(sub_rd);
}
}
示例12: hasTypeQuery
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static boolean hasTypeQuery(MResource res) {
ResourceDescriptor rd = res.getValue();
for (Object obj : rd.getChildren()) {
ResourceDescriptor r = (ResourceDescriptor) obj;
if (r.getWsType().equals(ResourceDescriptor.TYPE_QUERY))
return true;
}
return false;
}
示例13: getResourceDescriptor
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
protected ResourceDescriptor getResourceDescriptor(ResourceDescriptor ru) {
for (Object obj : ru.getChildren()) {
ResourceDescriptor r = (ResourceDescriptor) obj;
if (r.getWsType().equals(ResourceDescriptor.TYPE_SECURE_MONDRIAN_CONNECTION) || r.getWsType().equals(ResourceDescriptor.TYPE_OLAP_MONDRIAN_CONNECTION)
|| r.getWsType().equals(ResourceDescriptor.TYPE_OLAP_XMLA_CONNECTION))
return r;
}
return null;
}
示例14: getResourceDescriptor
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
protected ResourceDescriptor getResourceDescriptor(ResourceDescriptor ru) {
for (Object obj : ru.getChildren()) {
ResourceDescriptor r = (ResourceDescriptor) obj;
if (r.getWsType().equals(ResourceDescriptor.TYPE_CONTENT_RESOURCE))
return r;
}
return null;
}
示例15: fillRightTable
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private void fillRightTable() {
ResourceDescriptor rd = res.getValue();
List<Proxy> input = new ArrayList<Proxy>();
List<ResourceDescriptor> children = rd.getChildren();
for (ResourceDescriptor c : children) {
if (SelectorDatasource.isDatasource(c)) {
input.add(new Proxy(c));
oldvds.add(c);
}
}
rightTView.setInput(input);
}