// Path: app/models/deadbolt/AccessResult.java
// public enum AccessResult
// {
//     ALLOWED,
//     DENIED,
//     NOT_SPECIFIED
// }
// 
// Path: app/models/deadbolt/ExternalizedRestriction.java
// public interface ExternalizedRestriction
// {
//     /**
//      * Gets the role names required to get by this restriction.
//      *
//      * @return the role names
//      */
//     List<String> getRoleNames();
// }
// 
// Path: app/models/deadbolt/ExternalizedRestrictions.java
// public interface ExternalizedRestrictions
// {
//     /**
//      * Gets all the {@link ExternalizedRestriction}s associated with a target.
//      *
//      * @return
//      */
//     List<ExternalizedRestriction> getExternalisedRestrictions();
// }
// 
// Path: app/models/deadbolt/Role.java
// public interface Role
// {
//     /**
//      * The name of the role.
//      *
//      * @return the role name
//      */
//     String getRoleName();
// }
// 
// Path: app/models/deadbolt/RoleHolder.java
// public interface RoleHolder
// {
//     /**
//      * A list of {@link Role}s held by the role holder.
//      *
//      * @return a list of roles
//      */
//     List<? extends Role> getRoles();
// }


import java.util.List;
import java.util.Map;
import models.deadbolt.AccessResult;
import models.deadbolt.ExternalizedRestriction;
import models.deadbolt.ExternalizedRestrictions;
import models.deadbolt.Role;
import models.deadbolt.RoleHolder;
import play.Logger;
import play.Play;
import play.exceptions.ConfigurationException;
import play.mvc.Before;
import play.mvc.Controller;
import play.mvc.Util;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
        {
            String defaultResponseFormat = Play.configuration.getProperty(DEFAULT_RESPONSE_FORMAT);
            if (!isEmpty(defaultResponseFormat))
            {
                responseFormat = defaultResponseFormat;
            }
        }

        if (!isEmpty(responseFormat))
        {
            request.format = responseFormat;
        }

        DEADBOLT_HANDLER.onAccessFailure(controllerClassName);

    }

    /**
     * Checks if the current user has all of the specified roles.
     *
     * @param roleHolder the object requiring authorisation
     * @param roleNames the role names
     * @return true iff the current user has all of the specified roles
     */
    public static boolean hasAllRoles(RoleHolder roleHolder,
                                      String[] roleNames)
    {
        boolean hasRole = false;
        if (roleHolder != null)
        {
// Path: app/models/deadbolt/AccessResult.java
// public enum AccessResult
// {
//     ALLOWED,
//     DENIED,
//     NOT_SPECIFIED
// }
// 
// Path: app/models/deadbolt/ExternalizedRestriction.java
// public interface ExternalizedRestriction
// {
//     /**
//      * Gets the role names required to get by this restriction.
//      *
//      * @return the role names
//      */
//     List<String> getRoleNames();
// }
// 
// Path: app/models/deadbolt/ExternalizedRestrictions.java
// public interface ExternalizedRestrictions
// {
//     /**
//      * Gets all the {@link ExternalizedRestriction}s associated with a target.
//      *
//      * @return
//      */
//     List<ExternalizedRestriction> getExternalisedRestrictions();
// }
// 
// Path: app/models/deadbolt/Role.java
// public interface Role
// {
//     /**
//      * The name of the role.
//      *
//      * @return the role name
//      */
//     String getRoleName();
// }
// 
// Path: app/models/deadbolt/RoleHolder.java
// public interface RoleHolder
// {
//     /**
//      * A list of {@link Role}s held by the role holder.
//      *
//      * @return a list of roles
//      */
//     List<? extends Role> getRoles();
// }


// Path: app/controllers/deadbolt/Deadbolt.java
import java.util.List;
import java.util.Map;
import models.deadbolt.AccessResult;
import models.deadbolt.ExternalizedRestriction;
import models.deadbolt.ExternalizedRestrictions;
import models.deadbolt.Role;
import models.deadbolt.RoleHolder;
import play.Logger;
import play.Play;
import play.exceptions.ConfigurationException;
import play.mvc.Before;
import play.mvc.Controller;
import play.mvc.Util;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

        {
            String defaultResponseFormat = Play.configuration.getProperty(DEFAULT_RESPONSE_FORMAT);
            if (!isEmpty(defaultResponseFormat))
            {
                responseFormat = defaultResponseFormat;
            }
        }

        if (!isEmpty(responseFormat))
        {
            request.format = responseFormat;
        }

        DEADBOLT_HANDLER.onAccessFailure(controllerClassName);

    }

    /**
     * Checks if the current user has all of the specified roles.
     *
     * @param roleHolder the object requiring authorisation
     * @param roleNames the role names
     * @return true iff the current user has all of the specified roles
     */
    public static boolean hasAllRoles(RoleHolder roleHolder,
                                      String[] roleNames)
    {
        boolean hasRole = false;
        if (roleHolder != null)
        {
            List<? extends Role> roles = roleHolder.getRoles();