protected synchronized PersonalCRUDResourceManager<PigScript> getResourceManager() {
    if (resourceManager == null) {
      resourceManager = new ScriptResourceManager(context);
    }
    return resourceManager;
  }
Servlet for scripts
API:
GET /:id
     read script
POST /
     create new script
     Required: title, pigScript
GET /
     get all scripts of current user
contrib/views/pig/src/main/java/org/apache/ambari/view/pig/resources/scripts/ScriptService.java