http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/group-manager/src/main/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/modules/group-manager/src/main/resources/log4j.properties b/modules/group-manager/src/main/resources/log4j.properties deleted file mode 100755 index 9cde476..0000000 --- a/modules/group-manager/src/main/resources/log4j.properties +++ /dev/null @@ -1,154 +0,0 @@ -# -# Copyright 2014 Internet2 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# will be substituted with the System property "grouper.home", which must have a trailing \ or / -# depending on your OS. Of course you can use absolute paths if you prefer - - -# -# log4j Configuration -# $Id: log4j.example.properties,v 1.13 2009-12-18 13:56:51 tzeller Exp $ -# - -# Appenders - -## Log messages to stderr -log4j.appender.grouper_stderr = org.apache.log4j.ConsoleAppender -log4j.appender.grouper_stderr.Target = System.err -log4j.appender.grouper_stderr.layout = org.apache.log4j.PatternLayout -log4j.appender.grouper_stderr.layout.ConversionPattern = %d{ISO8601}: [%t] %-5p %C{1}.%M(%L) - %x - %m%n - -## Log messages to stdout -log4j.appender.grouper_stdout = org.apache.log4j.ConsoleAppender -log4j.appender.grouper_stdout.Target = System.out -log4j.appender.grouper_stdout.layout = org.apache.log4j.PatternLayout -log4j.appender.grouper_stdout.layout.ConversionPattern = %d{ISO8601}: [%t] %-5p %C{1}.%M(%L) - %x - %m%n - -## Grouper API event logging -log4j.appender.grouper_event = org.apache.log4j.DailyRollingFileAppender -log4j.appender.grouper_event.File = logs/grouper_event.log -log4j.appender.grouper_event.DatePattern = '.'yyyy-MM-dd -log4j.appender.grouper_event.layout = org.apache.log4j.PatternLayout -log4j.appender.grouper_event.layout.ConversionPattern = %d{ISO8601}: [%t] %-5p %C{1}.%M(%L) - %x - %m%n - -## Grouper API error logging -log4j.appender.grouper_error = org.apache.log4j.DailyRollingFileAppender -log4j.appender.grouper_error.File = logs/grouper_error.log -log4j.appender.grouper_error.DatePattern = '.'yyyy-MM-dd -log4j.appender.grouper_error.layout = org.apache.log4j.PatternLayout -log4j.appender.grouper_error.layout.ConversionPattern = %d{ISO8601}: [%t] %-5p %C{1}.%M(%L) - %x - %m%n -#log4j.appender.grouper_error.layout.ConversionPattern = %d{ISO8601}: %m%n - -# Debug logging (Or: logging that I haven't cleaned up yet to send elsewhere) -log4j.appender.grouper_debug = org.apache.log4j.RollingFileAppender -log4j.appender.grouper_debug.File = logs/grouper_debug.log -log4j.appender.grouper_debug.MaxFileSize = 100KB -log4j.appender.grouper_debug.MaxBackupIndex = 1 -log4j.appender.grouper_debug.layout = org.apache.log4j.PatternLayout -#log4j.appender.grouper_debug.layout.ConversionPattern = %d{ISO8601} %5p %c{2}: %m%n -log4j.appender.grouper_debug.layout.ConversionPattern = %d{ISO8601}: [%t] %-5p %C{1}.%M(%L) - %x - %m%n - -## Benchmark logging -log4j.appender.grouper_gb = org.apache.log4j.RollingFileAppender -log4j.appender.grouper_gb.File = logs/grouper_bench.log -log4j.appender.grouper_gb.MaxFileSize = 100KB -log4j.appender.grouper_gb.MaxBackupIndex = 1 -log4j.appender.grouper_gb.layout = org.apache.log4j.PatternLayout -#log4j.appender.grouper_gb.layout.ConversionPattern = %d{ISO8601} %5p %c{2}: %m%n -log4j.appender.grouper_gb.layout.ConversionPattern = %d{ISO8601}: [%t] %-5p %C{1}.%M(%L) - %x - %m%n - -# Loggers - -## Default logger; will log *everything* -log4j.rootLogger = ERROR, grouper_error - -## All Internet2 (warn to grouper_error per default logger) -log4j.logger.edu.internet2.middleware = WARN - - -# Provisioning : PSP (version 2.1+) -log4j.logger.edu.internet2.middleware.psp = INFO - -# Provisioning : vt-ldap -# log4j.logger.edu.vt.middleware.ldap = INFO - -# Provisioning : Grouper plugin to Shibboleth attribute resolver -# log4j.logger.edu.internet2.middleware.grouper.shibboleth = INFO - - -# For more precise (or verbose) logging, enable one or more of the -# following logging directives. To remove duplicate entries, just change the -# level, and not where to send the logs -# http://robertmarkbramprogrammer.blogspot.com/2007/06/log4j-duplicate-lines-in-output.html - -## Grouper Event Logging -## * Logs at _info_ only -log4j.logger.edu.internet2.middleware.grouper.log.EventLog = INFO, grouper_event -log4j.logger.edu.internet2.middleware.grouper.RegistryInstall = INFO, grouper_event, grouper_stderr - -## Grouper Error Logging -## * Logs at _warn_, _fatal_ and _error_ only (by default this is WARN due to internet2 below) -#log4j.logger.edu.internet2.middleware.grouper = WARN, grouper_error - -## Grouper Debug Logging -## * NOTE: There is currently VERY LITTLE (useful) information sent to this. -## * Logs at _info_ only currently -#log4j.logger.edu.internet2.middleware.grouper = INFO, grouper_debug - -## Grouper XML Export + Import Logging -## TODO Integrate with normal logging -log4j.logger.edu.internet2.middleware.grouper.xml.XmlExporter = INFO, grouper_event -log4j.logger.edu.internet2.middleware.grouper.xml.XmlImporter = INFO, grouper_event - -## Grouper Benchmark Logging -log4j.logger.edu.internet2.middleware.grouper.bench = INFO, grouper_gb, grouper_stderr - -## Grouper script to add missing group sets -log4j.logger.edu.internet2.middleware.grouper.misc.AddMissingGroupSets = INFO, grouper_event - -## Grouper Sync Point in Time Tables -log4j.logger.edu.internet2.middleware.grouper.misc.SyncPITTables = INFO, grouper_event - -## Grouper Sync Stem Set Table -log4j.logger.edu.internet2.middleware.grouper.misc.SyncStemSets = INFO, grouper_event - -## Grouper Migrate Legacy Attributes -log4j.logger.edu.internet2.middleware.grouper.misc.MigrateLegacyAttributes = INFO, grouper_event - -### Subject API -#log4j.logger.edu.internet2.middleware.subject = ERROR, grouper_error -#log4j.logger.edu.internet2.middleware.subject.provider = ERROR, grouper_error -### Hibernate -#log4j.logger.org.hibernate = ERROR, grouper_error -### ehcache -#log4j.logger.net.sf.ehcache = ERROR, grouper_error -### Spring -#log4j.logger.org.springframework = ERROR, grouper_error - -## Grouper Stress Testing -log4j.logger.edu.internet2.middleware.grouper.stress = INFO, grouper_debug, grouper_stderr - - -####################################################### -##Optional settings for debug logs -####################################################### - -## Hooks debug info -#log4j.logger.edu.internet2.middleware.grouper.hooks.examples.GroupTypeTupleIncludeExcludeHook = DEBUG -#log4j.logger.edu.internet2.middleware.grouper.Group = DEBUG - -#log4j.logger.edu.internet2.middleware.grouper.hooks.examples.GroupTypeSecurityHook = DEBUG -
http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/group-manager/src/main/resources/morphString.properties ---------------------------------------------------------------------- diff --git a/modules/group-manager/src/main/resources/morphString.properties b/modules/group-manager/src/main/resources/morphString.properties deleted file mode 100755 index dbb9d60..0000000 --- a/modules/group-manager/src/main/resources/morphString.properties +++ /dev/null @@ -1,21 +0,0 @@ -# -# Copyright 2014 Internet2 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Put a random alphanumeric string (Case sensitive) for the password encryption. e.g. fh43IRJ4Nf5 -# or put a filename where the random alphanumeric string is. e.g. c:/whatever/key.txt -encrypt.key = -# set this to true if you have slashes in your passwords and dont want to look in external files or unencrypt -encrypt.disableExternalFileLookup = false http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/group-manager/src/main/resources/server.properties ---------------------------------------------------------------------- diff --git a/modules/group-manager/src/main/resources/server.properties b/modules/group-manager/src/main/resources/server.properties deleted file mode 100755 index e4a06b1..0000000 --- a/modules/group-manager/src/main/resources/server.properties +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright 2014 Internet2 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# HSQLDB Server Configuration -# $Id: server.example.properties,v 1.1 2008-09-29 03:38:30 mchyzer Exp $ -server.address=127.0.0.1 -server.port=9001 -server.address=localhost -server.port=9001 -server.silent=true -server.database.0=file:dist/run/grouper -server.dbname.0=grouper -server.urlid.0=grouper http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/group-manager/src/main/resources/sources.xml ---------------------------------------------------------------------- diff --git a/modules/group-manager/src/main/resources/sources.xml b/modules/group-manager/src/main/resources/sources.xml deleted file mode 100755 index b00ad26..0000000 --- a/modules/group-manager/src/main/resources/sources.xml +++ /dev/null @@ -1,875 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - - Copyright 2014 Internet2 - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<!-- -Grouper's subject resolver configuration -$Id: sources.example.xml,v 1.8 2009-08-11 20:18:09 mchyzer Exp $ ---> - -<sources> - - <!-- Group Subject Resolver --> - - <!-- - You can flag a source as not throwing exception on a findAll (general search) i.e. if it is - ok if it is down. Generally you probably won't want to do this. It defaults to true if omitted. - - <init-param> - <param-name>throwErrorOnFindAllFailure</param-name> - <param-value>false</param-value> - </init-param> - --> - - <!-- - You can make virtual attributes (attributes with formatting or based on other attributes) like this: - init-param name is subjectVirtualAttribute_<index>_<name> where index is the order to be processed - if some depend on others (0 to 99). The value is the jexl expression language. You can use subjectUtils - methods (aliased with "subjectUtils", or you can register your own class (must have default constructor). - Here are examples: - - <init-param> - <param-name>subjectVirtualAttribute_0_loginIdLfName</param-name> - <param-value>Hey ${subject.getAttributeValue('LOGINID')} and ${subject.getAttributeValue('LFNAME')}</param-value> - </init-param> - <init-param> - <param-name>subjectVirtualAttribute_1_loginIdLfNameLoginId</param-name> - <param-value>${subject.getAttributeValue('loginIdLfName')} Hey ${subject.getAttributeValue('LOGINID')} and ${subject.getAttributeValue('LFNAME')}</param-value> - </init-param> - <init-param> - <param-name>subjectVirtualAttributeVariable_JDBCSourceAdapterTest</param-name> - <param-value>edu.internet2.middleware.subject.provider.JDBCSourceAdapterTest</param-value> - </init-param> - <init-param> - <param-name>subjectVirtualAttribute_2_loginIdSquared</param-name> - <param-value>${JDBCSourceAdapterTest.appendToSelf(subject.getAttributeValue('LOGINID'))}</param-value> - </init-param> - - The first virtual attribute is accessible via: subject.getAttributeValue("loginIdLfNameLoginId"); - - you can set these c3p0 settings: maxConnectionAge (seconds), testConnectionOnCheckout (true|false), - preferredTestQuery (e.g. select 1 from dual), idleConnectionTestPeriod (seconds) - - - <init-param> - <param-name>findSubjectByIdOnCheckConfig</param-name> - <param-value>true|false</param-value> - </init-param> - <init-param> - <param-name>subjectIdToFindOnCheckConfig</param-name> - <param-value>someSubjectIdWhichMightExistOrWhatever</param-value> - </init-param> - - <init-param> - <param-name>findSubjectByIdentifiedOnCheckConfig</param-name> - <param-value>true|false</param-value> - </init-param> - <init-param> - <param-name>subjectIdentifierToFindOnCheckConfig</param-name> - <param-value>someSubjectIdentifierWhichMightExistOrWhatever</param-value> - </init-param> - - <init-param> - <param-name>findSubjectByStringOnCheckConfig</param-name> - <param-value>true|false</param-value> - </init-param> - <init-param> - <param-name>stringToFindOnCheckConfig</param-name> - <param-value>someStringWhichMightExistOrWhatever</param-value> - </init-param> - --> - - <!-- - NOTE: It is recommended that you **not** change the default - values for this source adapter. - --> - <source adapterClass="edu.internet2.middleware.grouper.GrouperSourceAdapter"> - <id>g:gsa</id> - <name>Grouper: Group Source Adapter</name> - <type>group</type> - - <init-param> - <param-name>subjectVirtualAttribute_0_searchAttribute0</param-name> - <param-value>${subject.getAttributeValue('name')},${subject.getAttributeValue('displayName')},${subject.getAttributeValue('alternateName')}</param-value> - </init-param> - <init-param> - <param-name>sortAttribute0</param-name> - <param-value>displayExtension</param-value> - </init-param> - <init-param> - <param-name>searchAttribute0</param-name> - <param-value>searchAttribute0</param-value> - </init-param> - <!-- on a findPage() this is the most results returned --> - <init-param> - <param-name>maxPageSize</param-name> - <param-value>100</param-value> - </init-param> - <internal-attribute>searchAttribute0</internal-attribute> - </source> - <!-- Group Subject Resolver --> - - <!-- - NOTE: It is recommended that you **not** change the default - values for this source adapter. - --> - <source adapterClass="edu.internet2.middleware.grouper.entity.EntitySourceAdapter"> - <id>grouperEntities</id> - <name>Grouper: Entity Source Adapter</name> - <type>application</type> - - <init-param> - <param-name>subjectVirtualAttribute_0_searchAttribute0</param-name> - <!-- TODO add attribute for subject identifier --> - <param-value>${subject.getAttributeValue('name')},${subject.getAttributeValue('displayName')},${subject.getAttributeValue('alternateName')}</param-value> - </init-param> - <init-param> - <param-name>sortAttribute0</param-name> - <param-value>name</param-value> - </init-param> - <init-param> - <param-name>searchAttribute0</param-name> - <param-value>searchAttribute0</param-value> - </init-param> - <internal-attribute>searchAttribute0</internal-attribute> - </source> - <!-- Entity Subject Resolver --> - - <source adapterClass="edu.internet2.middleware.grouper.subj.GrouperJdbcSourceAdapter"> - <id>jdbc</id> - <name>Example JDBC Source Adapter</name> - <type>person</type> - - <!-- edu.internet2.middleware.subject.provider.C3p0JdbcConnectionProvider (default) - edu.internet2.middleware.subject.provider.DbcpJdbcConnectionProvider (legacy) - edu.internet2.middleware.grouper.subj.GrouperJdbcConnectionProvider - (same settings as grouper.hibernate.properties, the driver, url, pass, maxActive, maxIdle, maxWait are forbidden --> - <init-param> - <param-name>jdbcConnectionProvider</param-name> - <param-value>edu.internet2.middleware.grouper.subj.GrouperJdbcConnectionProvider </param-value> - </init-param> - - <!-- If using emails and need email addresses in sources, set which attribute has the email address in this source --> - <init-param> - <param-name>emailAttributeName</param-name> - <param-value>email</param-value> - </init-param> - - <!-- if more than this many results are returned, then throw a too many subjects exception --> - <init-param> - <param-name>maxResults</param-name> - <param-value>1000</param-value> - </init-param> - - <!-- on a findPage() this is the most results returned --> - <init-param> - <param-name>maxPageSize</param-name> - <param-value>100</param-value> - </init-param> - - <!-- note: again, if you use GrouperJdbcConnectionProvider, then you should not fill out maxActive, maxIdle, - maxWait, dbDriver, dbUrl, dbUser, dbPwd, since it will use the grouper.hibernate.properties db settings --> - - <!-- init-param> - <param-name>maxActive</param-name> - <param-value>16</param-value> - </init-param> - <init-param> - <param-name>maxIdle</param-name> - <param-value>16</param-value> - </init-param> - <init-param> - <param-name>maxWait</param-name> - <param-value>-1</param-value> - </init-param --> - - <!-- - e.g. mysql: com.mysql.jdbc.Driver - e.g. p6spy (log sql): com.p6spy.engine.spy.P6SpyDriver - for p6spy, put the underlying driver in spy.properties - e.g. oracle: oracle.jdbc.driver.OracleDriver - e.g. hsqldb: org.hsqldb.jdbcDriver - e.g. postgres: org.postgresql.Driver --> - - <!-- init-param> - <param-name>dbDriver</param-name> - <param-value>org.hsqldb.jdbcDriver</param-value> - </init-param --> - - <!-- - e.g. mysql: jdbc:mysql://localhost:3306/grouper - e.g. p6spy (log sql): [use the URL that your DB requires] - e.g. oracle: jdbc:oracle:thin:@server.school.edu:1521:sid - e.g. hsqldb (a): jdbc:hsqldb:dist/run/grouper;create=true - e.g. hsqldb (b): jdbc:hsqldb:hsql://localhost:9001 - e.g. postgres: jdbc:postgresql:grouper --> - - <!-- init-param> - <param-name>dbUrl</param-name> - <param-value>jdbc:hsqldb:C:/projects/GrouperI2MI_1-2/grouper/dist/run/grouper</param-value> - </init-param> - <init-param> - <param-name>dbUser</param-name> - <param-value>sa</param-value> - </init-param> - <init-param> - <param-name>dbPwd</param-name> - <param-value></param-value> - </init-param --> - - <init-param> - <param-name>SubjectID_AttributeType</param-name> - <param-value>id</param-value> - </init-param> - <init-param> - <param-name>Name_AttributeType</param-name> - <param-value>name</param-value> - </init-param> - <init-param> - <param-name>Description_AttributeType</param-name> - <param-value>description</param-value> - </init-param> - <init-param> - <param-name>subjectVirtualAttribute_0_searchAttribute0</param-name> - <param-value>${subject.name},${subjectUtils.defaultIfBlank(subject.getAttributeValue('LFNAME'), "")},${subjectUtils.defaultIfBlank(subject.getAttributeValue('LOGINID'), "")},${subjectUtils.defaultIfBlank(subject.description, "")},${subjectUtils.defaultIfBlank(subject.getAttributeValue('EMAIL'), "")}</param-value> - </init-param> - <init-param> - <param-name>sortAttribute0</param-name> - <param-value>LFNAME</param-value> - </init-param> - <init-param> - <param-name>sortAttribute1</param-name> - <param-value>LOGINID</param-value> - </init-param> - <init-param> - <param-name>searchAttribute0</param-name> - <param-value>searchAttribute0</param-value> - </init-param> - <internal-attribute>searchAttribute0</internal-attribute> - - <!-- if you are going to use the inclause attribute - on the search to make the queries batchable when searching - by id or identifier --> - <init-param> - <param-name>useInClauseForIdAndIdentifier</param-name> - <param-value>true</param-value> - </init-param> - - <!-- comma separate the identifiers for this row, this is for the findByIdentifiers if using an in clause --> - <init-param> - <param-name>identifierAttributes</param-name> - <param-value>LOGINID</param-value> - </init-param> - - <!-- subject identifier to store in grouper's member table --> - <init-param> - <param-name>subjectIdentifierAttribute0</param-name> - <param-value>LOGINID</param-value> - </init-param> - - <search> - <searchType>searchSubject</searchType> - <param> - <param-name>sql</param-name> - <param-value> -select - s.subjectid as id, s.name as name, - (select sa2.value from subjectattribute sa2 where name='name' and sa2.SUBJECTID = s.subjectid) as lfname, - (select sa3.value from subjectattribute sa3 where name='loginid' and sa3.SUBJECTID = s.subjectid) as loginid, - (select sa4.value from subjectattribute sa4 where name='description' and sa4.SUBJECTID = s.subjectid) as description, - (select sa5.value from subjectattribute sa5 where name='email' and sa5.SUBJECTID = s.subjectid) as email -from - subject s -where - {inclause} - </param-value> - </param> - <param> - <param-name>inclause</param-name> - <param-value> -s.subjectid = ? - </param-value> - </param> - </search> - <search> - <searchType>searchSubjectByIdentifier</searchType> - <param> - <param-name>sql</param-name> - <param-value> -select - s.subjectid as id, s.name as name, - (select sa2.value from subjectattribute sa2 where name='name' and sa2.SUBJECTID = s.subjectid) as lfname, - (select sa3.value from subjectattribute sa3 where name='loginid' and sa3.SUBJECTID = s.subjectid) as loginid, - (select sa4.value from subjectattribute sa4 where name='description' and sa4.SUBJECTID = s.subjectid) as description, - (select sa5.value from subjectattribute sa5 where name='email' and sa5.SUBJECTID = s.subjectid) as email -from - subject s, subjectattribute a -where - a.name='loginid' and s.subjectid = a.subjectid and {inclause} - </param-value> - </param> - <param> - <param-name>inclause</param-name> - <param-value> - a.value = ? - </param-value> - </param> - </search> - <search> - <searchType>search</searchType> - <param> - <param-name>sql</param-name> - - <!-- for postgres, use this query since no concat() exists: - - select - subject.subjectid as id, subject.name as name, - lfnamet.lfname as lfname, loginidt.loginid as loginid, - desct.description as description, emailt.email as email -from - subject - left join (select subjectid, value as lfname from subjectattribute - where name='name') lfnamet - on subject.subjectid=lfnamet.subjectid - left join (select subjectid, value as loginid from subjectattribute - where name='loginid') loginidt - on subject.subjectid=loginidt.subjectid - left join (select subjectid, value as description from subjectattribute - where name='description') desct - on subject.subjectid=desct.subjectid - left join (select subjectid, value as email from subjectattribute - where name='email') emailt - on subject.subjectid=emailt.subjectid -where - (lower(name) like '%' || ? || '%') - or (lower(lfnamet.lfname) like '%' || ? || '%') - or (lower(loginidt.loginid) like '%' || ? || '%') - or (lower(desct.description) like '%' || ? || '%') - or (lower(emailt.email) like '%' || ? || '%') - -for SQL-server: - -select - subject.subjectid as id, subject.name as name, - lfnamet.lfname as lfname, loginidt.loginid as loginid, - desct.description as description, emailt.email as email -from - subject - left join (select subjectid, value as lfname from subjectattribute - where name='name') lfnamet - on subject.subjectid=lfnamet.subjectid - left join (select subjectid, value as loginid from subjectattribute - where name='loginid') loginidt - on subject.subjectid=loginidt.subjectid - left join (select subjectid, value as description from subjectattribute - where name='description') desct - on subject.subjectid=desct.subjectid - left join (select subjectid, value as email from subjectattribute - where name='email') emailt - on subject.subjectid=emailt.subjectid -where - (lower(name) like '%' + ? + '%') - or (lower(lfnamet.lfname) like '%' + ? + '%') - or (lower(loginidt.loginid) like '%' + ? + '%') - or (lower(desct.description) like '%' + ? + '%') - or (lower(emailt.email) like '%' + ? + '%') - - --> - - <param-value> -select - s.subjectid as id, s.name as name, - (select sa2.value from subjectattribute sa2 where name='name' and sa2.SUBJECTID = s.subjectid) as lfname, - (select sa3.value from subjectattribute sa3 where name='loginid' and sa3.SUBJECTID = s.subjectid) as loginid, - (select sa4.value from subjectattribute sa4 where name='description' and sa4.SUBJECTID = s.subjectid) as description, - (select sa5.value from subjectattribute sa5 where name='email' and sa5.SUBJECTID = s.subjectid) as email -from - subject s -where - s.subjectid in ( - select subjectid from subject where lower(name) like concat('%',concat(?,'%')) union - select subjectid from subjectattribute where searchvalue like concat('%',concat(?,'%')) - ) - </param-value> - </param> - </search> - </source> - - <!-- - <!- - This is an alternate jdbc source which allows for more complex searches, assumes - all data is in one table or view, and that all attributes are single valued. There are - not queries to configure in sources.xml - - > - <source adapterClass="edu.internet2.middleware.grouper.subj.GrouperJdbcSourceAdapter2"> - <id>sourceId</id> - <name>Source name</name> - <type>person</type> - <init-param> - <param-name>jdbcConnectionProvider</param-name> - <param-value>edu.internet2.middleware.grouper.subj.GrouperJdbcConnectionProvider</param-value> - </init-param> - - <init-param> - <param-name>maxResults</param-name> - <param-value>1000</param-value> - </init-param> - - <init-param> - <param-name>dbTableOrView</param-name> - <param-value>person_source_v</param-value> - </init-param> - <init-param> - <param-name>subjectIdCol</param-name> - <param-value>some_id</param-value> - </init-param> - <init-param> - <param-name>nameCol</param-name> - <param-value>name</param-value> - </init-param> - <init-param> - <param-name>descriptionCol</param-name> - <param-value>description</param-value> - </init-param> - <init-param> - <!- - search col where general searches take place, lower case - - > - <param-name>lowerSearchCol</param-name> - <param-value>description_lower</param-value> - </init-param> - <init-param> - <!- - optional col if you want the search results sorted in the API (note, UI might override) - - > - <param-name>defaultSortCol</param-name> - <param-value>description</param-value> - </init-param> - <init-param> - <!- - col which identifies the row, perhaps not subjectId, add multiple by incrementing the 0 index - - > - <param-name>subjectIdentifierCol0</param-name> - <param-value>pennname</param-value> - </init-param> - <init-param> - <!- - col which identifies the row, perhaps not subjectId, add multiple by incrementing the 0 index - - > - <param-name>subjectIdentifierCol1</param-name> - <param-value>penn_id</param-value> - </init-param> - <!- - now you can count up from 0 to N of attributes for various cols. - The name is how to reference in subject.getAttribute() - - > - <init-param> - <param-name>subjectAttributeCol0</param-name> - <param-value>pennname</param-value> - </init-param> - <init-param> - <param-name>subjectAttributeName0</param-name> - <param-value>PENNNAME</param-value> - </init-param> - <init-param> - <param-name>subjectAttributeCol1</param-name> - <param-value>description_lower</param-value> - </init-param> - <init-param> - <param-name>subjectAttributeName1</param-name> - <param-value>searchAttribute0</param-value> - </init-param> - <init-param> - <param-name>sortAttribute0</param-name> - <param-value>description</param-value> - </init-param> - <init-param> - <param-name>searchAttribute0</param-name> - <param-value>searchAttribute0</param-value> - </init-param> - <internal-attribute>searchAttribute0</internal-attribute> - <!- - ########################## STATUS SECTION for searches to filter out inactives and allow - the user to filter by status with e.g. status=all - this is optional, and advanced - -> - <!- - column or attribute which represents the status - - > - <!- - - <init-param> - <param-name>statusDatastoreFieldName</param-name> - <param-value>status</param-value> - </init-param> - - > - <!- - search string from user which represents the status. e.g. status=active - - > - <!- - - <init-param> - <param-name>statusLabel</param-name> - <param-value>status</param-value> - </init-param> - - > - <!- - available statuses from screen (if not specified, any will be allowed). comma separated list. - Note, this is optional and you probably dont want to configure it, it is mostly necessary - when you have multiple sources with statuses... if someone types an invalid status - and you have this configured, it will not filter by it - - > - <!- - - <init-param> - <param-name>statusesFromUser<param-name> - <param-value>Active, Inactive, Pending, All</param-value> - </init-param> - - > - <!- - all label from the user - - > - <!- - - <init-param> - <param-name>statusAllFromUser</param-name> - <param-value>All</param-value> - </init-param> - - > - <!- - if no status is specified, this will be used (e.g. for active only). Note, the value should be of the - form the user would type in - - > - <!- - - <init-param> - <param-name>statusSearchDefault</param-name> - <param-value>status=active</param-value> - </init-param> - - > - <!- - translate between screen values of status, and the data store value. Increment the 0 to 1, 2, etc for more translations. - so the user could enter: status=active, and that could translate to status_col=A. The 'user' is what the user types in, - the 'datastore' is what is in the datastore. The user part is not case-sensitive. Note, this could be a many to one - - > - <!- - - <init-param> - <param-name>statusTranslateUser0</param-name> - <param-value>active</param-value> - </init-param> - <init-param> - <param-name>statusTranslateDatastore0</param-name> - <param-value>A</param-value> - </init-param> - - > - <!- - ########################## END STATUS SECTION - - > - </source> - --> - - <!-- - <source adapterClass="edu.internet2.middleware.grouper.subj.GrouperJndiSourceAdapter"> - <id>example</id> - <name>Example Edu</name> - <type>person</type> - <init-param> - <param-name>INITIAL_CONTEXT_FACTORY</param-name> - <param-value>com.sun.jndi.ldap.LdapCtxFactory</param-value> - </init-param> - <init-param> - <param-name>PROVIDER_URL</param-name> - <param-value>ldap://localhost:389</param-value> - </init-param> - <init-param> - <param-name>SECURITY_AUTHENTICATION</param-name> - <param-value>simple</param-value> - </init-param> - <init-param> - <param-name>SECURITY_PRINCIPAL</param-name> - <param-value>cn=Manager,dc=example,dc=edu</param-value> - </init-param> - <init-param> - <param-name>SECURITY_CREDENTIALS</param-name> - <param-value>secret</param-value> - </init-param> - <init-param> - <param-name>SubjectID_AttributeType</param-name> - <param-value>exampleEduRegID</param-value> - </init-param> - <init-param> - <param-name>SubjectID_formatToLowerCase</param-name> - <param-value>false</param-value> - </init-param> - <init-param> - <param-name>Name_AttributeType</param-name> - <param-value>cn</param-value> - </init-param> - <init-param> - <param-name>Description_AttributeType</param-name> - <param-value>description</param-value> - </init-param> - - <init-param> - <param-name>VTLDAP_VALIDATOR</param-name> - <param-value>ConnectLdapValidator|CompareLdapValidator</param-value> - </init-param> - <init-param> - <param-name>VTLDAP_VALIDATOR_COMPARE_DN</param-name> - <param-value>ou=People,dc=vt,dc=edu</param-value> - </init-param> - <init-param> - <param-name>VTLDAP_VALIDATOR_COMPARE_SEARCH_FILTER_STRING</param-name> - <param-value>ou=People</param-value> - </init-param> - - /// Scope Values can be: OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE - /// For filter use - - <search> - <searchType>searchSubject</searchType> - <param> - <param-name>filter</param-name> - <param-value> - (& (exampleEduRegId=%TERM%) (objectclass=exampleEduPerson)) - </param-value> - </param> - <param> - <param-name>scope</param-name> - <param-value> - SUBTREE_SCOPE - </param-value> - </param> - <param> - <param-name>base</param-name> - <param-value> - ou=people,dc=example,dc=edu - </param-value> - </param> - - </search> - <search> - <searchType>searchSubjectByIdentifier</searchType> - <param> - <param-name>filter</param-name> - <param-value> - (& (uid=%TERM%) (objectclass=exampleEduPerson)) - </param-value> - </param> - <param> - <param-name>scope</param-name> - <param-value> - SUBTREE_SCOPE - </param-value> - </param> - <param> - <param-name>base</param-name> - <param-value> - ou=people,dc=example,dc=edu - </param-value> - </param> - </search> - - <search> - <searchType>search</searchType> - <param> - <param-name>filter</param-name> - <param-value> - (& (|(|(uid=%TERM%)(cn=*%TERM%*))(exampleEduRegId=%TERM%))(objectclass=exampleEduPerson)) - </param-value> - </param> - <param> - <param-name>scope</param-name> - <param-value> - SUBTREE_SCOPE - </param-value> - </param> - <param> - <param-name>base</param-name> - <param-value> - ou=people,dc=example,dc=edu - </param-value> - </param> - </search> - <init-param> - <param-name>subjectVirtualAttribute_0_searchAttribute0</param-name> - <param-value>${subjectUtils.defaultIfBlank(subject.getAttributeValueOrCommaSeparated('uid'), "")},${subjectUtils.defaultIfBlank(subject.getAttributeValueOrCommaSeparated('cn'), "")},${subjectUtils.defaultIfBlank(subject.getAttributeValueOrCommaSeparated('exampleEduRegId'), "")}</param-value> - </init-param> - <init-param> - <param-name>sortAttribute0</param-name> - <param-value>cn</param-value> - </init-param> - <init-param> - <param-name>searchAttribute0</param-name> - <param-value>searchAttribute0</param-value> - </init-param> - - <!- - ########################## STATUS SECTION for searches to filter out inactives and allow - the user to filter by status with e.g. status=all - this is optional, and advanced - -> - <!- - column or attribute which represents the status - - > - <!- - - <init-param> - <param-name>statusDatastoreFieldName</param-name> - <param-value>status</param-value> - </init-param> - - > - <!- - search string from user which represents the status. e.g. status=active - - > - <!- - - <init-param> - <param-name>statusLabel</param-name> - <param-value>status</param-value> - </init-param> - - > - <!- - available statuses from screen (if not specified, any will be allowed). comma separated list. - Note, this is optional and you probably dont want to configure it, it is mostly necessary - when you have multiple sources with statuses... if someone types an invalid status - and you have this configured, it will not filter by it - - > - <!- - - <init-param> - <param-name>statusesFromUser<param-name> - <param-value>Active, Inactive, Pending, All</param-value> - </init-param> - - > - <!- - all label from the user - - > - <!- - - <init-param> - <param-name>statusAllFromUser</param-name> - <param-value>All</param-value> - </init-param> - - > - <!- - if no status is specified, this will be used (e.g. for active only). Note, the value should be of the - form the user would type in - - > - <!- - - <init-param> - <param-name>statusSearchDefault</param-name> - <param-value>status=active</param-value> - </init-param> - - > - <!- - translate between screen values of status, and the data store value. Increment the 0 to 1, 2, etc for more translations. - so the user could enter: status=active, and that could translate to status_col=A. The 'user' is what the user types in, - the 'datastore' is what is in the datastore. The user part is not case-sensitive. Note, this could be a many to one - - > - <!- - - <init-param> - <param-name>statusTranslateUser0</param-name> - <param-value>active</param-value> - </init-param> - <init-param> - <param-name>statusTranslateDatastore0</param-name> - <param-value>A</param-value> - </init-param> - - > - <!- - ########################## END STATUS SECTION - - > - - - <internal-attribute>searchAttribute0</internal-attribute> - - ///Attributes you would like to display when doing a search - <attribute>cn</attribute> - <attribute>sn</attribute> - <attribute>uid</attribute> - <attribute>department</attribute> - <attribute>exampleEduRegId</attribute> - - <!- - subject identifier to store in grouper's member table - - > - <init-param> - <param-name>subjectIdentifierAttribute0</param-name> - <param-value>uid</param-value> - </init-param> - - </source> ---> - - <source adapterClass="edu.internet2.middleware.grouper.subj.GrouperJdbcSourceAdapter2"> -Â Â Â Â <id>AIRAVATA_SUBJECT_SOURCE</id> -Â Â Â Â <name>AIRAVATA_SUBJECT_SOURCE</name> -Â Â Â Â Â <type>person</type>Â -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>jdbcConnectionProvider</param-name> -Â Â Â Â Â Â <param-value>edu.internet2.middleware.subject.provider.C3p0JdbcConnectionProvider</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>dbDriver</param-name> -Â Â Â Â Â Â <param-value>com.mysql.jdbc.Driver</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>dbUrl</param-name> -Â Â Â Â Â Â <param-value>jdbc:mysql://gw62.iu.xsede.org:3306/dev_expcatalog_gw56</param-value> -Â Â Â Â </init-param> -Â Â Â Â Â -Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>dbUser</param-name> -Â Â Â Â Â Â <param-value></param-value> -Â Â Â Â </init-param> -Â Â Â Â Â -Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>dbPwd</param-name> -Â Â Â Â Â Â <param-value></param-value> -Â Â Â Â </init-param> -Â Â Â -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>maxResults</param-name> -Â Â Â Â Â Â <param-value>1000</param-value> -Â Â Â Â Â </init-param> -Â Â Â -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>dbTableOrView</param-name> -Â Â Â Â Â Â <param-value>USERS</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>subjectIdCol</param-name> -Â Â Â Â Â Â <param-value>AIRAVATA_INTERNAL_USER_ID</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>nameCol</param-name> -Â Â Â Â Â Â <param-value>AIRAVATA_INTERNAL_USER_ID</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>descriptionCol</param-name> -Â Â Â Â Â Â <param-value>AIRAVATA_INTERNAL_USER_ID</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>lowerSearchCol</param-name> -Â Â Â Â Â Â <param-value>AIRAVATA_INTERNAL_USER_ID</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>defaultSortCol</param-name> -Â Â Â Â Â Â <param-value>AIRAVATA_INTERNAL_USER_ID</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â - <!-- Â <init-param> -Â Â Â Â Â Â <param-name>subjectIdentifierCol0</param-name> -Â Â Â Â Â Â <param-value>subject_identifier</param-value> -Â Â Â Â Â </init-param> --> -Â Â Â Â Â -Â Â Â Â Â <!-- <init-param> -Â Â Â Â Â Â <param-name>subjectAttributeCol0</param-name> -Â Â Â Â Â Â <param-value>description</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>subjectAttributeName0</param-name> -Â Â Â Â Â Â <param-value>description</param-value> -Â Â Â Â Â </init-param> --> -Â Â Â Â Â -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>sortAttribute0</param-name> -Â Â Â Â Â Â <param-value>AIRAVATA_INTERNAL_USER_ID</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>searchAttribute0</param-name> -Â Â Â Â Â Â <param-value>AIRAVATA_INTERNAL_USER_ID</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â <!-- <internal-attribute>searchAttribute0</internal-attribute> --> -Â Â Â Â Â -Â Â Â Â Â <!-- <init-param> -Â Â Â Â Â Â <param-name>statusDatastoreFieldName</param-name> -Â Â Â Â Â Â <param-value>status</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>statusLabel</param-name> -Â Â Â Â Â Â <param-value>status</param-value> -Â Â Â Â Â </init-param> --> -Â Â Â Â Â -Â Â Â Â Â -Â Â Â Â Â <!-- <init-param> -Â Â Â Â Â Â <param-name>statusesFromUser</param-name> -Â Â Â Â Â Â <param-value>Active, Inactive, Pending, All</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>statusAllFromUser</param-name> -Â Â Â Â Â Â <param-value>All</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>statusSearchDefault</param-name> -Â Â Â Â Â Â <param-value>status=active</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>statusTranslateUser0</param-name> -Â Â Â Â Â Â <param-value>active</param-value> -Â Â Â Â Â </init-param> -Â Â Â Â Â <init-param> -Â Â Â Â Â Â <param-name>statusTranslateDatastore0</param-name> -Â Â Â Â Â Â <param-value>A</param-value> -Â Â Â Â Â </init-param> --> -Â Â Â Â </source>Â - -</sources> - http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/group-manager/src/main/resources/spy.properties ---------------------------------------------------------------------- diff --git a/modules/group-manager/src/main/resources/spy.properties b/modules/group-manager/src/main/resources/spy.properties deleted file mode 100755 index c5ba04e..0000000 --- a/modules/group-manager/src/main/resources/spy.properties +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright 2014 Internet2 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -#Wed Nov 14 17:17:49 EST 2007 -exclude= -include= -stringmatcher= -reloadproperties=false -log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender - -# e.g. mysql: com.mysql.jdbc.Driver -# e.g. p6spy (log sql): com.p6spy.engine.spy.P6SpyDriver -# for p6spy, put the underlying driver in spy.properties -# e.g. oracle: oracle.jdbc.driver.OracleDriver -# e.g. hsqldb: org.hsqldb.jdbcDriver -# e.g. postgres: org.postgresql.Driver -# e.g. SQL Server: com.microsoft.sqlserver.jdbc.SQLServerDriver -realdriver=com.mysql.jdbc.Driver - -outagedetectioninterval= -log4j.logger.p6spy=INFO,STDOUT -log4j.appender.STDOUT.layout.ConversionPattern=p6spy - %m%n -deregisterdrivers=true -autoflush=true -outagedetection=false -useprefix=false -includecategories= -filter=false -excludecategories=info,debug,result,batch -logfile=c\:\\temp\\grouperSpy.log -module.log=com.p6spy.engine.logging.P6LogFactory -sqlexpression= -reloadpropertiesinterval=60 -dateformat=yyyy/MM/dd HH\:mm\:ss\:SSS -stacktrace=false -executionthreshold= -log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout -append=false -appender=com.p6spy.engine.logging.appender.FileLogger -stacktraceclass= http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/group-manager/src/main/resources/sqltool.rc ---------------------------------------------------------------------- diff --git a/modules/group-manager/src/main/resources/sqltool.rc b/modules/group-manager/src/main/resources/sqltool.rc deleted file mode 100755 index 270a3b4..0000000 --- a/modules/group-manager/src/main/resources/sqltool.rc +++ /dev/null @@ -1,6 +0,0 @@ -# This is a sample sqltool.rc file for use with hsqldb. -urlid grouper -url jdbc:hsqldb:hsql://127.0.0.1/grouper -username sa -password - http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/group-manager/src/main/resources/subject.base.properties ---------------------------------------------------------------------- diff --git a/modules/group-manager/src/main/resources/subject.base.properties b/modules/group-manager/src/main/resources/subject.base.properties deleted file mode 100755 index 6e9fcef..0000000 --- a/modules/group-manager/src/main/resources/subject.base.properties +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright 2014 Internet2 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Subject configuration -# $Id: subject.base.properties,v 1.24 2009-12-30 04:23:02 mchyzer Exp $ -# - -# The subject proprties uses Grouper Configuration Overlays (documented on wiki) -# By default the configuration is read from subject.base.properties -# (which should not be edited), and the subject.properties overlays -# the base settings. See the subject.base.properties for the possible -# settings that can be applied to the subject.properties - -######################################## -## Config chaining hierarchy -######################################## - -# comma separated config files that override each other (files on the right override the left) -# each should start with file: or classpath: -# e.g. classpath:subject.example.properties, file:c:/something/myconfig.properties -subject.config.hierarchy = classpath:subject.base.properties, classpath:subject.properties - -# seconds between checking to see if the config files are updated -subject.config.secondsBetweenUpdateChecks = 60 - -######################################## - -# enter the location of the sources.xml. Must start with classpath: or file: -# default is: classpath:sources.xml -# e.g. file:/dir1/dir2/sources.xml -subject.sources.xml.location = classpath:sources.xml - http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/group-manager/src/main/resources/subject.properties ---------------------------------------------------------------------- diff --git a/modules/group-manager/src/main/resources/subject.properties b/modules/group-manager/src/main/resources/subject.properties deleted file mode 100755 index 98e54c7..0000000 --- a/modules/group-manager/src/main/resources/subject.properties +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2014 Internet2 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Subject configuration -# $Id: subject.base.properties,v 1.24 2009-12-30 04:23:02 mchyzer Exp $ -# - -# The subject proprties uses Grouper Configuration Overlays (documented on wiki) -# By default the configuration is read from subject.base.properties -# (which should not be edited), and the subject.properties overlays -# the base settings. See the subject.base.properties for the possible -# settings that can be applied to the subject.properties - http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/sharing-registry/README.md ---------------------------------------------------------------------- diff --git a/modules/sharing-registry/README.md b/modules/sharing-registry/README.md new file mode 100644 index 0000000..299e7b4 --- /dev/null +++ b/modules/sharing-registry/README.md @@ -0,0 +1,3 @@ +## Airavata Governance Registry + +* This module implements a generic service for access controlling to resources and to provide group based resource sharing \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/sharing-registry/pom.xml ---------------------------------------------------------------------- diff --git a/modules/sharing-registry/pom.xml b/modules/sharing-registry/pom.xml new file mode 100644 index 0000000..a931543 --- /dev/null +++ b/modules/sharing-registry/pom.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <artifactId>airavata</artifactId> + <groupId>org.apache.airavata</groupId> + <relativePath>../../pom.xml</relativePath> + <version>0.17-SNAPSHOT</version> + </parent> + + <groupId>org.apache.airavata</groupId> + <artifactId>airavata-sharing-registry</artifactId> + <packaging>pom</packaging> + <version>${global.version}</version> + + <properties> + <global.version>0.17-SNAPSHOT</global.version> + </properties> + + <modules> + <module>sharing-registry-stubs</module> + <module>sharing-registry-core</module> + <module>sharing-data-migrator</module> + </modules> +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/sharing-registry/sharing-data-migrator/pom.xml ---------------------------------------------------------------------- diff --git a/modules/sharing-registry/sharing-data-migrator/pom.xml b/modules/sharing-registry/sharing-data-migrator/pom.xml new file mode 100644 index 0000000..472b0a2 --- /dev/null +++ b/modules/sharing-registry/sharing-data-migrator/pom.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <artifactId>airavata-sharing-registry</artifactId> + <groupId>org.apache.airavata</groupId> + <version>${global.version}</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>airavata-sharing-data-migrator</artifactId> + + <dependencies> + <dependency> + <groupId>org.apache.airavata</groupId> + <artifactId>airavata-sharing-registry-core</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/ConnectionFactory.java ---------------------------------------------------------------------- diff --git a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/ConnectionFactory.java b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/ConnectionFactory.java new file mode 100644 index 0000000..40c0e18 --- /dev/null +++ b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/ConnectionFactory.java @@ -0,0 +1,59 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +package org.apache.airavata.sharing.registry; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; + +public class ConnectionFactory { + private final static Logger logger = LoggerFactory.getLogger(ConnectionFactory.class); + + //static reference to itself + private static ConnectionFactory instance; + + public static final String EXPCAT_URL = "jdbc:mysql://localhost/airavata_exp_catalog"; + public static final String EXPCAT_USER = "root"; + public static final String EXPCAT_PASSWORD = ""; + public static final String DRIVER_CLASS = "com.mysql.jdbc.Driver"; + + private static Connection expCatConnection; + + //private constructor + private ConnectionFactory() throws ClassNotFoundException, SQLException { + Class.forName(DRIVER_CLASS); + expCatConnection = DriverManager.getConnection(EXPCAT_URL, EXPCAT_USER, EXPCAT_PASSWORD); + } + + public static ConnectionFactory getInstance() throws SQLException, ClassNotFoundException { + if(instance == null) + instance = new ConnectionFactory(); + return instance; + } + + public Connection getExpCatConnection() throws SQLException { + return expCatConnection; + } + +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/DataMigrator.java ---------------------------------------------------------------------- diff --git a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/DataMigrator.java b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/DataMigrator.java new file mode 100644 index 0000000..ea23042 --- /dev/null +++ b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/DataMigrator.java @@ -0,0 +1,166 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +package org.apache.airavata.sharing.registry; + +import org.apache.airavata.common.exception.ApplicationSettingsException; +import org.apache.airavata.sharing.registry.models.*; +import org.apache.airavata.sharing.registry.server.SharingRegistryServerHandler; +import org.apache.thrift.TException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.HashMap; +import java.util.Map; + +public class DataMigrator { + private final static Logger logger = LoggerFactory.getLogger(DataMigrator.class); + + public static void main(String[] args) throws SQLException, ClassNotFoundException, TException, ApplicationSettingsException { + Connection expCatConnection = ConnectionFactory.getInstance().getExpCatConnection(); + + SharingRegistryServerHandler govRegistryServerHandler = new SharingRegistryServerHandler(); + + String query = "SELECT * FROM GATEWAY"; + Statement statement = expCatConnection.createStatement(); + ResultSet rs = statement.executeQuery(query); + + while (rs.next()) { + //Creating domain entries + Domain domain = new Domain(); + domain.setDomainId(rs.getString("GATEWAY_ID")); + if(rs.getString("GATEWAY_NAME") != null) + domain.setName(rs.getString("GATEWAY_NAME")); + else + domain.setName(rs.getString("GATEWAY_ID")); + domain.setDescription("Domain entry for " + domain.name); + + govRegistryServerHandler.createDomain(domain); + + //Creating Entity Types for each domain + EntityType entityType = new EntityType(); + entityType.setEntityTypeId(domain.domainId+":PROJECT"); + entityType.setDomainId(domain.domainId); + entityType.setName("PROJECT"); + entityType.setDescription("Project entity type"); + govRegistryServerHandler.createEntityType(entityType); + + entityType = new EntityType(); + entityType.setEntityTypeId(domain.domainId+":EXPERIMENT"); + entityType.setDomainId(domain.domainId); + entityType.setName("EXPERIMENT"); + entityType.setDescription("Experiment entity type"); + govRegistryServerHandler.createEntityType(entityType); + + entityType = new EntityType(); + entityType.setEntityTypeId(domain.domainId+":FILE"); + entityType.setDomainId(domain.domainId); + entityType.setName("FILE"); + entityType.setDescription("File entity type"); + govRegistryServerHandler.createEntityType(entityType); + + //Creating Permission Types for each domain + PermissionType permissionType = new PermissionType(); + permissionType.setPermissionTypeId(domain.domainId+":READ"); + permissionType.setDomainId(domain.domainId); + permissionType.setName("READ"); + permissionType.setDescription("Read permission type"); + govRegistryServerHandler.createPermissionType(permissionType); + + permissionType = new PermissionType(); + permissionType.setPermissionTypeId(domain.domainId+":WRITE"); + permissionType.setDomainId(domain.domainId); + permissionType.setName("WRITE"); + permissionType.setDescription("Write permission type"); + govRegistryServerHandler.createPermissionType(permissionType); + } + + //Creating user entries + query = "SELECT * FROM USERS"; + statement = expCatConnection.createStatement(); + rs = statement.executeQuery(query); + while(rs.next()){ + User user = new User(); + user.setUserId(rs.getString("AIRAVATA_INTERNAL_USER_ID")); + user.setDomainId(rs.getString("GATEWAY_ID")); + user.setUserName(rs.getString("USER_NAME")); + + govRegistryServerHandler.createUser(user); + } + + //Creating project entries + query = "SELECT * FROM PROJECT"; + statement = expCatConnection.createStatement(); + rs = statement.executeQuery(query); + while(rs.next()){ + Entity entity = new Entity(); + entity.setEntityId(rs.getString("PROJECT_ID")); + entity.setDomainId(rs.getString("GATEWAY_ID")); + entity.setEntityTypeId(rs.getString("GATEWAY_ID") + ":PROJECT"); + entity.setOwnerId(rs.getString("USER_NAME") + "@" + rs.getString("GATEWAY_ID")); + entity.setName(rs.getString("PROJECT_NAME")); + entity.setDescription(rs.getString("DESCRIPTION")); + if(entity.getDescription() == null) + entity.setFullText(entity.getName()); + else + entity.setFullText(entity.getName() + " " + entity.getDescription()); + Map<String, String> metadata = new HashMap<>(); + metadata.put("CREATION_TIME", rs.getDate("CREATION_TIME").toString()); + + govRegistryServerHandler.createEntity(entity); + } + + //Creating experiment entries + query = "SELECT * FROM EXPERIMENT"; + statement = expCatConnection.createStatement(); + rs = statement.executeQuery(query); + while(rs.next()){ + Entity entity = new Entity(); + entity.setEntityId(rs.getString("EXPERIMENT_ID")); + entity.setDomainId(rs.getString("GATEWAY_ID")); + entity.setEntityTypeId(rs.getString("GATEWAY_ID") + ":EXPERIMENT"); + entity.setOwnerId(rs.getString("USER_NAME") + "@" + rs.getString("GATEWAY_ID")); + entity.setParentEntityId(rs.getString("PROJECT_ID")); + entity.setName(rs.getString("EXPERIMENT_NAME")); + entity.setDescription(rs.getString("DESCRIPTION")); + if(entity.getDescription() == null) + entity.setFullText(entity.getName()); + else + entity.setFullText(entity.getName() + " " + entity.getDescription()); + Map<String, String> metadata = new HashMap<>(); + metadata.put("CREATION_TIME", rs.getDate("CREATION_TIME").toString()); + metadata.put("EXPERIMENT_TYPE", rs.getString("EXPERIMENT_TYPE")); + metadata.put("EXECUTION_ID", rs.getString("EXECUTION_ID")); + metadata.put("GATEWAY_EXECUTION_ID", rs.getString("GATEWAY_EXECUTION_ID")); + metadata.put("ENABLE_EMAIL_NOTIFICATION", rs.getString("ENABLE_EMAIL_NOTIFICATION")); + metadata.put("EMAIL_ADDRESSES", rs.getString("EMAIL_ADDRESSES")); + metadata.put("GATEWAY_INSTANCE_ID", rs.getString("GATEWAY_INSTANCE_ID")); + metadata.put("ARCHIVE", rs.getString("ARCHIVE")); + + govRegistryServerHandler.createEntity(entity); + } + + expCatConnection.close(); + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/sharing-registry/sharing-registry-core/pom.xml ---------------------------------------------------------------------- diff --git a/modules/sharing-registry/sharing-registry-core/pom.xml b/modules/sharing-registry/sharing-registry-core/pom.xml new file mode 100644 index 0000000..3ed4de5 --- /dev/null +++ b/modules/sharing-registry/sharing-registry-core/pom.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <artifactId>airavata-sharing-registry</artifactId> + <groupId>org.apache.airavata</groupId> + <relativePath>../pom.xml</relativePath> + <version>${global.version}</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>airavata-sharing-registry-core</artifactId> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.10</version> + </dependency> + <dependency> + <groupId>org.apache.thrift</groupId> + <artifactId>libthrift</artifactId> + <version>0.9.3</version> + </dependency> + <dependency> + <groupId>org.apache.airavata</groupId> + <artifactId>airavata-sharing-registry-stubs</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.airavata</groupId> + <artifactId>airavata-server-configuration</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.airavata</groupId> + <artifactId>airavata-commons</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>net.sf.dozer</groupId> + <artifactId>dozer</artifactId> + <version>5.4.0</version> + </dependency> + <dependency> + <groupId>org.apache.openjpa</groupId> + <artifactId>openjpa-all</artifactId> + <version>2.2.0</version> + </dependency> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <version>5.1.34</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.5.1</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.openjpa</groupId> + <artifactId>openjpa-maven-plugin</artifactId> + <version>2.2.0</version> + <configuration> + <includes>**/entities/*.class</includes> + <excludes>**/entities/XML*.class</excludes> + <addDefaultConstructor>true</addDefaultConstructor> + <enforcePropertyRestrictions>true</enforcePropertyRestrictions> + </configuration> + <executions> + <execution> + <id>enhancer</id> + <phase>process-classes</phase> + <goals> + <goal>enhance</goal> + </goals> + </execution> + </executions> + <dependencies> + <dependency> + <groupId>org.apache.openjpa</groupId> + <artifactId>openjpa</artifactId> + <version>2.2.0</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/DomainEntity.java ---------------------------------------------------------------------- diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/DomainEntity.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/DomainEntity.java new file mode 100644 index 0000000..48b5314 --- /dev/null +++ b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/DomainEntity.java @@ -0,0 +1,113 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +package org.apache.airavata.sharing.registry.db.entities; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.persistence.*; + +@Entity +@Table(name = "DOMAIN", schema = "" ) +public class DomainEntity { + private final static Logger logger = LoggerFactory.getLogger(DomainEntity.class); + private String domainId; + private String name; + private String description; + private Long createdTime; + private Long updatedTime; + + @Id + @Column(name = "DOMAIN_ID") + public String getDomainId() { + return domainId; + } + + public void setDomainId(String domainId) { + this.domainId = domainId; + } + + @Basic + @Column(name = "NAME") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Basic + @Column(name = "DESCRIPTION") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Basic + @Column(name = "CREATED_TIME") + public Long getCreatedTime() { + return createdTime; + } + + public void setCreatedTime(Long createdTime) { + this.createdTime = createdTime; + } + + @Basic + @Column(name = "UPDATED_TIME") + public Long getUpdatedTime() { + return updatedTime; + } + + public void setUpdatedTime(Long updatedTime) { + this.updatedTime = updatedTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + DomainEntity that = (DomainEntity) o; + + if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false; + if (name != null ? !name.equals(that.name) : that.name != null) return false; + if (description != null ? !description.equals(that.description) : that.description != null) return false; + if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false; + if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false; + + return true; + } + + @Override + public int hashCode() { + int result = domainId != null ? domainId.hashCode() : 0; + result = 31 * result + (name != null ? name.hashCode() : 0); + result = 31 * result + (description != null ? description.hashCode() : 0); + result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0); + result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0); + return result; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java ---------------------------------------------------------------------- diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java new file mode 100644 index 0000000..de8abf4 --- /dev/null +++ b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java @@ -0,0 +1,192 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +package org.apache.airavata.sharing.registry.db.entities; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.persistence.*; +import java.util.Map; + +@Entity +@Table(name = "ENTITY", schema = "") +public class EntityEntity { + private final static Logger logger = LoggerFactory.getLogger(EntityEntity.class); + private String entityId; + private String domainId; + private String entityTypeId; + private String ownerId; + private String parentEntityId; + private String name; + private String description; + private Map<String, String> metadata; + private String fullText; + private Long createdTime; + private Long updatedTime; + + @Id + @Column(name = "ENTITY_ID") + public String getEntityId() { + return entityId; + } + + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + @Basic + @Column(name = "DOMAIN_ID") + public String getDomainId() { + return domainId; + } + + public void setDomainId(String domainId) { + this.domainId = domainId; + } + + @Basic + @Column(name = "ENTITY_TYPE_ID") + public String getEntityTypeId() { + return entityTypeId; + } + + public void setEntityTypeId(String entityTypeId) { + this.entityTypeId = entityTypeId; + } + + @Basic + @Column(name = "OWNER_ID") + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(String ownerId) { + this.ownerId = ownerId; + } + + @Basic + @Column(name = "PARENT_ENTITY_ID") + public String getParentEntityId() { + return parentEntityId; + } + + public void setParentEntityId(String parentEntityId) { + this.parentEntityId = parentEntityId; + } + + @Basic + @Column(name = "NAME") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Basic + @Column(name = "DESCRIPTION") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @ElementCollection + @CollectionTable( + name="ENTITY_METADATA", + joinColumns=@JoinColumn(name="ENTITY_ID") + ) + @MapKeyColumn(name="META_KEY") + @Column(name="META_VALUE") + public Map<String, String> getMetadata() { + return metadata; + } + + public void setMetadata(Map<String, String> metadata) { + this.metadata = metadata; + } + + @Lob + @Column(name = "FULL_TEXT") + public String getFullText() { + return fullText; + } + + public void setFullText(String fullText) { + this.fullText = fullText; + } + + @Basic + @Column(name = "CREATED_TIME") + public Long getCreatedTime() { + return createdTime; + } + + public void setCreatedTime(Long createdTime) { + this.createdTime = createdTime; + } + + @Basic + @Column(name = "UPDATED_TIME") + public Long getUpdatedTime() { + return updatedTime; + } + + public void setUpdatedTime(Long updatedTime) { + this.updatedTime = updatedTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + EntityEntity that = (EntityEntity) o; + + if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false; + if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false; + if (parentEntityId != null ? !parentEntityId.equals(that.parentEntityId) : that.parentEntityId != null) return false; + if (name != null ? !name.equals(that.name) : that.name != null) return false; + if (description != null ? !description.equals(that.description) : that.description != null) return false; + if (metadata.equals(that.metadata)) return false; + if (fullText != null ? !fullText.equals(that.fullText) : that.fullText != null) return false; + if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false; + if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false; + if (ownerId != null ? !ownerId.equals(that.ownerId) : that.ownerId != null) return false; + + return true; + } + + @Override + public int hashCode() { + int result = entityId != null ? entityId.hashCode() : 0; + result = 31 * result + (name != null ? name.hashCode() : 0); + result = 31 * result + (description != null ? description.hashCode() : 0); + result = 31 * result + (metadata != null ? metadata.hashCode() : 0); + result = 31 * result + (fullText != null ? fullText.hashCode() : 0); + result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0); + result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0); + return result; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/82e57526/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java ---------------------------------------------------------------------- diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java new file mode 100644 index 0000000..0b789ed --- /dev/null +++ b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java @@ -0,0 +1,125 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +package org.apache.airavata.sharing.registry.db.entities; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.persistence.*; + +@Entity +@Table(name = "ENTITY_TYPE", schema = "") +public class EntityTypeEntity { + private final static Logger logger = LoggerFactory.getLogger(EntityTypeEntity.class); + private String entityTypeId; + private String domainId; + private String name; + private String description; + private Long createdTime; + private Long updatedTime; + + @Id + @Column(name = "ENTITY_TYPE_ID") + public String getEntityTypeId() { + return entityTypeId; + } + + public void setEntityTypeId(String entityTypeId) { + this.entityTypeId = entityTypeId; + } + + @Basic + @Column(name = "DOMAIN_ID") + public String getDomainId() { + return domainId; + } + + public void setDomainId(String domainId) { + this.domainId = domainId; + } + + @Basic + @Column(name = "NAME") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Basic + @Column(name = "DESCRIPTION") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Basic + @Column(name = "CREATED_TIME") + public Long getCreatedTime() { + return createdTime; + } + + public void setCreatedTime(Long createdTime) { + this.createdTime = createdTime; + } + + @Basic + @Column(name = "UPDATED_TIME") + public Long getUpdatedTime() { + return updatedTime; + } + + public void setUpdatedTime(Long updatedTime) { + this.updatedTime = updatedTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + EntityTypeEntity that = (EntityTypeEntity) o; + + if (entityTypeId != null ? !entityTypeId.equals(that.entityTypeId) : that.entityTypeId != null) return false; + if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false; + if (name != null ? !name.equals(that.name) : that.name != null) return false; + if (description != null ? !description.equals(that.description) : that.description != null) return false; + if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false; + if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false; + + return true; + } + + @Override + public int hashCode() { + int result = entityTypeId != null ? entityTypeId.hashCode() : 0; + result = 31 * result + (name != null ? name.hashCode() : 0); + result = 31 * result + (description != null ? description.hashCode() : 0); + result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0); + result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0); + return result; + } +} \ No newline at end of file
