import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
import org.opendaylight.restconf.common.errors.RestconfError;
import org.opendaylight.restconf.common.errors.RestconfError.ErrorTag;
-import org.opendaylight.restconf.common.errors.RestconfError.ErrorType;
import org.opendaylight.restconf.common.patch.PatchContext;
import org.opendaylight.restconf.common.patch.PatchStatusContext;
import org.opendaylight.restconf.nb.rfc8040.Rfc8040;
import org.opendaylight.restconf.nb.rfc8040.utils.parser.ParserIdentifier;
import org.opendaylight.yang.gen.v1.urn.sal.restconf.event.subscription.rev140708.NotificationOutputTypeGrouping.NotificationOutputType;
import org.opendaylight.yangtools.concepts.Immutable;
+import org.opendaylight.yangtools.yang.common.ErrorType;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.Revision;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
if (node == null) {
throw new RestconfDocumentedException(
"Request could not be completed because the relevant data model content does not exist",
- RestconfError.ErrorType.PROTOCOL,
- RestconfError.ErrorTag.DATA_MISSING);
+ ErrorType.PROTOCOL, RestconfError.ErrorTag.DATA_MISSING);
}
if (parameters.getContent().equals(RestconfDataServiceConstant.ReadData.ALL)
case INSERT:
if (insertUsed) {
throw new RestconfDocumentedException("Insert parameter can be used only once.",
- RestconfError.ErrorType.PROTOCOL, RestconfError.ErrorTag.BAD_ELEMENT);
+ ErrorType.PROTOCOL, RestconfError.ErrorTag.BAD_ELEMENT);
}
insertUsed = true;
insert = Insert.forValue(str);
if (insert == null) {
throw new RestconfDocumentedException("Unrecognized insert parameter value '" + str + "'",
- RestconfError.ErrorType.PROTOCOL, RestconfError.ErrorTag.BAD_ELEMENT);
+ ErrorType.PROTOCOL, RestconfError.ErrorTag.BAD_ELEMENT);
}
break;
case POINT:
if (pointUsed) {
throw new RestconfDocumentedException("Point parameter can be used only once.",
- RestconfError.ErrorType.PROTOCOL, RestconfError.ErrorTag.BAD_ELEMENT);
+ ErrorType.PROTOCOL, RestconfError.ErrorTag.BAD_ELEMENT);
}
pointUsed = true;
break;
default:
throw new RestconfDocumentedException("Bad parameter for post: " + entry.getKey(),
- RestconfError.ErrorType.PROTOCOL, RestconfError.ErrorTag.BAD_ELEMENT);
+ ErrorType.PROTOCOL, RestconfError.ErrorTag.BAD_ELEMENT);
}
}
if (pointUsed) {
if (!insertUsed) {
throw new RestconfDocumentedException("Point parameter can't be used without Insert parameter.",
- RestconfError.ErrorType.PROTOCOL, RestconfError.ErrorTag.BAD_ELEMENT);
+ ErrorType.PROTOCOL, RestconfError.ErrorTag.BAD_ELEMENT);
}
if (insert != Insert.BEFORE && insert != Insert.AFTER) {
throw new RestconfDocumentedException(
"Point parameter can be used only with 'after' or 'before' values of Insert parameter.",
- RestconfError.ErrorType.PROTOCOL, RestconfError.ErrorTag.BAD_ELEMENT);
+ ErrorType.PROTOCOL, RestconfError.ErrorTag.BAD_ELEMENT);
}
}
}