
com.daedafusion.security.obligation.impl.ObligationHandlerImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of security-framework Show documentation
Show all versions of security-framework Show documentation
A pluggable security framework "inspired" by the OWASP ESAPI framework
package com.daedafusion.security.obligation.impl;
import com.daedafusion.sf.AbstractService;
import com.daedafusion.security.common.Context;
import com.daedafusion.security.obligation.Obligation;
import com.daedafusion.security.obligation.ObligationHandler;
import com.daedafusion.security.obligation.providers.ObligationHandlerProvider;
import org.apache.log4j.Logger;
import java.util.List;
/**
* Created by mphilpot on 7/14/14.
*/
public class ObligationHandlerImpl extends AbstractService implements ObligationHandler
{
private static final Logger log = Logger.getLogger(ObligationHandlerImpl.class);
@Override
public void handle(List obligations, Context context)
{
for(Obligation ob : obligations)
{
for(ObligationHandlerProvider ohp : getProviders())
{
if(ohp.canHandle(ob))
{
ohp.handle(ob, context);
}
}
}
}
@Override
public void handle(Obligation obligation, Context context)
{
for(ObligationHandlerProvider ohp : getProviders())
{
if(ohp.canHandle(obligation))
{
ohp.handle(obligation, context);
}
}
}
@Override
public Class getProviderInterface()
{
return ObligationHandlerProvider.class;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy