Skip to content

Commit

Permalink
Rewrite VRLinkedObject to noop methods not implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Bach committed Sep 16, 2016
1 parent 168d4eb commit 70f191e
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions lib/VRLinkedObject.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def getByKey(key)
# :infoPanelHtml - HTML for the info panel and :alerts - Array of alert messages where each element is a hash of :color, :html,
# :customMenuItems - Array of menu items where each element is a hash of :icon, :text, :href, :authMethods, :isDropdown, :dropdownOpts (Array of hashes - :href and :text)
def getLinkedObjectInfoPanel(app, uid, params, env)
raise "NotImplemented"
# Not Implemented: return empty
return {:success => true, :infoPanelHtml => nil, :alerts => [], :customMenuItems => []}
end

##
Expand All @@ -74,7 +75,8 @@ def getLinkedObjectInfoPanel(app, uid, params, env)
# :alerts - Array of alert messages where each element is a hash of :color, :html,
# :customMenuItems - Array of menu items where each element is a hash of :icon, :text, :href, :authMethods, :isDropdown, :dropdownOpts (Array of hashes - :href and :text)
def getTestAlerts(app, test, uid)
raise "NotImplemented"
#Not Implemented: return empty
return {:success => true, :alerts => [], :customMenuItems => []}
end

##
Expand All @@ -83,16 +85,19 @@ def getTestAlerts(app, test, uid)
# @param uid [Integer] ID of the {User} who performed the action
# @return [Hash] - Hash of :success - Boolean and :alerts - Array of alert messages. Each element is a hash of :color, :html
def doCreateAppActions(app, uid)
raise "NotImplemented"
#Not Implemented: noop
return {:success => true}
end

##
# Called after an {Application} of a {RecordType} linked to this object is set to a new owner
# @param app [Application] The {Application} object being updated
# @param uid [Integer] ID of the {User} who performed the action
# @param newOwnerUid [Integer] ID of the {User} who is the new owner
# @return [Hash] - Hash of :success - Boolean
def doAppReassignedActions(app, uid, newOwnerUid)
raise "NotImplemented"
#Not Implemented: noop
return {:success => true}
end

##
Expand All @@ -102,7 +107,8 @@ def doAppReassignedActions(app, uid, newOwnerUid)
# @param uid [Integer] ID of the {User} who performed the action
# @return [Hash] - Hash of :success - Boolean and :alerts - Array of alert messages. Each element is a hash of :color, :html
def doNewTestActions(app, test, uid)
raise "NotImplemented"
#Not Implemented: noop, return true with no alerts
return {:success => true}
end

##
Expand All @@ -112,7 +118,8 @@ def doNewTestActions(app, test, uid)
# @param uid [Integer] ID of the {User} who performed the action
# @return [Hash] - Hash of :success - Boolean and :alerts - Array of alert messages. Each element is a hash of :color, :html
def doInProgressActions(app, test, uid)
raise "NotImplemented"
#Not Implemented: noop, return true with no alerts
return {:success => true}
end

##
Expand All @@ -122,7 +129,8 @@ def doInProgressActions(app, test, uid)
# @param uid [Integer] ID of the {User} who performed the action
# @return [Hash] - Hash of :success - Boolean and :alerts - Array of alert messages. Each element is a hash of :color, :html
def doPassActions(app, test, uid)
raise "NotImplemented"
#Not Implemented: noop, return true with no alerts
return {:success => true}
end

##
Expand All @@ -132,7 +140,8 @@ def doPassActions(app, test, uid)
# @param uid [Integer] ID of the {User} who performed the action
# @return [Hash] - Hash of :success - Boolean and :alerts - Array of alert messages. Each element is a hash of :color, :html
def doProvPassActions(app, test, uid)
raise "NotImplemented"
#Not Implemented: noop, return true with no alerts
return {:success => true}
end

##
Expand All @@ -142,7 +151,8 @@ def doProvPassActions(app, test, uid)
# @param uid [Integer] ID of the {User} who performed the action
# @return [Hash] - Hash of :success - Boolean and :alerts - Array of alert messages. Each element is a hash of :color, :html
def doFailActions(app, test, uid)
raise "NotImplemented"
#Not Implemented: noop, return true with no alerts
return {:success => true}
end

##
Expand All @@ -151,19 +161,22 @@ def doFailActions(app, test, uid)
# @param uid [Integer] ID of the {User} who performed the action
# @return [Hash] - Hash of :success - Boolean and :errstr if failed
def doDeleteAppActions(app, uid)
raise "NotImplemented"
#Not Implemented: noop, return true with no alerts
return {:success => true}
end

##
# @return [String] The name or text representation of the object that this application is linked to.
def getLinkedObjectText(app)
raise "NotImplemented"
#Not Implemented: return empty string
return ""
end

##
# @return [String] The URL of the object that this application is linked to.
def getLinkedObjectURL(app)
raise "NotImplemented"
#Not Implemented: return empty string
return ""
end

##
Expand All @@ -173,7 +186,8 @@ def getLinkedObjectURL(app)
# @return [Hash] Hash of :valid [Boolean] and :eid with the valid (possibly mutated) EID. If :valid is false
# also contains :errstr.
def validateEntityID(eid, app)
raise "NotImplemented"
#Not Implemented: always true
return {:valid => true, :eid => eid}
end

##
Expand All @@ -182,7 +196,8 @@ def validateEntityID(eid, app)
# should be returned in the search results they can be via this method.
# @return [Array <Hash>] Array of results, each element is a hash with keys :text and :link
def doSearch(q)
raise "NotImplemented"
#Not Implemented: Return empty
return []
end
end

Expand Down

0 comments on commit 70f191e

Please sign in to comment.