TNS Internal:NDR/Tools

From NSDLWiki

Jump to: navigation, search

NDR Tools

Administrative tools for aiding the NDR repository administrator.

Command Line Tool for Interacting with the Repository

Code Location: https://svn.nsdl.org/NCore/toolkits/java/tags/1.0/src/java/org/nsdl/repository/admin/tasks/


To generate the jar for use on your local machine:

NOTE: For Edupak installed on a PC using default directory locations per Edupak install instructions, create a directory at C:\Edupak\bin. Copy the jar file to this directory. Create a batch file named nca.bat in the same directory (or whatever name you wish to name it) that will run the jar and add the following lines...

cd C:\Edupak\bin
java -jar ncore_client_admin-1.0.jar


Usage:

Executable jar that allows for administration of NDR...

  • ncore-client-admin-1.0.jar - executable jar that includes ncore_client_static-1.0.jar and its executable
  • open execute window to the location of the ncore-client-admin-1.0.jar file
  • command to run this jar...
java -jar ncore_client_admin-1.0.jar

based on user prefs at... (builds following prefs file for you and allows you to save current locs when exiting)

~.java/.userPrefs/org/nsdl/repository/admin

Note that, on Windows systems, these preferences will be saved to the registry:

 HKEY_CURRENT_USER\Software\JavaSoft\Prefs\org....

If you are using ssh or other tunneling to your local system, the repository URL should look something like this:

 http://localhost:8380/repository/api

(Tunneled ports necessary are 8380 and perhaps 8343)


Bulk Processing Tools

Code Location: https://svn.nsdl.org/NCore/toolkits/java/trunk/src/java/org/nsdl/repository/tools/

The following tools can be copied and modified to perform a specific task that needs to be done in bulk.

  • BulkModify
  • BulkPurge
  • BulkCreate

ANT that allows building of executable jars for the above bulk processing tools...

<target name="dist-BulkPurge" depends="compile" description="Bulk Purge App">
 <jar destfile="dist/BulkPurge.jar">

  <zipfileset dir="build/classes/org/nsdl/repository/" includes="**/*.class" prefix="org/nsdl/repository/" />
  <zipfileset src="lib/ncore_client_static-1.0.jar" />
  <manifest>
   <attribute name="Main-Class" value="org.nsdl.repository.tools.BulkPurge" />
  </manifest>
 </jar>
</target>
<target name="dist-BulkCreate" depends="compile" description="Bulk Create App">
 <jar destfile="dist/BulkCreate.jar">

  <zipfileset dir="build/classes/org/nsdl/repository/" includes="**/*.class" prefix="org/nsdl/repository/" />
  <zipfileset src="lib/ncore_client_static-1.0.jar" />
  <manifest>
   <attribute name="Main-Class" value="org.nsdl.repository.tools.BulkCreate" />
  </manifest>
 </jar>
</target>
<target name="dist-BulkModify" depends="compile" description="Bulk Modify App">
 <jar destfile="dist/BulkModify.jar">

  <zipfileset dir="build/classes/org/nsdl/repository/" includes="**/*.class" prefix="org/nsdl/repository/" />
  <zipfileset src="lib/ncore_client_static-1.0.jar" />
  <manifest>
   <attribute name="Main-Class" value="org.nsdl.repository.tools.BulkModify" />
  </manifest>
 </jar>
</target>
Personal tools