Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

The UFO was created as an example tool makes use of the Record Data API and should only be used by advanced power users. This example utility can preform mass updates to your collection data based on a search criteria and a single field replacment value. This is not a supported product or part of the LUNA software tools. It is just an example and to be used at your own risk.

Setup and configuration

Setup tomcat and install the app

  1. Install Apache Tomcat
    1. You can use the LUNA installer and do a custom install that just installs tomcat. This will install a local instance of Java and allow you to configure the instance.
  2. Download the UFO_files.zip and unzip the contents. 
  3. Place the app-client.xml in ~/LUNA/tomcat/conf/Catalina/localhost. This is the tomcat context file that defines where the application is installed and the path to get to it. 
  4. Place app-client.war in ~/LUNA/tomcat/luna_apps

    Set up OAuth in your live LUNA instance to allow this app to connect. 

  5.  

    Connect to your instance of LUNA http://luna.example.com/editor/e/developers/apps and click the Create button


  6. Fill in the App Name with "Test App" and your Call back URL to you local instance http://YourTestAppServer:8181/app-client/ready
  7. Write down the token and token secret, in /app-client.war/WEB-INF/applicationContext.xml, change the property value for "consumerKey" and "consumerSecret". Verify the "lunaLibraryUrl" property is correct.
     

     <bean id="libraryClient" class="com.luna.services.api.example.client.LibraryClient" init-method="initialize">
        <property name="restTemplate" ref="restTemplate"/>
        <property name="lunaLibraryUrl" value="http://www.example.com/editor/e/"/>
        <property name="consumerKey" value="UJDtGfa"/>
        <property name="consumerSecret" value="LHDIWoVLiVdsfjnI98saswd593AJFr"/>
      </bean>
      
      <bean id="recordUpdateService" class="com.luna.services.api.example.client.service.RecordUpdateService">
        <property name="libraryClient" ref="libraryClient"/>
        <property name="dirPath" value="/tmp"/>
        <property name="defaultCollectionId" value="LUNA~1~1"/>
      </bean>
    
    
  8. Start the UFO's tomcat go to http://localhost:8181/app-client/home in a browser. If you see a blank page, check "ufo.log" under 'tomcat/logs' on the server. Otherwise, it should redirect you to the login page to authorize access.
  9. After you successfully authenticate, it will redirect to the callback URL specified in step 3. You should see "This app now has access to Luna Library!". Note: The url '/app-client/ready' is mapped to 'authorized.jsp' in the sample code.
  10.  Uploading the file

    Format: CSV 

    Two columns with header.

    The header fields must be field names not field display name. 


    1. Field and value to search for

    2. Field and value to update

  11. That's it.

 

 

  • No labels