fcep

sources.xml

Oct 26th, 2015
168
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <source adapterClass="edu.internet2.middleware.grouper.subj.GrouperJdbcSourceAdapter">
  2.     <id>tng</id>
  3.     <name>TNG users</name>
  4.      <type>person</type>
  5.      
  6.      <!-- edu.internet2.middleware.subject.provider.C3p0JdbcConnectionProvider (default)
  7.          edu.internet2.middleware.subject.provider.DbcpJdbcConnectionProvider (legacy)
  8.          edu.internet2.middleware.grouper.subj.GrouperJdbcConnectionProvider
  9.            (same settings as grouper.hibernate.properties, the driver, url, pass, maxActive, maxIdle, maxWait are forbidden -->
  10.      <init-param>
  11.        <param-name>jdbcConnectionProvider</param-name>
  12.        <param-value>edu.internet2.middleware.subject.provider.C3p0JdbcConnectionProvider </param-value>
  13.      </init-param>
  14.          
  15.      <!-- if more than this many results are returned, then throw a too many subjects exception -->
  16.      <init-param>
  17.        <param-name>maxResults</param-name>
  18.        <param-value>1000</param-value>
  19.      </init-param>
  20.  
  21.     <!-- on a findPage() this is the most results returned -->
  22.     <init-param>
  23.       <param-name>maxPageSize</param-name>
  24.       <param-value>100</param-value>
  25.     </init-param>
  26.  
  27.      <!-- note: again, if you use GrouperJdbcConnectionProvider, then you should not fill out maxActive, maxIdle,
  28.       maxWait, dbDriver, dbUrl, dbUser, dbPwd, since it will use the grouper.hibernate.properties db settings -->
  29.  
  30.      <init-param>
  31.        <param-name>maxActive</param-name>
  32.        <param-value>16</param-value>
  33.      </init-param>
  34.      <init-param>
  35.        <param-name>maxIdle</param-name>
  36.        <param-value>16</param-value>
  37.      </init-param>
  38.      <init-param>
  39.        <param-name>maxWait</param-name>
  40.        <param-value>-1</param-value>
  41.      </init-param>
  42.      
  43.      <!--      
  44.       e.g. mysql:           com.mysql.jdbc.Driver
  45.       e.g. p6spy (log sql): com.p6spy.engine.spy.P6SpyDriver
  46.         for p6spy, put the underlying driver in spy.properties
  47.       e.g. oracle:          oracle.jdbc.driver.OracleDriver
  48.       e.g. hsqldb:          org.hsqldb.jdbcDriver
  49.       e.g. postgres:        org.postgresql.Driver -->
  50.  
  51.      <init-param>
  52.        <param-name>dbDriver</param-name>
  53.        <param-value>com.mysql.jdbc.Driver</param-value>
  54.      </init-param>
  55.      
  56.      <!--
  57.       e.g. mysql:           jdbc:mysql://localhost:3306/grouper
  58.       e.g. p6spy (log sql): [use the URL that your DB requires]
  59.       e.g. oracle:          jdbc:oracle:thin:@server.school.edu:1521:sid
  60.       e.g. hsqldb (a):      jdbc:hsqldb:dist/run/grouper;create=true
  61.       e.g. hsqldb (b):      jdbc:hsqldb:hsql://localhost:9001
  62.       e.g. postgres:        jdbc:postgresql:grouper -->
  63.      
  64.      <init-param>
  65.        <param-name>dbUrl</param-name>
  66.        <param-value>jdbc:mysql://localhost:3306/tng</param-value>
  67.      </init-param>
  68.      <init-param>
  69.        <param-name>dbUser</param-name>
  70.        <param-value>root</param-value>
  71.      </init-param>
  72.      <init-param>
  73.        <param-name>dbPwd</param-name>
  74.        <param-value></param-value>
  75.      </init-param>
  76.      
  77.       <init-param>
  78.        <param-name>SubjectID_AttributeType</param-name>
  79.        <param-value>idTNG_USERS</param-value>
  80.      </init-param>
  81.      <init-param>
  82.        <param-name>Name_AttributeType</param-name>
  83.        <param-value>users</param-value>
  84.      </init-param>
  85.      <init-param>
  86.        <param-name>Description_AttributeType</param-name>
  87.        <param-value>users</param-value>
  88.      </init-param>
  89.  
  90.      <init-param>
  91.        <param-name>sortAttribute0</param-name>
  92.        <param-value>users</param-value>
  93.      </init-param>
  94.      <init-param>
  95.        <param-name>sortAttribute1</param-name>
  96.        <param-value>idTNG_USERS</param-value>
  97.      </init-param>
  98.      <init-param>
  99.        <param-name>searchAttribute0</param-name>
  100.        <param-value>searchAttribute0</param-value>
  101.      </init-param>
  102.      <internal-attribute>searchAttribute0</internal-attribute>
  103.      
  104.      <!-- if you are going to use the inclause attribute
  105.       on the search to make the queries batchable when searching
  106.       by id or identifier -->
  107.      <init-param>
  108.        <param-name>useInClauseForIdAndIdentifier</param-name>
  109.        <param-value>true</param-value>
  110.      </init-param>
  111.      
  112.      <!-- comma separate the identifiers for this row, this is for the findByIdentifiers if using an in clause -->
  113.      <init-param>
  114.        <param-name>identifierAttributes</param-name>
  115.        <param-value>idTNG_USERS</param-value>
  116.      </init-param>
  117.  
  118.      <search>
  119.          <searchType>searchSubject</searchType>
  120.          <param>
  121.              <param-name>sql</param-name>
  122.              <param-value>
  123. select
  124.    idTNG_USERS, users
  125. from
  126.    TNG_USERS
  127. where
  128.    {inclause}
  129.             </param-value>
  130.          </param>
  131.          <param>
  132.              <param-name>inclause</param-name>
  133.              <param-value>
  134. idTNG_USERS = ?
  135.             </param-value>
  136.          </param>
  137.      </search>
  138.      <search>
  139.          <searchType>searchSubjectByIdentifier</searchType>
  140.          <param>
  141.              <param-name>sql</param-name>
  142.              <param-value>
  143. select
  144.    idTNG_USERS, users
  145. from
  146.    TNG_USERS
  147. where
  148.    {inclause}
  149.              </param-value>
  150.          </param>
  151.          <param>
  152.              <param-name>inclause</param-name>
  153.              <param-value>
  154. users = ?
  155.             </param-value>
  156.          </param>
  157.      </search>
  158.      <search>
  159.         <searchType>search</searchType>
  160.          <param>
  161.              <param-name>sql</param-name>          
  162.              <param-value>
  163. select
  164.    idTNG_USERS, users
  165. from
  166.    TNG_USERS
  167. where
  168.    (idTNG_USERS like '%'||?||'%') or (users like '%'||?||'%')
  169.              </param-value>
  170.          </param>
  171.      </search>
  172.    </source>
RAW Paste Data