Kolayca Domino sunucusunda kendi DİNLENME API yazmak ve bir tarih aralığı örneğin kabul olabilir.
Benim burada sunumda bu örnekler var: iki yardımcı sınıflar kullandığını
Use "Class.URL"
Use "Class.JSON"
Sub Initialize
'*** Local Notes classes used in agent
Dim session As New NotesSession
Dim db As NotesDatabase
Dim thisdb As NotesDatabase
Dim view As NotesView
Dim col As NotesViewEntryCollection
Dim entry As NotesViewEntry
Dim doc As NotesDocument
'*** Custom classes
Dim url As URLData
Dim json As JSONData
'*** Local variables to hold arguments passed from URL
Dim startdate As String
Dim enddate As String
'*** Other local variables
Dim jsontext As String
'*** Create new URLData object
Set url = New URLData()
'*** Create new JSONData object
Set json = New JSONData()
'*** Check start date and convert from ISO to US date format
If url.IsValue("start") Then
startdate = ISOtoUS(url.GetValue("start"))
Else
startdate = "01/01/1980"
End If
'*** Check end date and convert to US date format
If url.IsValue("end") Then
enddate = ISOtoUS(url.GetValue("end"))
Else
enddate = "12/31/2199"
End If
'*** Send MIME header to browser
Print "content-type: application/json"
jsontext = ""
Set db = session.CurrentDatabase
Set view = db.GetView("Events")
Set col = view.AllEntries
Set entry = col.GetFirstEntry()
Do Until entry Is Nothing
If CDat(entry.ColumnValues(0))>=CDat(startdate) Then
If CDat(entry.ColumnValues(0))<=CDat(enddate) Then
Call json.SetValue("id", CStr(entry.ColumnValues(5)))
Call json.SetValue("title",CStr(entry.ColumnValues(3)))
Call json.SetValue("start", Format$(CDat(entry.ColumnValues(7)),"mm/dd/yyyy hh:nn ampm"))
Call json.SetValue("end", Format$(entry.ColumnValues(8),"mm/dd/yyyy hh:nn ampm"))
Call json.SetValue("className","eventData eventData" + CStr(entry.ColumnValues(6)))
Call json.NoStatus()
'*** Make the entry editable (change date/time)
Call json.SetBoolean("editable", True)
End If
End If
jsontext = jsontext + json.GetJSON() + "," + Chr$(13)
Set entry = col.GetNextEntry(entry)
Loop
If Len(jsontext)>4 Then
jsontext = Left$(jsontext,Len(jsontext)-2)
End If
Print "[ " + jsontext + " ]"
End Sub
%REM
Function ISOtoUS
Description: Convert ISO date to US date,
e.g 2015-05-08 to 05/08/2015
%END REM
Function ISOtoUS(dateISO As String) As String
Dim tmp As String
' 2015-02-03
tmp = Mid$(dateISO,6,2) + "/"
tmp = tmp + Mid$(dateISO,9,2) + "/"
tmp = tmp + Left$(dateISO,4)
ISOtoUS = tmp
End Function
Uyarı: http://blog.texasswede.com/my-connect-2016-presentation-demo-database/ İşte
DİNLENME aramayı yapan sunucu ajan için LotusScript kodudur Ben siz de blogumda onlar için kod bulabilirsiniz yazdı: http://blog.texasswede.com/free-code-class-to-read-url-name-value-pairs/ ve http://blog.texasswede.com/calling-a-notes-web-agent-from-another-server-using-jsonp/
Evet - o t var Sonuç olarak ben de geldim. Tam metin dizini üzerinden aramayı gerçekleştiren iş, performansın baştan sona emin olmamasına rağmen, bu iş için – oidsman