generated from intersystems-community/iris-rest-api-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from intersystems-community/stage
changed the way code extension
- Loading branch information
Showing
3 changed files
with
48 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/// To execute your code immediately after the event occurs, | ||
/// you need to create a subclass of this class and override the Process() method in it. | ||
Class ZPM.Analytics.AbstractEventProcessor [ Abstract ] | ||
{ | ||
|
||
Parameter SubClasses As CONFIGVALUE; | ||
|
||
/// Override this method to run your code when event occurs | ||
ClassMethod Process(event as ZPM.Analytics.Event) As %Status [ Abstract ] | ||
{ | ||
Return $$$OK | ||
} | ||
|
||
/// Do not change or override this method | ||
ClassMethod getSubClasses() As %String [ CodeMode = objectgenerator ] | ||
{ | ||
Set list = "" | ||
|
||
Set rs = ##class(%Dictionary.ClassDefinitionQuery).SubclassOfFunc("ZPM.Analytics.AbstractEventProcessor") | ||
While (rs.%Next()) { | ||
Set list = list _ $listbuild( rs.%GetData(1) ) | ||
} | ||
|
||
Do $system.OBJ.UpdateConfigParam("ZPM.Analytics.AbstractEventProcessor","SubClasses",$listtostring(list,",")) | ||
Do %code.WriteLine(" return $PARAMETER(""ZPM.Analytics.AbstractEventProcessor"",""SubClasses"") ") | ||
Return $$$OK | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters