• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java BaseFaultTypeDescription类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.oasis.wsrf.faults.BaseFaultTypeDescription的典型用法代码示例。如果您正苦于以下问题:Java BaseFaultTypeDescription类的具体用法?Java BaseFaultTypeDescription怎么用?Java BaseFaultTypeDescription使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

BaseFaultTypeDescription类属于org.oasis.wsrf.faults包,在下文中一共展示了BaseFaultTypeDescription类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: addDescription

点赞 3

import org.oasis.wsrf.faults.BaseFaultTypeDescription; //导入依赖的package包/类
/**
 * Adds a description to the description list of the fault.
 *
 * @param description the description to add.
 */
public void addDescription(String description) {
    if (description == null) {
        // not throwing an exception when this can be properly handled
        // throw new IllegalArgumentException(i18n.getMessage(
        //    "nullArgument", "description"));
        description = "null";
    }
    BaseFaultTypeDescription [] desc = this.fault.getDescription();
    BaseFaultTypeDescription [] newDesc = null;
    if (desc == null) {
        newDesc = new BaseFaultTypeDescription[1];
    } else {
        newDesc = new BaseFaultTypeDescription[desc.length + 1];
        System.arraycopy(desc, 0, newDesc, 0, desc.length);
    }
    newDesc[newDesc.length - 1] = 
        new BaseFaultTypeDescription(description);
    this.fault.setDescription(newDesc);
}
 

开发者ID:NCIP,
项目名称:cagrid-core,
代码行数:25,
代码来源:FaultHelper.java

示例2: createStackFault

点赞 3

import org.oasis.wsrf.faults.BaseFaultTypeDescription; //导入依赖的package包/类
private static BaseFaultType createStackFault(String message,
                                              String stackTrace) {
    BaseFaultType stackFault = new BaseFaultType();
    BaseFaultTypeErrorCode errorCode = new BaseFaultTypeErrorCode();
    errorCode.setDialect(STACK_TRACE);
    errorCode.set_any(AnyHelper.toText(stackTrace));
    stackFault.setErrorCode(errorCode);
    
    if (message != null && message.length() > 0) {
        BaseFaultTypeDescription [] desc = new BaseFaultTypeDescription[1];
        desc[0] = new BaseFaultTypeDescription(message);
        stackFault.setDescription(desc);
    }
    
    stackFault.setTimestamp(Calendar.getInstance());
    
    return stackFault;
}
 

开发者ID:NCIP,
项目名称:cagrid-core,
代码行数:19,
代码来源:FaultHelper.java

示例3: getDescriptionAsString

点赞 2

import org.oasis.wsrf.faults.BaseFaultTypeDescription; //导入依赖的package包/类
/**
 * Returns all the descriptions of the fault as a simple string.
 */
public String getDescriptionAsString() {
    BaseFaultTypeDescription [] desc = this.fault.getDescription();
    if (desc == null) {
        return null;
    }
    StringBuffer buf = new StringBuffer();
    for (int i=0;i<desc.length;i++) {
        buf.append(desc[i].get_value());
        if (i+1<desc.length) {
            buf.append(" / ");
        }
    }
    return buf.toString();
}
 

开发者ID:NCIP,
项目名称:cagrid-core,
代码行数:18,
代码来源:FaultHelper.java

示例4: getDescription

点赞 2

import org.oasis.wsrf.faults.BaseFaultTypeDescription; //导入依赖的package包/类
/**
 * Returns descriptions of the fault.
 *
 * @return the descriptions. Might be null.
 */
public String[] getDescription() {
    BaseFaultTypeDescription [] desc = this.fault.getDescription();
    if (desc == null) {
        return null;
    }
    String [] description = new String[desc.length];
    for (int i=0;i<description.length;i++) {
        description[i] = desc[i].get_value();
    }
    return description;
}
 

开发者ID:NCIP,
项目名称:cagrid-core,
代码行数:17,
代码来源:FaultHelper.java

示例5: setDescription

点赞 2

import org.oasis.wsrf.faults.BaseFaultTypeDescription; //导入依赖的package包/类
/**
 * Sets the description of the fault. 
 *
 * @param description the new descriptions of the fault.
 */
public void setDescription(String[] description) {
    BaseFaultTypeDescription [] desc = null;
    if (description != null) {
        desc = new BaseFaultTypeDescription[description.length];
        for (int i=0;i<description.length;i++) {
            desc[i] = new BaseFaultTypeDescription(description[i]);
        }
    }
    this.fault.setDescription(desc);
}
 

开发者ID:NCIP,
项目名称:cagrid-core,
代码行数:16,
代码来源:FaultHelper.java

示例6: getDescription

点赞 2

import org.oasis.wsrf.faults.BaseFaultTypeDescription; //导入依赖的package包/类
private String getDescription(InvalidParameterException e) {
    StringBuffer description = new StringBuffer();
    for (BaseFaultTypeDescription typeDescription : e.getDescription()) {
        if (description.length() > 0) {
            description.append(", ");
        }
        description.append(typeDescription.get_value());
    }
    return description.toString();
}
 

开发者ID:NCIP,
项目名称:caintegrator,
代码行数:11,
代码来源:GisticGridRunner.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)