All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.icthh.xm.commons.permission.access.AbstractResourceFactory Maven / Gradle / Ivy

There is a newer version: 4.0.20
Show 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 Object getResource(Object resourceId, String objectType) {
            Object result = null;
            ResourceRepository resourceRepository = getRepositories().get(objectType);
            if (resourceRepository != null) {
                result = resourceRepository.findResourceById(resourceId);
            }
            return result;
        }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy