Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  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. 
    View file
    nameUFO_files.zip
    height150
  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. Set the "dirPath" to a location where you can store temporary uploaded files. Set "defaultCollectionId" to the Collection ID you will be updating.

    Code Block
    languagexml
     <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.

...