/** * Construct an uploader to a certain repository as a certain user. */ public Uploader(String protocol, String host, int port, String context, String user, String pass) throws IOException { String baseURL = protocol + "://" + host + ":" + port + "/" + context; fc = new FedoraClient(baseURL, user, pass); }
/** * Construct an uploader to a certain repository as a certain user. */ public Uploader(String host, int port, String context, String user, String pass) throws IOException { String baseURL = Administrator.getProtocol() + "://" + host + ":" + port + "/" + context; fc = new FedoraClient(baseURL, user, pass); }
public void init(String host, String port, String context, String username, String password) throws Exception { this.host = host; this.port = port; this.username = username; this.password = password; this.context = context; String baseURL = "http://" + host + ":" + port + "/" + context; FedoraClient fedoraClient = new FedoraClient(baseURL, username, password); apim = fedoraClient.getAPIMMTOM(); apia = fedoraClient.getAPIAMTOM(); fedoraClient.shutdown(); PIDS = apim.getNextPID(new BigInteger(Integer.valueOf(iterations).toString()), "demo").toArray(new String[]{}); FOXML = new byte[iterations][]; for (int i = 0; i < iterations; i++) { FOXML[i] = DEMO_FOXML_TEXT.replaceAll(pid, PIDS[i]).getBytes("UTF-8"); } }
@Before public void setUp() throws Exception { System.out.println("setting Up XACML test"); admin = getFedoraClient(); backupFedoraUsersFile(); createNewFedoraUsersFileWithTestUsers(); installJunitPolicies(); reloadPolicies(); System.out.println("creating alternate users"); testuser1 = new FedoraClient(getBaseURL(), "testuser1", "testuser1"); testuserroleA = new FedoraClient(getBaseURL(), "testuserroleA", "testuserroleA"); testuser2 = new FedoraClient(getBaseURL(), "testuser2", "testuser2"); testuser3 = new FedoraClient(getBaseURL(), "testuser3", "testuser3"); testuserroleB = new FedoraClient(getBaseURL(), "testuserroleB", "testuserroleB"); testuserroleC = new FedoraClient(getBaseURL(), "testuserroleC", "testuserroleC"); testuserroleC2 = new FedoraClient(getBaseURL(), "testuserroleC2", "testuserroleC2"); testuser4 = new FedoraClient(getBaseURL(), "testuser4", "testuser4"); System.out.println("done setting up"); }
public void init(String host, String port, String username, String password, String batch, String batches, String threads, String outputFileLocation, String context) throws Exception { FedoraClient fedoraClient = new FedoraClient(baseURL, username, password); apim = fedoraClient.getAPIMMTOM(); fedoraClient.shutdown();
private void reloadPolicies() { System.out.println("Reloading Policies..."); try { FedoraClient client = new FedoraClient(ServerUtility.getBaseURL(getProtocol()), getUsername(), getPassword()); client.reloadPolicies(); System.out.println(" Done Reloading Policies"); } catch (Exception e) { throw new RuntimeException(e); } }
FedoraClient fc = new FedoraClient(baseURL, user, pass);
@Before public void setUp() throws Exception { client = new FedoraClient(getBaseURL(), getUsername(), getPassword()); Map<String, String> nsMap = new HashMap<String, String>(); nsMap.put(NS_FEDORA_TYPES_PREFIX, NS_FEDORA_TYPES); nsMap.put("oai", "http://www.openarchives.org/OAI/2.0/"); NamespaceContext ctx = new SimpleNamespaceContext(nsMap); XMLUnit.setXpathNamespaceContext(ctx); }
protocol + "://" + hostName + ":" + portNum + "/" + context; FedoraClient fc = new FedoraClient(baseURL, args[1], args[2]); AutoPurger a = new AutoPurger(fc.getAPIMMTOM()); fc.shutdown();
FedoraClient fc = new FedoraClient(baseURL, username, password); APIA = fc.getAPIAMTOM(); APIM = fc.getAPIMMTOM();
protocol + "://" + hostName + ":" + portNum + "/" + context; FedoraClient fc = new FedoraClient(baseURL, username, password); APIA = fc.getAPIAMTOM(); APIM = fc.getAPIMMTOM();
public static FedoraClient getFedoraClient(String baseURL, String username, String password) throws Exception { return new FedoraClient(baseURL, username, password); }
@BeforeClass public static void bootstrap() throws Exception { s_client = new FedoraClient(FedoraServerTestCase.getBaseURL(), FedoraServerTestCase.getUsername(), FedoraServerTestCase.getPassword()); s_items_ingested = Util.ingestTestObjects(s_client, SHARED_DEPLOYMENT_BASE); }
@BeforeClass public static void bootStrap() throws Exception { s_client = new FedoraClient(FedoraServerTestCase.getBaseURL(), FedoraServerTestCase.getUsername(), FedoraServerTestCase.getPassword()); ingestTestObjects(s_client, PUBLIC_OBJECT_BASE); }
@BeforeClass public static void bootstrap() throws Exception { s_client = new FedoraClient(FedoraServerTestCase.getBaseURL(), FedoraServerTestCase.getUsername(), FedoraServerTestCase.getPassword()); Util.ingestTestObjects(s_client, DC2MODS_DEPLOYMENT_BASE); }
try { fedora = new FedoraClient( fedoraUrl, fedoraUsername, fedoraPassword); fedora.SOCKET_TIMEOUT_SECONDS = fedoraTimeout;
@BeforeClass public static void bootstrap() throws Exception { s_client = new FedoraClient(FedoraServerTestCase.getBaseURL(), FedoraServerTestCase.getUsername(), FedoraServerTestCase.getPassword()); s_items_ingested = Util.ingestTestObjects(s_client, SIMPLE_DEPLOYMENT_DEPLOYMENTS); s_items_ingested += Util.ingestTestObjects(s_client, SIMPLE_DEPLOYMENT_PUBLIC_OBJECTS); }
protocol + "://" + hostName + ":" + portNum + "/" + context; FedoraClient fc = new FedoraClient(baseURL, username, password); FedoraAPIMMTOM sourceRepoAPIM = fc.getAPIMMTOM(); fc.shutdown();
public RemoteObjectSource(ServiceInfo serviceInfo) throws ServiceException, IOException { FedoraClient fc = new FedoraClient(serviceInfo.getBaseUrlString(), serviceInfo.getUsername(), serviceInfo.getPassword()); apia = fc.getAPIAMTOM(); apim = fc.getAPIMMTOM(); fc.shutdown(); }
@BeforeClass public static void bootStrap() throws Exception { String baseURL = getProtocol() + "://" + getHost() + ":" + getPort() + "/" + getFedoraAppServerContext(); s_client = new FedoraClient(baseURL, getUsername(), getPassword()); // do we actually use the demo objects in this suite of tests? //ingestDemoObjects(s_client); }