log.warn(msg);
throw new AuthorizationFailedException(msg);
}
// then add the new resource/collection
RegistryContext registryContext = null;
if (CurrentSession.getUserRegistry() != null) {
registryContext = CurrentSession.getUserRegistry().getRegistryContext();
}
if (registryContext == null) {
registryContext = RegistryContext.getBaseInstance();
}
if (!Boolean.FALSE.equals(CurrentSession.getAttribute(IS_LOGGING_ACTIVITY))) {
registryContext.getLogWriter().addLog(
path, CurrentSession.getUser(), LogEntry.ADD, null);
}
if (!(resource instanceof CollectionImpl)) {
if (resource.getMediaType() == null || resource.getMediaType().length() == 0) {
String temp = MediaTypesUtils.getMediaType(RegistryUtils.getResourceName(path));