This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #set ($AssetEntryLocalService = $serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService")) | |
| #set ($journalArticleLocalService = $serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService")) | |
| #set( $structureId = $journalArticle.getStructureId() ) | |
| #set ($ddmStructureLocalService = $serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService") ) | |
| #set( $numNews = $journalArticleLocalService.getStructureArticles($groupId, $structureId) ) | |
| #set( $newsUrl = $layout.getFriendlyURL() ) | |
| #set( $newsArticles = $journalArticleLocalService.getStructureArticles($groupId, $structureId) ) | |
| #set( $checkedArticleIds = [] ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #set( $newsArticles = $journalArticleLocalService.getStructureArticles($groupId, $structureId) ) | |
| #set( $checkedArticleIds = [] ) | |
| #foreach ($newArticle in $newsArticles) | |
| #set ( $articleId = $newArticle.getArticleId() ) | |
| #set ( $articleIdStr = $getterUtil.getString($articleId)) | |
| #set ( $firstChar = $articleIdStr.substring(0,1).toLowerCase()) | |
| #set ( $slash = "/") | |
| #if((!$checkedArticleIds.contains($articleId))&&($firstChar != $slash) ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 19:37:18,748 ERROR [http-bio-8080-exec-36][JDBCExceptionReporter:82] Connection has already been closed. | |
| 19:37:18,756 INFO [http-bio-8080-exec-36][CustomerFinderImpl:377] org.hibernate.exception.GenericJDBCException: could not execute query |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String[] ids = StringUtil.split(idStr, StringPool.COMMA); | |
| Set<String> idSet = new HashSet<String>(); | |
| for (int i = 0; i < ids.length; i++) { | |
| if(!idSet.contains(ids[i])){ | |
| idSet.add(ids[i]); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static final File downloadColorImage(String colorUrlString){ | |
| File file = new File(System.getProperty( "catalina.base" ) + "/colorFile.png"); | |
| try { | |
| URL colorUrl = new URL(colorUrlString); | |
| HttpURLConnection huc = (HttpURLConnection)colorUrl.openConnection(); | |
| int statusCode = huc.getResponseCode(); //get response code | |
| if (statusCode == HttpURLConnection.HTTP_MOVED_TEMP | |
| || statusCode == HttpURLConnection.HTTP_MOVED_PERM){ // if file is moved, then pick new URL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String userName = API_CLIENT_ID; | |
| String password = API_CLIENT_SECRET; | |
| String tokenApiUrl = OAUTH_API_URL; | |
| byte[] encodedBytes = Base64.encodeBase64((userName+":"+password).getBytes()); | |
| String encoding = new String(encodedBytes); | |
| HttpClient httpClient = HttpClientBuilder.create().build(); | |
| HttpPost postRequest = new HttpPost(); | |
| URI uri = new URI(tokenApiUrl); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| the main.js: | |
| AUI().ready( | |
| /* | |
| This function gets loaded when all the HTML, not including the portlets, is | |
| loaded. | |
| */ | |
| function() { | |
| alert("hola"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 00:35:09,747 ERROR [http-bio-8080-exec-71][JDBCExceptionReporter:82] Data truncation: Data too long for column 'value' at row 1 | |
| 00:35:09,748 ERROR [http-bio-8080-exec-71][DefaultTransactionExecutor:93] Application exception overridden by commit exception | |
| org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [insert into AssetCategoryProperty (companyId, userId, userName, createDate, modifiedDate, categoryId, key_, value, categoryPropertyId) values (?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.DataException: Could not execute JDBC batch update | |
| at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:642) | |
| at org.springframework.orm.hibernate3.SpringSessionSynchronization.translateException(SpringSessionSynchronization.java:160) | |
| at org.springframework.orm.hibernate3.SpringSessionSynchronization.beforeCommit(SpringSessionSynchronization.java:148) | |
| at org.springframework.transaction. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ClassLoader classLoader = PortalClassLoaderUtil.getClassLoader(); | |
| DynamicQuery templateQuery = DynamicQueryFactoryUtil.forClass(LayoutPrototype.class,classLoader) | |
| .add(PropertyFactoryUtil.forName("name").like("%>Product<%")); | |
| List<LayoutPrototype> templates = LayoutPrototypeLocalServiceUtil.dynamicQuery(templateQuery); | |
| LayoutPrototype productsPageTemplate = templates.get(0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Specify the number of minutes before a session expires. This value is | |
| # always overridden by the value set in web.xml. NOTE: the <session-timeout> | |
| # attribute in the web.xml files overrides these values. Comment them out. | |
| # | |
| session.timeout=5 | |
| # | |
| # Set the auto-extend mode to true to avoid having to ask the user whether | |
| # to extend the session or not. Instead, it will be automatically extended. |