public static DLFolder getTargetFolder( long groupId, long parentFolderId, String destination) { DLFolder dlFolder = null; String[] folderNames = StringUtil.split(destination, StringPool.FORWARD_SLASH); if (folderNames != null && folderNames.length > 0) { String name = folderNames[0]; dlFolder = getFolder(groupId, parentFolderId, name); folderNames = ArrayUtil.remove(folderNames, name); if (folderNames.length > 0) { dlFolder = getTargetFolder( groupId, dlFolder.getFolderId(), StringUtil.merge(folderNames, StringPool.FORWARD_SLASH)); } } return dlFolder; }
/** * Get payment message * * @param pattern * @return */ public static List<String> getMessagePayment(String pattern) { List<String> msgPayments = new ArrayList<String>(); try { pattern = pattern.substring(pattern.indexOf(PAY_MESSAGE), pattern.lastIndexOf(PAY_MESSAGE) + 1); String[] splitPattern = StringUtil.split(pattern, PAY_MESSAGE); for (String element : splitPattern) { if (!element.trim().contentEquals("")) { msgPayments.add(StringUtil.trimLeading(element)); } } } catch (Exception e) { } return msgPayments; }
/** * @param pattern * @param content * @return */ private static boolean _checkcontains(String pattern, String content) { boolean isContains = false; String[] splitPattern = StringUtil.split(pattern, StringPool.SPACE); for (String element : splitPattern) { if (Validator.equals(element, content)) { isContains = true; break; } } return isContains; }
public List<String> getMappingTables() { List<String> mappingTablesFields = ReflectionUtil.getLiferayModelImplMappingTablesFields( getLiferayModelImplClass()); List<String> mappingTables = new ArrayList<String>( mappingTablesFields.size()); for (String mappingTablesField : mappingTablesFields) { String mappingTable = StringUtil.replaceFirst( mappingTablesField, "MAPPING_TABLE_", StringPool.BLANK); mappingTable = StringUtil.replace( mappingTable, "_NAME", StringPool.BLANK); mappingTable = StringUtil.toLowerCase(mappingTable); mappingTables.add(mappingTable); } return mappingTables; }
public TableInfo getTableInfo(String mappingTable) { Class<?> classLiferayModelImpl = getLiferayModelImplClass(); String fieldPrefix = "TABLE"; if (mappingTable != null) { fieldPrefix = "MAPPING_TABLE_" + StringUtil.toUpperCase(mappingTable); } Object[][] attributesArr = (Object[][])ReflectionUtil.getStaticFieldValue( classLiferayModelImpl, fieldPrefix + "_COLUMNS"); String name = (String)ReflectionUtil.getStaticFieldValue( classLiferayModelImpl, fieldPrefix + "_NAME"); String sqlCreate = (String)ReflectionUtil.getStaticFieldValue( classLiferayModelImpl, fieldPrefix + "_SQL_CREATE"); return new TableInfo(name, attributesArr, sqlCreate); }
public static void main(String[] args) { String regex = "(\\w+)\\.trim\\(\\)"; String str = "sd sdfeb sampleStr.trim();"; Pattern pattern = Pattern.compile(regex); System.out.println(pattern.pattern()); Matcher mather = pattern.matcher(str); String newStr = str; while (mather.find()) { String firstGroup = mather.group(1); newStr = StringUtil.replace(newStr, firstGroup, "StringUtil", mather.start()); newStr = StringUtil.replace(newStr, "trim()", "trim(" + firstGroup + ")"); System.out.print(newStr); } }
/** * Initializes the eb partner ship persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.EbPartnerShip"))); if (listenerClassNames.length > 0) { try { List<ModelListener<EbPartnerShip>> listenersList = new ArrayList<ModelListener<EbPartnerShip>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<EbPartnerShip>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the doc template persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.DocTemplate"))); if (listenerClassNames.length > 0) { try { List<ModelListener<DocTemplate>> listenersList = new ArrayList<ModelListener<DocTemplate>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<DocTemplate>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } docTemplateToDossierDocTableMapper = TableMapperFactory.getTableMapper("oep_dossiermgt_dossierdoc2template", "docTemplateId", "dossierDocId", this, dossierDocPersistence); }
/** * Initializes the dossier proc agency persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.DossierProcAgency"))); if (listenerClassNames.length > 0) { try { List<ModelListener<DossierProcAgency>> listenersList = new ArrayList<ModelListener<DossierProcAgency>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<DossierProcAgency>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the dossier doc2 template persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.DossierDoc2Template"))); if (listenerClassNames.length > 0) { try { List<ModelListener<DossierDoc2Template>> listenersList = new ArrayList<ModelListener<DossierDoc2Template>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<DossierDoc2Template>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the doc file persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.DocFile"))); if (listenerClassNames.length > 0) { try { List<ModelListener<DocFile>> listenersList = new ArrayList<ModelListener<DocFile>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<DocFile>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the payment request persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.PaymentRequest"))); if (listenerClassNames.length > 0) { try { List<ModelListener<PaymentRequest>> listenersList = new ArrayList<ModelListener<PaymentRequest>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<PaymentRequest>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the dossier proc2 agent persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.DossierProc2Agent"))); if (listenerClassNames.length > 0) { try { List<ModelListener<DossierProc2Agent>> listenersList = new ArrayList<ModelListener<DossierProc2Agent>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<DossierProc2Agent>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the legal details persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.de.fraunhofer.fokus.movepla.model.LegalDetails"))); if (listenerClassNames.length > 0) { try { List<ModelListener<LegalDetails>> listenersList = new ArrayList<ModelListener<LegalDetails>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<LegalDetails>) InstanceFactory.newInstance( listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the dossier persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.Dossier"))); if (listenerClassNames.length > 0) { try { List<ModelListener<Dossier>> listenersList = new ArrayList<ModelListener<Dossier>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<Dossier>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the profile data persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.ProfileData"))); if (listenerClassNames.length > 0) { try { List<ModelListener<ProfileData>> listenersList = new ArrayList<ModelListener<ProfileData>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<ProfileData>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the dossier folder persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.DossierFolder"))); if (listenerClassNames.length > 0) { try { List<ModelListener<DossierFolder>> listenersList = new ArrayList<ModelListener<DossierFolder>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<DossierFolder>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the dossier doc persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.DossierDoc"))); if (listenerClassNames.length > 0) { try { List<ModelListener<DossierDoc>> listenersList = new ArrayList<ModelListener<DossierDoc>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<DossierDoc>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } dossierDocToDocTemplateTableMapper = TableMapperFactory.getTableMapper("oep_dossiermgt_dossierdoc2template", "dossierDocId", "docTemplateId", this, docTemplatePersistence); }
/** * Initializes the eb message persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.EbMessage"))); if (listenerClassNames.length > 0) { try { List<ModelListener<EbMessage>> listenersList = new ArrayList<ModelListener<EbMessage>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<EbMessage>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the logging persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.de.fraunhofer.fokus.movepla.model.Logging"))); if (listenerClassNames.length > 0) { try { List<ModelListener<Logging>> listenersList = new ArrayList<ModelListener<Logging>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<Logging>) InstanceFactory.newInstance( listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the statistic by day persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.StatisticByDay"))); if (listenerClassNames.length > 0) { try { List<ModelListener<StatisticByDay>> listenersList = new ArrayList<ModelListener<StatisticByDay>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<StatisticByDay>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the payment config persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.PaymentConfig"))); if (listenerClassNames.length > 0) { try { List<ModelListener<PaymentConfig>> listenersList = new ArrayList<ModelListener<PaymentConfig>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<PaymentConfig>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the entitlement persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.de.fraunhofer.fokus.movepla.model.Entitlement"))); if (listenerClassNames.length > 0) { try { List<ModelListener<Entitlement>> listenersList = new ArrayList<ModelListener<Entitlement>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<Entitlement>) InstanceFactory.newInstance( listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } containsApplication_Entitlement = new ContainsApplication_Entitlement(); }
/** * Initializes the dossier tag persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.core.dossiermgt.model.DossierTag"))); if (listenerClassNames.length > 0) { try { List<ModelListener<DossierTag>> listenersList = new ArrayList<ModelListener<DossierTag>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<DossierTag>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
@Override public List<AHCategories> getCategoriesByListStr(String categoryIds) throws SystemException { List<AHCategories> result = null; Session session = null; try { session = openSession(); String sql = StringUtil.replace(getCategoriesByIdList, "[$ITEM_IDS$]", categoryIds); SQLQuery query = session.createSQLQuery(sql); query.addEntity("AHCategories", AHCategoriesImpl.class); result = (List<AHCategories>) query.list(); } catch (Exception e) { throw new SystemException(e); } finally { closeSession(session); } return result; }
/** * Initializes the module result persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.com.liferay.lms.model.ModuleResult"))); if (listenerClassNames.length > 0) { try { List<ModelListener<ModuleResult>> listenersList = new ArrayList<ModelListener<ModuleResult>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<ModuleResult>)InstanceFactory.newInstance( listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the p2p activity persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.com.liferay.lms.model.P2pActivity"))); if (listenerClassNames.length > 0) { try { List<ModelListener<P2pActivity>> listenersList = new ArrayList<ModelListener<P2pActivity>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<P2pActivity>)InstanceFactory.newInstance( listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the dossier proc bookmark persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.dossiermgt.model.DossierProcBookmark"))); if (listenerClassNames.length > 0) { try { List<ModelListener<DossierProcBookmark>> listenersList = new ArrayList<ModelListener<DossierProcBookmark>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<DossierProcBookmark>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the survey result persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.com.liferay.lms.model.SurveyResult"))); if (listenerClassNames.length > 0) { try { List<ModelListener<SurveyResult>> listenersList = new ArrayList<ModelListener<SurveyResult>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<SurveyResult>)InstanceFactory.newInstance( listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the dossier persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.dossiermgt.model.Dossier"))); if (listenerClassNames.length > 0) { try { List<ModelListener<Dossier>> listenersList = new ArrayList<ModelListener<Dossier>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<Dossier>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the test answer persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.com.liferay.lms.model.TestAnswer"))); if (listenerClassNames.length > 0) { try { List<ModelListener<TestAnswer>> listenersList = new ArrayList<ModelListener<TestAnswer>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<TestAnswer>)InstanceFactory.newInstance( listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the statistic by agency persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.dossiermgt.model.StatisticByAgency"))); if (listenerClassNames.length > 0) { try { List<ModelListener<StatisticByAgency>> listenersList = new ArrayList<ModelListener<StatisticByAgency>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<StatisticByAgency>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the dossier folder persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.dossiermgt.model.DossierFolder"))); if (listenerClassNames.length > 0) { try { List<ModelListener<DossierFolder>> listenersList = new ArrayList<ModelListener<DossierFolder>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<DossierFolder>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the statistic by domain persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.dossiermgt.model.StatisticByDomain"))); if (listenerClassNames.length > 0) { try { List<ModelListener<StatisticByDomain>> listenersList = new ArrayList<ModelListener<StatisticByDomain>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<StatisticByDomain>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the user certificate download persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.com.liferay.lms.model.UserCertificateDownload"))); if (listenerClassNames.length > 0) { try { List<ModelListener<UserCertificateDownload>> listenersList = new ArrayList<ModelListener<UserCertificateDownload>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<UserCertificateDownload>)InstanceFactory.newInstance( listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the dossier proc agent persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.dossiermgt.model.DossierProcAgent"))); if (listenerClassNames.length > 0) { try { List<ModelListener<DossierProcAgent>> listenersList = new ArrayList<ModelListener<DossierProcAgent>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<DossierProcAgent>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the statistic by day persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.org.oep.dossiermgt.model.StatisticByDay"))); if (listenerClassNames.length > 0) { try { List<ModelListener<StatisticByDay>> listenersList = new ArrayList<ModelListener<StatisticByDay>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<StatisticByDay>)InstanceFactory.newInstance( getClassLoader(), listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }
/** * Initializes the course competence persistence. */ public void afterPropertiesSet() { String[] listenerClassNames = StringUtil.split(GetterUtil.getString( com.liferay.util.service.ServiceProps.get( "value.object.listener.com.liferay.lms.model.CourseCompetence"))); if (listenerClassNames.length > 0) { try { List<ModelListener<CourseCompetence>> listenersList = new ArrayList<ModelListener<CourseCompetence>>(); for (String listenerClassName : listenerClassNames) { listenersList.add((ModelListener<CourseCompetence>)InstanceFactory.newInstance( listenerClassName)); } listeners = listenersList.toArray(new ModelListener[listenersList.size()]); } catch (Exception e) { _log.error(e); } } }