Search in sources :

Example 1 with XmlyFileProperties

use of com.zhouzifei.tool.config.XmlyFileProperties in project simpleFS by shengdingbox.

the class XMLYApiClient method init.

@Override
public XMLYApiClient init(FileProperties fileProperties) {
    final XmlyFileProperties xmlyFileProperties = fileProperties.getXmly();
    String xmlyCookie = xmlyFileProperties.getCookies();
    if (StringUtils.isEmpty(xmlyCookie)) {
        // if(!(Boolean) jsonObject.get("success")){
        throw new ServiceException("[" + this.storageType + "]初始化失败");
    // }
    // final JSONObject data = (JSONObject)jsonObject.get("data");
    // final Object token1 = data.get("token");
    // XMLYApiClient.token = (String) token1;
    } else {
        XMLYApiClient.token = "1&_token=" + xmlyCookie + ";&" + xmlyCookie;
    }
    return this;
}
Also used : ServiceException(com.aliyun.oss.ServiceException) XmlyFileProperties(com.zhouzifei.tool.config.XmlyFileProperties)

Aggregations

ServiceException (com.aliyun.oss.ServiceException)1 XmlyFileProperties (com.zhouzifei.tool.config.XmlyFileProperties)1