本文整理汇总了Java中com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor.setDataType方法的典型用法代码示例。如果您正苦于以下问题:Java ResourceDescriptor.setDataType方法的具体用法?Java ResourceDescriptor.setDataType怎么用?Java ResourceDescriptor.setDataType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor
的用法示例。
在下文中一共展示了ResourceDescriptor.setDataType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDataType
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
private static void getDataType(ARestV2Connection rc, ClientDataType cr, ResourceDescriptor rd) throws ParseException {
rd.setDataType((byte) (cr.getType().ordinal() + 1));
rd.setPattern(cr.getPattern());
rd.setMaxValue(cr.getMaxValue());
rd.setStrictMax(cr.isStrictMax());
rd.setMinValue(cr.getMinValue());
rd.setStrictMin(cr.isStrictMin());
DiffFields.setSoapValue(rd, DiffFields.MAXLENGHT, Misc.nvl(cr.getMaxLength(), new Integer(0)));
}
示例2: 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;
}
示例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: 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();
}
示例5: createDescriptor
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; //导入方法依赖的package包/类
public static ResourceDescriptor createDescriptor(ANode parent) {
ResourceDescriptor rd = MResource.createDescriptor(parent);
rd.setDataType((byte) 1);
rd.setWsType(ResourceDescriptor.TYPE_DATA_TYPE);
return rd;
}