Implementation as cache using a super user account Joe Christmas

advertisement
Captive Portal Documentation Iteration 0.1
Usage:
login as a user who has a captive assigned to them in the NAB
 http://columbus1.captiveresources.com:8080/captive-portal/
 Rudolph Rednose goes to Affinity
 Sue Dancer goes to Raffles
But a user can override this behavior by opening the app as follows:
 http://columbus1.captiveresources.com:8080/captiveportal/?captive=artisans
 This ignores the captive set in the user’s person doc and they go to
artisans’ views
Page 1 of 3
Captive Portal Documentation Iteration 0.1
Admin: Setting up New Captives:
Colors



Basically look for a directory called css (e.g. c:/tomcat/webapps/captiveportal/css), then copy and paste the raffles.css and edit the color info using a
css editor (e.g. topstyle). save the new css file to be the same name as the
captives field in the notes database. (Find a primer on the web that shows
you the basics of CSS, we’re only really messing around with colors at this
point)
For example,
company name ==> novix
notes captives field data ==> novix
css file name ==> novix.css
for companies with multiple words in the tile, lets do this:
company name ==> computer associates, inc.
notes captive field data ==> computer_associates
css file name ==> computer_associates.css
Images
 we can change the style sheet to look for images (cf.
http://csszengarden.com/)
 not implemented yet, but not too hard to do
Template Forms
We could move all of that notes/domino stuff to this app eventually I think; but in
the meantime you have 2 options:
Short term
 Better: Change the forms to be reusable for all captives and keep 1
database
 Worse: Create little databases customized for each captive
o Create them with a logical name and dir structure so that I can
resolve links to them at runtime based on the user’s captive
o e.g. follow the naming conventions above:
o /iextensions/captives/raffles.nsf
o /iextensions/captives/affinity.nsf
o /iextensions/captives/computer_associates.nsf
Long term
 Remove all dependencies on raffles db
Page 2 of 3
Captive Portal Documentation Iteration 0.1
Design
Captive Portal  Notes dependencies:
Iextensions nsf
 No view dependencies at all
Raffles nsf
 organization links from company name go to raffles db
o not that this will break if user doesn’t have rights
o so we should move it to portal as we did for contacts
 Request Change to Organization Record
o
points nowhere -- Should point to raffles db
 Search Organizations
o points nowhere -- Should point to raffles db
 Service Providers
o points to a plain html page hard-coded for raffles – this needs
to change to be dynamic
Caching Layer:
 Implementation as cache using a super user account Joe Christmas
 Finds all web org docs
 Finds all web contact docs
 Converts notes document into a simple lightweight java representation or plain
old java object (i.e. POJO)
 Deposits the collection of pojos into a data structure and that data structure is
then cached system wide.
 Views are then generated from a subset of this list, based on user’s captive.
 User specific views are cached for that user’s session. Session timeout currently
set to 120 mins.
Concerns about caching layer:
 Cache needs to be refreshed at a certain interval  this is not implemented yet.
But manually restarting the application will force the cache to regenerate.
 Doc level security (i.e. readers fields) is bypassed since we use a super user to
get the data from the database!
Page 3 of 3
Download