/*
* Copyright (c) 2012 EMC Corporation
* All Rights Reserved
*/
package com.emc.storageos.api.service.impl.resource.snapshot;
import java.net.URI;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.core.UriInfo;
import com.emc.storageos.api.service.authorization.PermissionsHelper;
import com.emc.storageos.api.service.impl.resource.fullcopy.BlockFullCopyManager;
import com.emc.storageos.coordinator.client.service.CoordinatorClient;
import com.emc.storageos.db.client.DbClient;
import com.emc.storageos.db.client.model.BlockObject;
import com.emc.storageos.db.client.model.BlockSnapshotSession;
import com.emc.storageos.db.client.model.Project;
import com.emc.storageos.svcs.errorhandling.resources.APIException;
/**
* Block snapshot session implementation for volumes on VNX systems.
*/
public class VNXBlockSnapshotSessionApiImpl extends DefaultBlockSnapshotSessionApiImpl {
/**
* Private default constructor should not be called outside class.
*/
@SuppressWarnings("unused")
private VNXBlockSnapshotSessionApiImpl() {
super();
}
/**
* Constructor.
*
* @param dbClient A reference to a data base client.
* @param coordinator A reference to the coordinator client.
* @param permissionsHelper A reference to a permission helper.
* @param securityContext A reference to the security context.
* @param blockSnapshotSessionMgr A reference to the snapshot session manager.
*/
public VNXBlockSnapshotSessionApiImpl(DbClient dbClient, CoordinatorClient coordinator, PermissionsHelper permissionsHelper,
SecurityContext securityContext, BlockSnapshotSessionManager blockSnapshotSessionMgr) {
super(dbClient, coordinator, permissionsHelper, securityContext, blockSnapshotSessionMgr);
}
/**
* {@inheritDoc}
*/
@Override
public void validateSnapshotSessionCreateRequest(BlockObject requestedSourceObj, List<BlockObject> sourceObjList, Project project,
String name, int newTargetsCount, String newTargetsName, String newTargetCopyMode, boolean skipInternalCheck,
BlockFullCopyManager fcManager) {
throw APIException.methodNotAllowed.notSupportedForVNX();
}
/**
* {@inheritDoc}
*/
@Override
public void validateLinkNewTargetsRequest(BlockObject snapSessionSourceObj, Project project, int newTargetsCount,
String newTargetsName, String newTargetCopyMode) {
throw APIException.methodNotAllowed.notSupportedForVNX();
}
/**
* {@inheritDoc}
*/
@Override
public void validateRelinkSnapshotSessionTargets(BlockObject snapSessionSourceObj, BlockSnapshotSession tgtSnapSession,
Project project, List<URI> snapshotURIs, UriInfo uriInfo) {
throw APIException.methodNotAllowed.notSupportedForVNX();
}
/**
* {@inheritDoc}
*/
@Override
public void validateUnlinkSnapshotSessionTargets(BlockSnapshotSession snapSession, BlockObject snapSessionSourceObj, Project project,
Map<URI, Boolean> targetMap, UriInfo uriInfo) {
throw APIException.methodNotAllowed.notSupportedForVNX();
}
/**
* {@inheritDoc}
*/
@Override
public void validateRestoreSnapshotSession(List<BlockObject> snapSessionSourceObjs, Project project) {
throw APIException.methodNotAllowed.notSupportedForVNX();
}
/**
* {@inheritDoc}
*/
@Override
public void validateDeleteSnapshotSession(BlockSnapshotSession snapSession, BlockObject snapSessionSourceObj, Project project) {
throw APIException.methodNotAllowed.notSupportedForVNX();
}
}