use of de.vitero.schema.group.CreateGroupRequest in project openolat by klemens.
the class ViteroManager method createGroup.
public int createGroup(String groupName) throws VmsNotAvailableException {
try {
CreateGroupRequest createRequest = new CreateGroupRequest();
Groupnamecustomerid groupInfos = new Groupnamecustomerid();
groupInfos.setGroupname(groupName + "_OLAT_" + UUID.randomUUID().toString().replace("-", ""));
groupInfos.setCustomerid(viteroModule.getCustomerId());
createRequest.setGroup(groupInfos);
Groupid groupId = getGroupWebService().createGroup(createRequest);
return groupId.getGroupid();
} catch (SOAPFaultException f) {
ErrorCode code = handleAxisFault(f);
switch(code) {
default:
logAxisError("Cannot create a group", f);
}
return -1;
} catch (WebServiceException e) {
if (e.getCause() instanceof ConnectException) {
throw new VmsNotAvailableException();
}
log.error("Cannot create a group.", e);
return -1;
}
}
use of de.vitero.schema.group.CreateGroupRequest in project OpenOLAT by OpenOLAT.
the class ViteroManager method createGroup.
public int createGroup(String groupName) throws VmsNotAvailableException {
try {
CreateGroupRequest createRequest = new CreateGroupRequest();
Groupnamecustomerid groupInfos = new Groupnamecustomerid();
groupInfos.setGroupname(groupName + "_OLAT_" + UUID.randomUUID().toString().replace("-", ""));
groupInfos.setCustomerid(viteroModule.getCustomerId());
createRequest.setGroup(groupInfos);
Groupid groupId = getGroupWebService().createGroup(createRequest);
return groupId.getGroupid();
} catch (SOAPFaultException f) {
ErrorCode code = handleAxisFault(f);
switch(code) {
default:
logAxisError("Cannot create a group", f);
}
return -1;
} catch (WebServiceException e) {
if (e.getCause() instanceof ConnectException) {
throw new VmsNotAvailableException();
}
log.error("Cannot create a group.", e);
return -1;
}
}
Aggregations