private AuthorizeService getAuthorizeService() { if (authorizeService == null) { authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService(); } return authorizeService; }
/** * check to see if a collection has any policies for a given action */ private static boolean checkForPolicy(Context c, DSpaceObject t, int myaction) throws SQLException { // check to see if any policies exist for this action List<ResourcePolicy> policies = AuthorizeServiceFactory.getInstance().getAuthorizeService() .getPoliciesActionFilter(c, t, myaction); return policies.size() > 0; }
public XOAI(Context context, boolean optimize, boolean clean, boolean verbose) { this.context = context; this.optimize = optimize; this.clean = clean; this.verbose = verbose; // Load necessary DSpace services this.authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService(); this.itemService = ContentServiceFactory.getInstance().getItemService(); }
public XOAI(Context ctx, boolean hasOption) { this.context = ctx; this.verbose = hasOption; // Load necessary DSpace services this.authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService(); this.itemService = ContentServiceFactory.getInstance().getItemService(); }
/** * Find out whether bitstream is readable by the public. * * @param bitstream the target bitstream * @return whether bitstream is readable by the Anonymous group */ protected boolean isPublic(Bitstream bitstream) { if (bitstream == null) { return false; } boolean result = false; Context context = null; try { context = new Context(); result = AuthorizeServiceFactory.getInstance().getAuthorizeService() .authorizeActionBoolean(context, bitstream, Constants.READ, true); } catch (SQLException e) { log.error( "Cannot determine whether bitstream is public, assuming it isn't. bitstream_id=" + bitstream.getID(), e); } return result; }
AuthorizeServiceFactory.getInstance().getAuthorizeService();
AuthorizeServiceFactory.getInstance().getAuthorizeService();