本文整理汇总了Java中com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty类的典型用法代码示例。如果您正苦于以下问题:Java ResourceProperty类的具体用法?Java ResourceProperty怎么用?Java ResourceProperty使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ResourceProperty类属于com.jaspersoft.jasperserver.api.metadata.xml.domain.impl包,在下文中一共展示了ResourceProperty类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: bindAWS
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
private void bindAWS() {
List<ResourceProperty> props = res.getValue().getProperties();
ResourceProperty resprop = ResourceDescriptorUtil.getProperty(MRDatasourceAWS.PROP_DATASOURCE_AWS_ACCESS_KEY, props);
if (resprop != null)
bAccessKey = bindingContext.bindValue(SWTObservables.observeText(awsAccessKey, SWT.Modify), PojoObservables.observeValue(resprop, "value"));
resprop = ResourceDescriptorUtil.getProperty(MRDatasourceAWS.PROP_DATASOURCE_AWS_SECRET_KEY, props);
if (resprop != null)
bSecretKey = bindingContext.bindValue(SWTObservables.observeText(awsSecretKey, SWT.Modify), PojoObservables.observeValue(resprop, "value"));
resprop = ResourceDescriptorUtil.getProperty(MRDatasourceAWS.PROP_DATASOURCE_AWS_ROLE_ARN, props);
if (resprop != null)
bArn = bindingContext.bindValue(SWTObservables.observeText(awsArn, SWT.Modify), PojoObservables.observeValue(resprop, "value"));
}
示例2: createContent
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
@Override
public Control createContent(Composite parent) {
Composite cmp = new Composite(parent, SWT.NONE);
cmp.setLayout(new GridLayout(2, false));
UIUtil.createLabel(cmp, "Catalog");
Text tCatalog = new Text(cmp, SWT.BORDER);
tCatalog.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
List<ResourceProperty> props = res.getValue().getProperties();
ResourceProperty resprop = ResourceDescriptorUtil.getProperty(ResourceDescriptor.PROP_XMLA_CATALOG, props);
bindingContext.bindValue(SWTObservables.observeText(tCatalog, SWT.Modify), PojoObservables.observeValue(resprop, "value"));
Control c = super.createContent(cmp);
GridData gd = new GridData(GridData.FILL_BOTH);
gd.horizontalSpan = 2;
c.setLayoutData(gd);
return cmp;
}
示例3: getDefaults
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
public void getDefaults() {
defaults = new HashMap<String, Object>();
if (rdrepunit.getWsType().equals("ReportOptionsResource")) {
ResourceProperty rp = rdrepunit.getResourceProperty("PROP_VALUES");
List<ResourceProperty> list = rp.getProperties();
if (list != null)
for (ResourceProperty li : list) {
if (!li.getProperties().isEmpty()) {
List<String> listVal = new ArrayList<String>();
for (Object sli : li.getProperties())
listVal.add(((ResourceProperty) sli).getValue());
defaults.put(li.getName(), listVal);
} else
defaults.put(li.getName(), Misc.nvl(li.getValue()));
}
}
}
示例4: cloneResourceDescriptor
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
/**
* Create a clone of the resource descriptor. The replication is recursive.
* @param rd The ResourceDescriptor to clone
* @return the new clone
*/
public static ResourceDescriptor cloneResourceDescriptor(ResourceDescriptor rd)
{
ResourceDescriptor newRd = new ResourceDescriptor();
newRd.setName( rd.getName());
newRd.setWsType( rd.getWsType() );
newRd.setLabel( rd.getLabel());
newRd.setDescription( rd.getDescription());
newRd.setUriString( rd.getUriString());
newRd.setIsNew( rd.getIsNew());
for (int i=0; i< rd.getChildren().size(); ++i)
{
ResourceDescriptor tmpRd = (ResourceDescriptor)rd.getChildren().get(i);
newRd.getChildren().add( cloneResourceDescriptor( tmpRd ) );
}
for (int i=0; i< rd.getProperties().size(); ++i)
{
ResourceProperty tmpRp = (ResourceProperty)rd.getProperties().get(i);
newRd.getProperties().add( cloneResourceProperty( tmpRp ) );
}
return newRd;
}
示例5: getMondrianXmlaDefinition
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
private static void getMondrianXmlaDefinition(ARestV2Connection rc, ClientMondrianXmlaDefinition cr, ResourceDescriptor rd) throws ParseException {
ResourceProperty rp = rd.getResourceProperty(ResourceDescriptor.PROP_XMLA_CATALOG);
if (rp != null)
cr.setCatalog(rp.getValue());
for (ResourceDescriptor r : (List<ResourceDescriptor>) rd.getChildren()) {
if (r.getWsType().equals(ResourceDescriptor.TYPE_OLAP_MONDRIAN_CONNECTION) || r.getWsType().equals(ResourceDescriptor.TYPE_SECURE_MONDRIAN_CONNECTION))
cr.setMondrianConnection((ClientReferenceableMondrianConnection) getResourceContainer(rc, r));
}
}
示例6: getCustomDataSource
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
private static void getCustomDataSource(ARestV2Connection rc, ClientCustomDataSource cr, ResourceDescriptor rd) throws ParseException {
rd.setServiceClass(cr.getServiceClass());
if (cr.getProperties() != null) {
ResourceProperty rp = new ResourceProperty(MRDatasourceCustom.PROP_DATASOURCE_CUSTOM_PROPERTY_MAP);
List<ResourceProperty> props = new ArrayList<ResourceProperty>();
for (ClientProperty cp : cr.getProperties())
props.add(new ResourceProperty(cp.getKey(), cp.getValue()));
rp.setProperties(props);
rd.setResourceProperty(rp);
}
DiffFields.setSoapValue(rd, DiffFields.DATASOURCENAME, cr.getDataSourceName());
}
示例7: getProperty
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
public static ResourceProperty getProperty(String name, List<ResourceProperty> props) {
for (ResourceProperty rp : props) {
if (rp.getName().equals(name)) //$NON-NLS-1$
return rp;
}
return null;
}
示例8: getColumnText
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
public String getColumnText(Object element, int columnIndex) {
ResourceProperty rp = (ResourceProperty) element;
switch (columnIndex) {
case 0:
return Misc.nvl(rp.getName());
case 1:
return Misc.nvl(rp.getValue());
}
return ""; //$NON-NLS-1$
}
示例9: getResource
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
public MResource getResource(ANode parent, ResourceDescriptor resource, int index) {
if (resource.getWsType().equals(ResourceDescriptor.TYPE_DATASOURCE_CUSTOM)) {
ResourceProperty rp = ResourceDescriptorUtil.getProperty(ResourceDescriptor.PROP_DATASOURCE_CUSTOM_SERVICE_CLASS, resource.getProperties());
if (rp != null && rp.getValue().equals(MRDatasourceMongoDB.CUSTOM_CLASS))
return new MRDatasourceMongoDB(parent, resource, index);
}
return null;
}
示例10: getResource
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
public MResource getResource(ANode parent, ResourceDescriptor resource, int index) {
if (resource.getWsType().equals(ResourceDescriptor.TYPE_DATASOURCE_CUSTOM)) {
ResourceProperty rp = ResourceDescriptorUtil.getProperty(ResourceDescriptor.PROP_DATASOURCE_CUSTOM_SERVICE_CLASS, resource.getProperties());
if (rp != null && rp.getValue().equals(MRDatasourceCassandra.CUSTOM_CLASS))
return new MRDatasourceCassandra(parent, resource, index);
}
return null;
}
示例11: getResource
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
public MResource getResource(ANode parent, ResourceDescriptor resource, int index) {
if (resource.getWsType().equals(ResourceDescriptor.TYPE_DATASOURCE_CUSTOM)) {
ResourceProperty rp = ResourceDescriptorUtil.getProperty(ResourceDescriptor.PROP_DATASOURCE_CUSTOM_SERVICE_CLASS, resource.getProperties());
if (rp != null && rp.getValue().equals(MRDatasourceHadoopHive.CUSTOM_CLASS))
return new MRDatasourceHadoopHive(parent, resource, index);
}
return null;
}
示例12: rebind
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
@Override
protected void rebind() {
ResourceProperty resprop = ResourceDescriptorUtil.getProperty(MRDatasourceCustom.PROP_DATASOURCE_CUSTOM_PROPERTY_MAP, res.getValue().getProperties());
resprop = ResourceDescriptorUtil.getProperty(MRDatasourceHadoopHive.JDBC_URL, resprop.getProperties());
bindingContext.bindValue(SWTObservables.observeText(tname, SWT.Modify), PojoObservables.observeValue(resprop, "value")); //$NON-NLS-1$
}
示例13: cloneResourceProperty
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
/**
* Create a clone of the resource property. The replication is recursive.
* @param rp The ResourceProperty to clone
* @return the new clone
*/
public static ResourceProperty cloneResourceProperty(ResourceProperty rp)
{
ResourceProperty newRp = new ResourceProperty(rp.getName(), rp.getValue());
for (int i=0; i< rp.getProperties().size(); ++i)
{
ResourceProperty tmpRp = (ResourceProperty)rp.getProperties().get(i);
newRp.getProperties().add( cloneResourceProperty( tmpRp ) );
}
return newRp;
}
示例14: getResource
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
public AMResource getResource(ANode parent, ResourceDescriptor resource, int index) {
if (resource.getWsType().equals(ResourceDescriptor.TYPE_DATASOURCE_CUSTOM)) {
ResourceProperty rp = ResourceDescriptorUtil.getProperty(ResourceDescriptor.PROP_DATASOURCE_CUSTOM_SERVICE_CLASS, resource.getProperties());
if (rp != null && rp.getValue().equals(MRDatasourceES.CUSTOM_CLASS))
return new MRDatasourceES(parent, resource, index);
}
return null;
}
示例15: setSoapValue
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceProperty; //导入依赖的package包/类
public static void setSoapValue(ResourceDescriptor rd, String key, String v) {
rd.setResourceProperty(new ResourceProperty(key, v));
}