com.icthh.xm.commons.permission.access.AbstractResourceFactory Maven / Gradle / Ivy
The newest version!
package com.icthh.xm.commons.permission.access;
import com.icthh.xm.commons.permission.access.repository.ResourceRepository;
import java.util.Map;
public abstract class AbstractResourceFactory implements ResourceFactory {
protected abstract Map> getRepositories();
@Override
public T getResource(ID resourceId, String objectType) {
T result = null;
ResourceRepository resourceRepository = (ResourceRepository) getRepositories().get(objectType);
if (resourceRepository != null) {
result = resourceRepository.findResourceById(resourceId);
}
return result;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy