package com.vci.server.framework.volume;
|
|
import com.vci.common.ServiceNames;
|
import com.vci.corba.common.VCIError;
|
import com.vci.corba.common.data.UserEntityInfo;
|
import com.vci.corba.framework.method.VolumeManager;
|
import com.vci.corba.framework.data.PvolumeInfo;
|
import com.vci.server.BaseService;
|
import com.vci.server.framework.volume.delegate.PvolumeDelegate;
|
import com.vci.server.framework.cache.VolumeCatch;
|
import com.zeroc.Ice.Current;
|
|
/**
|
* <p>Title: </p>
|
* <p>Description: </p>
|
* <p>Copyright: Copyright (c) 2011</p>
|
* <p>Company: VCI</p>
|
* @author Administrator
|
* @time 2011-7-3
|
* @version 1.0
|
*/
|
public class VolumeManagerImpl extends BaseService implements VolumeManager{
|
|
|
public VolumeManagerImpl() {
|
VolumeCatch.InitCatch();
|
}
|
|
@Override
|
public String getServiceName() {
|
return ServiceNames.VOLUMEMANAGER;
|
}
|
|
/**
|
* 卷创�?
|
*/
|
@Override
|
public String savePvolume(PvolumeInfo val, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError {
|
PvolumeDelegate pvolumeDelegate = new PvolumeDelegate(userEntityInfo);
|
return pvolumeDelegate.savePvolume(val, userEntityInfo);
|
}
|
|
/**
|
* 读取所有卷
|
*/
|
@Override
|
public PvolumeInfo[] getAllPvolumes(Current current) throws VCIError {
|
PvolumeDelegate pvolumeDelegate = new PvolumeDelegate();
|
return pvolumeDelegate.getAllPvolumes();
|
}
|
|
|
@Override
|
public PvolumeInfo getDefaultVolume(Current current) throws VCIError {
|
PvolumeDelegate pvolumeDelegate = new PvolumeDelegate();
|
return pvolumeDelegate.getIsvalidVolumeName();
|
}
|
|
|
/**
|
* 获取指定文档的卷
|
*/
|
@Override
|
public PvolumeInfo getVolumnByName(String volName, com.zeroc.Ice.Current current) throws VCIError {
|
PvolumeDelegate pvolumeDelegate = new PvolumeDelegate();
|
return pvolumeDelegate.getVolumnByName(volName);
|
}
|
|
/**
|
* 分页查询卷信息
|
*/
|
|
@Override
|
public PvolumeInfo[] getPvolumesPage(short pageSize, short pageIndex, com.zeroc.Ice.Current current)
|
throws VCIError {
|
PvolumeDelegate pvolumeDelegate = new PvolumeDelegate();
|
return pvolumeDelegate.getPvolumesPage(pageSize, pageIndex);
|
}
|
|
/**
|
* 修改卷
|
*/
|
@Override
|
public boolean updatePvolume(PvolumeInfo val, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError {
|
PvolumeDelegate pvolumeDelegate = new PvolumeDelegate(userEntityInfo);
|
return pvolumeDelegate.updatePvolume(val, userEntityInfo);
|
}
|
|
/**
|
* 卷删�?
|
*/
|
@Override
|
public boolean deletePvolume(String[] ids, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError {
|
PvolumeDelegate pvolumeDelegate = new PvolumeDelegate(userEntityInfo);
|
return pvolumeDelegate.deletePvolume(ids, userEntityInfo);
|
}
|
|
/**
|
* 获取指定文档的卷
|
*/
|
// public PvolumeInfo getDocumentVolumn(String id, com.zeroc.Ice.Current current) throws VCIError {
|
// PvolumeDelegate pvolumeDelegate = new PvolumeDelegate();
|
// return pvolumeDelegate.getDocumentVolumn(id);
|
// }
|
|
/**
|
* 修改卷:将其他卷改为非首选路�?0
|
*/
|
@Override
|
public void updatePvolumeInvalid(UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError {
|
PvolumeDelegate pvolumeDelegate = new PvolumeDelegate(userEntityInfo);
|
pvolumeDelegate.updatePvolumeInvalid(userEntityInfo);
|
}
|
|
/**
|
* 检查要删除的卷是否为首选路�?
|
*/
|
@Override
|
public boolean checkIsvalid(String id, com.zeroc.Ice.Current current) throws VCIError {
|
PvolumeDelegate pvolumeDelegate = new PvolumeDelegate();
|
return pvolumeDelegate.checkDelIsvalid(id);
|
}
|
|
/**
|
* 查看卷是否被引用
|
*/
|
public int fetchVolumnInfoByIds(String id, com.zeroc.Ice.Current current) throws VCIError {
|
PvolumeDelegate pvolumeDelegate = new PvolumeDelegate();
|
return pvolumeDelegate.fetchVolumnInfoByIds(id);
|
}
|
/**
|
* 获取首选路径卷
|
*/
|
public PvolumeInfo getIsvalidVolumeName(com.zeroc.Ice.Current current) throws VCIError {
|
PvolumeDelegate pvolumeDelegate = new PvolumeDelegate();
|
return pvolumeDelegate.getIsvalidVolumeName();
|
}
|
|
}
|