Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
documentation:1.2:development:addingsourceconnector [2010/02/05 17:30]
jclarke created
documentation:1.2:development:addingsourceconnector [2017/01/30 17:10] (current)
Line 38: Line 38:
 A simple representation of the returned object might be this (for a LDAP source connector): A simple representation of the returned object might be this (for a LDAP source connector):
  
-    ​"​uid=jdoe,​ou=people,​o=example",​ {["​sn",​ "​Doe"​],​ ["​givenName",​ "​John"​]} +  ​"​uid=jdoe,​ou=people,​o=example",​ {["​sn",​ "​Doe"​],​ ["​givenName",​ "​John"​]} 
-    "​uid=jane.doe,​ou=people,​o=example",​ {["​sn",​ "​Doe"​],​ ["​givenName",​ "​Jane"​]} +  "​uid=jane.doe,​ou=people,​o=example",​ {["​sn",​ "​Doe"​],​ ["​givenName",​ "​Jane"​]} 
-    "​uid=elilly,​ou=people,​o=example",​ {["​sn",​ "​Lilly"​],​ ["​givenName",​ "​Evangeline"​]}+  "​uid=elilly,​ou=people,​o=example",​ {["​sn",​ "​Lilly"​],​ ["​givenName",​ "​Evangeline"​]}
  
 Implementation of this method is completely up to you! Implementation of this method is completely up to you!
Line 54: Line 54:
 Continuing the example above for the first object ("John Doe"), you would do the equivalent of this: Continuing the example above for the first object ("John Doe"), you would do the equivalent of this:
  
-    ​taskBean.setAttribute("​sn",​ new HashSet().add("​Doe"​));​ +  ​taskBean.setAttribute("​sn",​ new HashSet().add("​Doe"​));​ 
-    taskBean.setAttribute("​givenName",​ new HashSet().add("​John"​));​ +  taskBean.setAttribute("​givenName",​ new HashSet().add("​John"​));​ 
-    taskBean.setAttribute("​homePhone",​ new HashSet().add(.....));​ +  taskBean.setAttribute("​homePhone",​ new HashSet().add(.....));​
  
 Of course, the actual values must be read from the source, by using the //obj// parameter to retrieve the object, then parse the attributes and add them to the Bean. Of course, the actual values must be read from the source, by using the //obj// parameter to retrieve the object, then parse the attributes and add them to the Bean.
Line 65: Line 64:
 Let's say you just created a new source connector, called //​org.lsc.service.MySourceConnector//​. You can use it by defining these properties on a task called //​TaskName//:​ Let's say you just created a new source connector, called //​org.lsc.service.MySourceConnector//​. You can use it by defining these properties on a task called //​TaskName//:​
  
-    ​lsc.tasks.TaskName.srcService = org.lsc.service.MySourceConnector+  ​lsc.tasks.TaskName.srcService = org.lsc.service.MySourceConnector
  
 To specify some properties to be used in the source connector, that will be passed in a Properties object to the constructor,​ just add them to the properties file: To specify some properties to be used in the source connector, that will be passed in a Properties object to the constructor,​ just add them to the properties file:
  
-    ​lsc.tasks.TaskName.srcService.myproperty = something +  ​lsc.tasks.TaskName.srcService.myproperty = something 
-    lsc.tasks.TaskName.srcService.serviceURL = http://​a.server.com/​service+  lsc.tasks.TaskName.srcService.serviceURL = http://​a.server.com/​service
  
-==== Having trouble? ====+===== Having trouble? ​=====
  
 We hope that this document will help you get started writing a source connector. Of course, you'll need to play around a bit to get things working. We hope that this document will help you get started writing a source connector. Of course, you'll need to play around a bit to get things working.
  
 If you need some advice, feel free to ask on [[:​community|the mailing lists or on IRC]]. We'll be happy to help! If you need some advice, feel free to ask on [[:​community|the mailing lists or on IRC]]. We'll be happy to help!