Examples of turnOffAuthorisationSystem()


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

     * @throws SQLException database exception
     * @throws AuthorizeException should not occur since we disable authentication for this method.
     */
    public static void main(String[] args) throws SQLException, AuthorizeException {
        Context context = new Context();
        context.turnOffAuthorisationSystem();

        initDefaultGroupNames(context);

        //Clear the events to avoid the consumers which aren't needed at this time
        context.getEvents().clear();
View Full Code Here

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

        {
            context = new Context();

            // Can't update registries anonymously, so we need to turn off
            // authorisation
            context.turnOffAuthorisationSystem();

            // Work out what we're loading
            if (argv[0].equalsIgnoreCase("-bitstream"))
            {
                RegistryLoader.loadBitstreamFormats(context, argv[1]);
View Full Code Here

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

        // Now walk the cache and update EPersons
        TupleBrowser walker = stampDb.browse();
        Tuple stamp = new Tuple();
        Context ctx = new Context();
        ctx.turnOffAuthorisationSystem();

        while(walker.getNext(stamp))
        {
            // Update an EPerson's last login
            String name = (String) stamp.getKey();
View Full Code Here

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

        {
            System.err.println("Can't connect to database: " + sqle.getMessage());
            System.exit(-1);
        }
        // Started from commandline, don't use the authentication system.
        context.turnOffAuthorisationSystem();

        DOIOrganiser organiser = new DOIOrganiser(context, new DSpace().getSingletonService(DOIIdentifierProvider.class));
       
        // run command line interface
        runCLI(context, organiser, args);
View Full Code Here

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

            final TableRowIterator tri = DatabaseManager.queryTable(myContext,
                    "EPerson",
                    "SELECT eperson_id, email, netid FROM EPerson WHERE last_active < ?",
                    new java.sql.Date(before.getTime()));

            myContext.turnOffAuthorisationSystem();
            while (tri.hasNext())
            {
                TableRow row = tri.next();
                if (null == row)
                    break;
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(getSolr() == null)
            {
View Full Code Here

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

        try
        {
            // create a context
            context = new Context();
            context.turnOffAuthorisationSystem();

            // read the XML
            Document document = RegistryImporter.loadXML(file);

            // Get the nodes corresponding to types
View Full Code Here

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

    public static void main(String[] args) {
        try {
            System.out.println("All workflowitems will be sent back to the first workflow step.");
            Context context = new Context();
            context.turnOffAuthorisationSystem();
            // create an options object and populate it
            CommandLineParser parser = new PosixParser();

            Options options = new Options();
            options.addOption("e", "eperson", true,
View Full Code Here

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

        CommandLine command = parser.parse(globalOptions, argv, true);

        Context context = new Context();

        // Disable authorization since this only runs from the local commandline.
        context.turnOffAuthorisationSystem();

        int status = 0;
        if (command.hasOption(VERB_ADD.getOpt()))
        {
            status = cmdAdd(context, argv);
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
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.