-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterface.asp
142 lines (120 loc) · 3.44 KB
/
interface.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<%
' File: interface.asp
'
' Evolved Classic ASP Plugins Framework interface definition.
'
' Versioning System:
'
' Semantic Versioning 2.0.0 which is, in practice, given a version number MAJOR.MINOR.PATCH:
'
' - A MAJOR increment requires a change in your program (API Change),
' - A MINOR increment should not break your app, but make additional functionality available,
' - A PATCH increment fixes a bug, so just replace in place with the latest version.
'
' More details at <http://semver.org/>.
'
' License:
'
' This file is part of Evolved Classic ASP Plugins Framework.
' Copyright (C) 2013 Fabio Zendhi Nagao
'
' Evolved Classic ASP Plugins Framework is free software: you can redistribute it and/or modify
' it under the terms of the GNU Lesser General Public License as published by
' the Free Software Foundation, either version 3 of the License, or
' (at your option) any later version.
'
' Evolved Classic ASP Plugins Framework is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU Lesser General Public License for more details.
'
' You should have received a copy of the GNU Lesser General Public License
' along with Evolved Classic ASP Plugins Framework. If not, see <http://www.gnu.org/licenses/>.
' Class: IPlugin
'
' Defines the common specifications required to implement a working plugin for
' Evolved Classic ASP Plugins Framework.
'
' About:
'
' - Written by Fabio Zendhi Nagao <http://zend.lojcomm.com.br> @ Jun 2013
'
class IPlugin' extends Interface
' --[ Interface definition ]----------------------------------------------------
' Subroutine: activate
'
' Creates plugin infrastructure and populate with possible existing data.
'
public sub activate()
end sub
' Subroutine: deactivate
'
' Removes plugin infrastructure.
'
public sub deactivate()
end sub
' Subroutine: define
'
' Includes new Actors to the action.
'
public sub define(byVal method, byRef Actors)
end sub
' Subroutine: bind
'
' Assign new events between action Actors.
'
public sub bind(byVal method, byRef Actors)
end sub
' Subroutine: beforeAction
'
' Extends action, changes output, etc.
'
public sub beforeAction(byVal method, byRef Context)
end sub
' Subroutine: afterAction
'
' Extends action, changes output, etc.
'
public sub afterAction(byVal method, byRef Context)
end sub
' Property: classType
'
' Class type.
'
' Contains:
'
' (string) - type
'
public property get classType
classType = typename(Me)
end property
' Property: classVersion
'
' Class version.
'
' Contains:
'
' (string) - version
'
public property get classVersion
classVersion = "1.0.0"
end property
' --[ Delegation ]--------------------------------------------------------------
public property get requireds
requireds = Parent.requireds
end property
public default function check(byRef I)
Parent.check Me, I
set check = Me
end function
' --[ Private section ]---------------------------------------------------------
private Parent
private sub Class_initialize()
set Parent = new Interface
Parent.requireds = array("activate","deactivate","define","bind","beforeAction","afterAction")
end sub
private sub Class_terminate()
set Parent = nothing
end sub
end class
%>