try {
String resourceId = this.getResourceId();
if (null == resourceId || resourceId.length() == 0) {
return null;
}
ResourceInterface resource = this.getTrashedResourceManager().loadTrashedResource(resourceId);
String mainGroup = resource.getMainGroup();
UserDetails currentUser = this.getCurrentUser();
if (!this.getAuthManager().isAuthOnGroup(currentUser, mainGroup)) {
return null;
}
int size = Integer.parseInt(this.getSize());
ResourceInstance instance = null;
//String path = null;
if (resource.isMultiInstance()) {
instance = ((AbstractMultiInstanceResource) resource).getInstance(size, getLangCode());
//Map<String,String> trashPathsForInstances = getTrashedResourceManager().resourceInstancesTrashFilePaths(resource);
//path = trashPathsForInstances.get(this.getSize());
} else {
instance = ((AbstractMonoInstanceResource) resource).getInstance();