Skip to content

Instantly share code, notes, and snippets.

@marcosblandim
Last active April 6, 2023 14:39
Show Gist options
  • Select an option

  • Save marcosblandim/90304383e21c8e2c412f9cc0f0c255d4 to your computer and use it in GitHub Desktop.

Select an option

Save marcosblandim/90304383e21c8e2c412f9cc0f0c255d4 to your computer and use it in GitHub Desktop.
How to use Liferay OSGI Services inside Server Administration Groovy
import com.liferay.journal.service.JournalArticleLocalService
import com.liferay.portal.template.ServiceLocator
serviceLocator = ServiceLocator.newInstance()
journalArticleLocalService = serviceLocator.findService(JournalArticleLocalService.class.getName())
println journalArticleLocalService.getJournalArticles(1,3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment