Wednesday 21 September 2011

Create Lotus Notes form dynamically

In order to create Lotus Notes form dynamically, you can use following code:

  DxlImporter dxl = session.createDxlImporter();
  dxl.setReplaceDbProperties(true); 
  dxl.setDesignImportOption(DxlImporter.DXLIMPORTOPTION_CREATE); 
  dxl.setInputValidationOption(DxlImporter.DXLVALIDATIONOPTION_VALIDATE_ALWAYS);
  try {
    String xml = "Output of DxlExporter which is modified by removing \r\n";
    lotus.domino.Stream stream = s.createStream();
    stream.writeText(xml);
    dxl.importDxl(stream, database);
  } catch (Exception e) {
    logger.error("", e);
  }
  logger.info(dxl.getLog()); // Use this line to view error log from DxlImporter

Thursday 15 September 2011

Clone reputation system of StackExchange.

Recently, I found StackExchange, a system of 63 Q&A sites. I really impress at their reputation system. I would like to have similar one on my website. However, I'm not sure it is allowed by copyright law or not. Maybe I will learn their Theory of Moderation and define new one avoiding using their terms.

+ Reputation --> Trust
+ Peputation privileges --> Trust rank
+ rep unit --> point
+ vote up --> mark up
+ vote down --> mark down
+ upvoted --> up-marked
+ downvoted --> down-marked
+ tag --> interests
+ tag wiki --> interests brochure
+ wiki --> brochure
+ user --> member (customer, provider, idol, consultant)

List of member type:

1. Customer

Customer is member having vocation to ask question.

2. Provider

Provider is member having vocation to answer question.

3. Idol (*)

Idol is popular trusted customer.

4. Consultant

Consultant is popular trusted provider.

** Members must choose their vocation to ask or answer. They will be customer or provider based on their choice. Popular providers will become consultant. Popular customer will become idol. Members can change their vocation but their trust score will be decreased amount of points (*). Trust score after changing must be greater an amount of points (*). Score gained by marking vary in vocation of marked member. For example, question is marked up by customer/idol will gain less score than is marked up by provider/consultant; answer is marked up by provider/consultant will gain less score than is marked up by customer/idol.

Forte (new concept)

Forte is collection of interests that member believe to gain much score from.

List of trust ranks:

1. trusted user (20000) (*)

Trusted users are allowed to perform trusted actions, including:
+ Marking to delete answers with score of -1 or lower
+ Marking to delete questions immediately after they are closed (even if they are new)
+ Editing all interests brochures on the site

More info is here: View ads to get help! (Draft Specification 1)