use of one.kii.summer.io.sender.ErestGetBasic in project kiimate by SINeWang.
the class DefaultVisitRawAssetSpi method visit.
@Override
public <T> T visit(Class<T> klass, LatestForm latestForm) throws BadRequest, Panic, NotFound {
String urlTemplate = url + URI;
ErestGetBasic erestGet = new ErestGetBasic(latestForm.getOwnerId());
return erestGet.execute(urlTemplate, klass, latestForm.getOwnerId(), latestForm.getGroup(), latestForm.getName(), latestForm.getStability(), latestForm.getVersion());
}
use of one.kii.summer.io.sender.ErestGetBasic in project kiimate by SINeWang.
the class DefaultVisitExtensionSpi method visit.
@Override
public String visit(GroupForm form) throws Panic {
String url = baseUrl + URI;
ErestGetBasic erest = new ErestGetBasic(visitorId);
try {
return erest.execute(url, String.class, ownerId, form.getGroup(), NAME_ROOT, TREE);
} catch (NotFound notFound) {
notFound.printStackTrace();
} catch (BadRequest badRequest) {
badRequest.printStackTrace();
} catch (Panic panic) {
panic.printStackTrace();
}
throw new Panic();
}
use of one.kii.summer.io.sender.ErestGetBasic in project kiimate by SINeWang.
the class DefaultVisitExtensionSpi method visit.
@Override
public String visit(GroupNameForm form) throws Panic {
String url = baseUrl + URI;
ErestGetBasic erest = new ErestGetBasic(visitorId);
try {
return erest.execute(url, String.class, ownerId, form.getGroup(), form.getName(), TREE);
} catch (NotFound notFound) {
notFound.printStackTrace();
} catch (BadRequest badRequest) {
badRequest.printStackTrace();
} catch (Panic panic) {
panic.printStackTrace();
}
throw new Panic();
}
Aggregations