com.kero.security.lang.nodes.metaline.PropagationMetaline Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Kero-Security Show documentation
Show all versions of Kero-Security Show documentation
Kero-Security is a library for statically controlling access to properties of objects / classes.
The newest version!
package com.kero.security.lang.nodes.metaline;
import java.util.Map;
import com.kero.security.core.agent.KeroAccessAgent;
import com.kero.security.core.property.Property;
import com.kero.security.core.role.Role;
public class PropagationMetaline extends PropertyMetalineBase {
private Map propagationMap;
public PropagationMetaline(Map propagationMap) {
this.propagationMap = propagationMap;
}
public void interpret(KeroAccessAgent manager, Property property) {
propagationMap.forEach((fromName, toName)-> {
Role from = manager.getOrCreateRole(fromName);
Role to = manager.getOrCreateRole(toName);
property.addRolePropagation(from, to);
});
}
public Map getPropagationMap() {
return this.propagationMap;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy