Examples of turnOffAuthorisationSystem()


Examples of org.dspace.core.Context.turnOffAuthorisationSystem()

   */
  public static void main(String[] argv)
    throws SQLException, BrowseException, ParseException
  {
        Context context = new Context();
        context.turnOffAuthorisationSystem();
        IndexBrowse indexer = new IndexBrowse(context);
     
      // create an options object and populate it
      CommandLineParser parser = new PosixParser();
      Options options = new Options();
View Full Code Here

Examples of org.dspace.core.Context.turnOffAuthorisationSystem()

     */
    public void cleanIndex(boolean force) throws IOException,
            SQLException, SearchServiceException {

        Context context = new Context();
        context.turnOffAuthorisationSystem();

        try {
            if (force) {
                getSolr().deleteByQuery("*:*");
            } else {
View Full Code Here

Examples of org.dspace.core.Context.turnOffAuthorisationSystem()

        // Create a copy of the converter
        Context context = null;
        try
        {
            context = new Context();
            context.turnOffAuthorisationSystem();
        }
        catch (SQLException sqle)
        {
            System.err.println("Unable to create DSpace context: " + sqle.getMessage());
            System.exit(1);
View Full Code Here

Examples of org.dspace.core.Context.turnOffAuthorisationSystem()

        }
        String filename = line.getOptionValue('f');

        // Create a context
        Context c = new Context();
        c.turnOffAuthorisationSystem();

        // The things we'll export
        ItemIterator toExport = null;
        MetadataExport exporter = null;
View Full Code Here

Examples of org.dspace.core.Context.turnOffAuthorisationSystem()

        DSpaceObject dso=null;
        IdentifierService identifierService = new DSpace().getSingletonService(IdentifierService.class);
        Context context =null;
        try {
            context = new Context();
            context.turnOffAuthorisationSystem();
            dso = identifierService.resolve(context, resourceIdentifier);
            if(dso==null) throw new RuntimeException("Invalid DOI! " + resourceIdentifier);

            return dso;
        }catch (IdentifierNotFoundException e) {
View Full Code Here

Examples of org.dspace.core.Context.turnOffAuthorisationSystem()

        DSpaceObject dso=null;
        IdentifierService identifierService = new DSpace().getSingletonService(IdentifierService.class);
        Context context =null;
        try {
            context = new Context();
            context.turnOffAuthorisationSystem();
            dso = identifierService.resolve(context, resourceID);
            request.setAttribute(DSPACE_OBJECT, dso);

            if(!(dso instanceof Item)) return STATUS_FORBIDDEN;
View Full Code Here

Examples of org.dspace.core.Context.turnOffAuthorisationSystem()

    public void render(Map<String, ?> model, HttpServletRequest request, HttpServletResponse response) throws Exception {

        DSpaceObject item = (DSpaceObject)request.getAttribute(ResourceIdentifierController.DSPACE_OBJECT);

        Context context = new Context();
        context.turnOffAuthorisationSystem();

        String fileName = getFileName(item);

        write(response, getBibTex((Item) item, resourceIdentifier), fileName);
View Full Code Here

Examples of org.dspace.core.Context.turnOffAuthorisationSystem()

    public void render(Map<String, ?> model, HttpServletRequest request, HttpServletResponse response) throws Exception {

        DSpaceObject item = (DSpaceObject)request.getAttribute(ResourceIdentifierController.DSPACE_OBJECT);

        Context context = new Context();
        context.turnOffAuthorisationSystem();

        String fileName = getFileName(item);

        write(response, getRIS((Item) item, resourceIdentifier), fileName);
        OutputStream aOutputStream = response.getOutputStream();
View Full Code Here

Examples of org.dspace.core.Context.turnOffAuthorisationSystem()

    {
        Context context = null;
        try
        {
            context = new Context();
            context.turnOffAuthorisationSystem();

            String base = ConfigurationManager.getProperty("dspace.dir")
                            + File.separator + "config" + File.separator
                            + "registries" + File.separator;
View Full Code Here

Examples of org.dspace.core.Context.turnOffAuthorisationSystem()

        // After every migrate, ensure default Groups are setup correctly.
        Context context = null;
        try
        {
            context = new Context();
            context.turnOffAuthorisationSystem();
            // While it's not really a formal "registry", we need to ensure the
            // default, required Groups exist in the DSpace database
            Group.initDefaultGroupNames(context);
            context.restoreAuthSystemState();
            // Commit changes and close context
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.