diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..dea42bd --- /dev/null +++ b/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..262da18 --- /dev/null +++ b/.project @@ -0,0 +1,37 @@ + + + GuestDiscussion-portlet + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.apache.ivyde.eclipse.ivynature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope new file mode 100644 index 0000000..840a01d --- /dev/null +++ b/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..f42de36 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/.settings/org.eclipse.jst.jsp.core.prefs b/.settings/org.eclipse.jst.jsp.core.prefs new file mode 100644 index 0000000..3a5c98d --- /dev/null +++ b/.settings/org.eclipse.jst.jsp.core.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +validateFragments=false +validation.use-project-settings=true diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000..65e8543 --- /dev/null +++ b/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml new file mode 100644 index 0000000..1e7e631 --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000..b09ff7e --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/.tern-project b/.tern-project new file mode 100644 index 0000000..a185ba0 --- /dev/null +++ b/.tern-project @@ -0,0 +1 @@ +{"ide":{"scriptPaths":[]},"plugins":{"aui":{},"liferay":{},"yui":{}},"libs":["ecma5","browser"]} \ No newline at end of file diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..bec9de7 --- /dev/null +++ b/build.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/docroot/META-INF/MANIFEST.MF b/docroot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/docroot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/docroot/WEB-INF/classes/Language_en_US.properties b/docroot/WEB-INF/classes/Language_en_US.properties new file mode 100644 index 0000000..5e1fc17 --- /dev/null +++ b/docroot/WEB-INF/classes/Language_en_US.properties @@ -0,0 +1,43 @@ +javax.portlet.title=Guest Discussion +javax.portlet.short-title=Guest Discussion +javax.portlet.keywords=Discussion +commentbox.user.empty=You need to be logged in to create a comment. +commentbox.guest.name=Your Name +commentbox.guest.email=Email +commentbox.editor.notclicked=Leave a comment... +commentbox.editor.save=Post +commentbox.editor.savedraft=Save Draft +commentbox.editor.clear=Clear +commentbox.editor.cancel=Cancel +commentbox.editor.submitting=Submitting +commentbox.comments.empty=There are no comments yet. +commentbox.comments.comment.likecount=Likes +commentbox.comments.comment.dislikecount=Dislikes +commentbox.comments.comment.like=Like +commentbox.comments.comment.dislike=Dislike +commentbox.comments.comment.spam=Spam +commentbox.comments.comment.edit=Edit +commentbox.comments.comment.delete=Delete +commentbox.comments.comment.reply=Reply +commentbox.comments.comment.deletedmsg=This comment was deleted by the Author +commentbox.comments.comment.new.single=Show new Comment +commentbox.comments.comment.new.multiple=Show {0} new Comments +commentbox.comments.comment.newreply.single=Show new reply +commentbox.comments.comment.newreplies.multiple=Show {0} new replies +commentbox.comments.comment.typinguser.single=One typing User... +commentbox.comments.comment.typinguser.multiple={0} typing Users... +Select-Topic=Select Title +Verify-Comments=Verify Comments +Discussion-Topic=Discussion Topic +New-Topic=New Topic +There-is-no-unverified-comment=There is no unverified comment. +There-is-no-title=There is no title. +Guest-Name=Guest Name +Are-you-sure-about-deleting-this-title=Are you sure about deleting this title? +Deleting-title=Deleting title +Are-you-sure-about-deleting-this-comment=Are you sure about deleting this comment? +Deleting-comment=Deleting comment +Reply-to=Reply to +inform-by-email=Notify you when we received a new reply to your comment +empty-title-message=The configuration of this place has not set yet. Please contact admin. +inform-by-email-help=if you choose this option, you will be notified by email when we receive a new answer to your comment \ No newline at end of file diff --git a/docroot/WEB-INF/classes/Language_fa.properties b/docroot/WEB-INF/classes/Language_fa.properties new file mode 100644 index 0000000..61f06e3 --- /dev/null +++ b/docroot/WEB-INF/classes/Language_fa.properties @@ -0,0 +1,53 @@ +javax.portlet.title=نظر مهمان +javax.portlet.short-title=نظر مهمان +javax.portlet.keywords=نظر +commentbox.user.empty=You need to be logged in to create a comment. +commentbox.guest.name=نام شما +commentbox.guest.email=ایمیل +commentbox.editor.notclicked=Leave a comment... +commentbox.editor.save=ارسال +commentbox.editor.savedraft=ذخیره پیش نویس +commentbox.editor.clear=پاک کردن +commentbox.editor.cancel=لغو +commentbox.editor.submitting=Submitting +commentbox.comments.empty=هیچ پیامی برای این موضوع ارسال نشده است. +commentbox.comments.comment.likecount=موافق ها +commentbox.comments.comment.dislikecount=مخالف ها +commentbox.comments.comment.like=موافق +commentbox.comments.comment.dislike=مخالف +commentbox.comments.comment.spam=Spam +commentbox.comments.comment.edit=Edit +commentbox.comments.comment.delete=Delete +commentbox.comments.comment.reply=پاسخ +commentbox.comments.comment.deletedmsg=This comment was deleted by the Author +commentbox.comments.comment.new.single=Show new Comment +commentbox.comments.comment.new.multiple=Show {0} new Comments +commentbox.comments.comment.newreply.single=Show new reply +commentbox.comments.comment.newreplies.multiple=Show {0} new replies +commentbox.comments.comment.typinguser.single=One typing User... +commentbox.comments.comment.typinguser.multiple={0} typing Users... +Select-Topic=انتخاب موضوع +Verify-Comments=تایید پیام ها +Discussion-Topic=موضوع بحث +New-Topic=موضوع جدید +Add=اضافه کردن +Please-enter--a-topic-first=لطفا ابتدا یک موضوع وارد کنید! +Choose=انتخاب کردن +Comment=پیام +There-is-no-unverified-comment=پیام تایید نشده ای وجود ندارد. +There-is-no-title=موضوعی وجود ندارد. +Guest-Name=نام مهمان +Verify=تایید +Unverify=عدم تایید +Delete=حذف +Titles=موضوع ها +Are-you-sure-about-deleting-this-title=آیا از حذف این موضوع اطمینان دارید؟ +Deleting-title=حذف موضوع +Are-you-sure-about-deleting-this-comment=آیا از حذف این پیام اطمینان دارید؟ +Deleting-comment=حذف پیام +Yes=بلی +No=خیر +Reply-to=پاسخ به +inform-by-email=اطلاع رسانی هنگام دریافت پاسخ جدید به پیام شما +empty-title-message=تنظیمات لازم برای این بخش انجام نشده است. لطفا با مدیر تماس حاصل نمایید. +inform-by-email-help=در صورت انتخاب این گزینه، در صورتی که برای نظرهای شما پاسخی درج شد، از طریق ایمیل به شما اطلاع‌رسانی می‌شود. \ No newline at end of file diff --git a/docroot/WEB-INF/classes/META-INF/base-spring.xml b/docroot/WEB-INF/classes/META-INF/base-spring.xml new file mode 100644 index 0000000..8e5edba --- /dev/null +++ b/docroot/WEB-INF/classes/META-INF/base-spring.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docroot/WEB-INF/classes/META-INF/cluster-spring.xml b/docroot/WEB-INF/classes/META-INF/cluster-spring.xml new file mode 100644 index 0000000..cd5219b --- /dev/null +++ b/docroot/WEB-INF/classes/META-INF/cluster-spring.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/docroot/WEB-INF/classes/META-INF/hibernate-spring.xml b/docroot/WEB-INF/classes/META-INF/hibernate-spring.xml new file mode 100644 index 0000000..27564a2 --- /dev/null +++ b/docroot/WEB-INF/classes/META-INF/hibernate-spring.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docroot/WEB-INF/classes/META-INF/infrastructure-spring.xml b/docroot/WEB-INF/classes/META-INF/infrastructure-spring.xml new file mode 100644 index 0000000..380d697 --- /dev/null +++ b/docroot/WEB-INF/classes/META-INF/infrastructure-spring.xml @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/docroot/WEB-INF/classes/META-INF/portlet-hbm.xml b/docroot/WEB-INF/classes/META-INF/portlet-hbm.xml new file mode 100644 index 0000000..0936b9a --- /dev/null +++ b/docroot/WEB-INF/classes/META-INF/portlet-hbm.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docroot/WEB-INF/classes/META-INF/portlet-model-hints.xml b/docroot/WEB-INF/classes/META-INF/portlet-model-hints.xml new file mode 100644 index 0000000..843e258 --- /dev/null +++ b/docroot/WEB-INF/classes/META-INF/portlet-model-hints.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + 10000 + + + + + + + + + + + + + + + + + + + + + + + 1000 + + + 10000 + + + 10000 + + + \ No newline at end of file diff --git a/docroot/WEB-INF/classes/META-INF/portlet-orm.xml b/docroot/WEB-INF/classes/META-INF/portlet-orm.xml new file mode 100644 index 0000000..e2b870b --- /dev/null +++ b/docroot/WEB-INF/classes/META-INF/portlet-orm.xml @@ -0,0 +1,74 @@ + + + + + + + PROPERTY + + + + + + + + + TIMESTAMP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TIMESTAMP + + + + + + + + + + + + + + + +
+ + + +
+ + + \ No newline at end of file diff --git a/docroot/WEB-INF/classes/META-INF/portlet-spring.xml b/docroot/WEB-INF/classes/META-INF/portlet-spring.xml new file mode 100644 index 0000000..a5be5d6 --- /dev/null +++ b/docroot/WEB-INF/classes/META-INF/portlet-spring.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/docroot/WEB-INF/classes/META-INF/shard-data-source-spring.xml b/docroot/WEB-INF/classes/META-INF/shard-data-source-spring.xml new file mode 100644 index 0000000..fe293f4 --- /dev/null +++ b/docroot/WEB-INF/classes/META-INF/shard-data-source-spring.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docroot/WEB-INF/classes/i18n.properties b/docroot/WEB-INF/classes/i18n.properties new file mode 100644 index 0000000..af9e8ed --- /dev/null +++ b/docroot/WEB-INF/classes/i18n.properties @@ -0,0 +1 @@ +guest-discussion-hello-world=Hello Guest Discussion \ No newline at end of file diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/Comment.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/Comment.class new file mode 100644 index 0000000..fcc7695 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/Comment.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/CommentBoxB.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/CommentBoxB.class new file mode 100644 index 0000000..f24ec7e Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/CommentBoxB.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/ConditionalPrettyTimeConveter.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/ConditionalPrettyTimeConveter.class new file mode 100644 index 0000000..01cd5cb Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/ConditionalPrettyTimeConveter.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/ConfigB.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/ConfigB.class new file mode 100644 index 0000000..52cb21b Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/ConfigB.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/Pair.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/Pair.class new file mode 100644 index 0000000..ee8b5ce Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/bean/Pair.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentBaseImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentBaseImpl.class new file mode 100644 index 0000000..1bd2fcd Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentBaseImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentCacheModel.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentCacheModel.class new file mode 100644 index 0000000..22caa94 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentCacheModel.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentImpl.class new file mode 100644 index 0000000..0ed33ef Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentModelImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentModelImpl.class new file mode 100644 index 0000000..25d7d7d Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentModelImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleBaseImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleBaseImpl.class new file mode 100644 index 0000000..f86aeec Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleBaseImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleCacheModel.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleCacheModel.class new file mode 100644 index 0000000..7d43081 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleCacheModel.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleImpl.class new file mode 100644 index 0000000..5318c53 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleModelImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleModelImpl.class new file mode 100644 index 0000000..48a656c Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleModelImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleBaseImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleBaseImpl.class new file mode 100644 index 0000000..161fae8 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleBaseImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleCacheModel.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleCacheModel.class new file mode 100644 index 0000000..2b8b6fc Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleCacheModel.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleImpl.class new file mode 100644 index 0000000..db5eb6d Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleModelImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleModelImpl.class new file mode 100644 index 0000000..72dcc87 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleModelImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentLocalServiceBaseImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentLocalServiceBaseImpl.class new file mode 100644 index 0000000..b8b0ff8 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentLocalServiceBaseImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentLocalServiceClpInvoker.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentLocalServiceClpInvoker.class new file mode 100644 index 0000000..181cbe5 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentLocalServiceClpInvoker.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentServiceBaseImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentServiceBaseImpl.class new file mode 100644 index 0000000..e56eeb5 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentServiceBaseImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentServiceClpInvoker.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentServiceClpInvoker.class new file mode 100644 index 0000000..f31bf0e Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentServiceClpInvoker.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleLocalServiceBaseImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleLocalServiceBaseImpl.class new file mode 100644 index 0000000..0cd539b Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleLocalServiceBaseImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleLocalServiceClpInvoker.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleLocalServiceClpInvoker.class new file mode 100644 index 0000000..0ff7dbe Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleLocalServiceClpInvoker.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceBaseImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceBaseImpl.class new file mode 100644 index 0000000..b1e0e8c Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceBaseImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceClpInvoker.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceClpInvoker.class new file mode 100644 index 0000000..6382dd1 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceClpInvoker.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceBaseImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceBaseImpl.class new file mode 100644 index 0000000..e177272 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceBaseImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceClpInvoker.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceClpInvoker.class new file mode 100644 index 0000000..f3fa9ec Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceClpInvoker.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceBaseImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceBaseImpl.class new file mode 100644 index 0000000..03ef7fc Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceBaseImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceClpInvoker.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceClpInvoker.class new file mode 100644 index 0000000..4660a5e Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceClpInvoker.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/http/CommentServiceSoap.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/http/CommentServiceSoap.class new file mode 100644 index 0000000..35c8992 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/http/CommentServiceSoap.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/http/PortletTitleServiceSoap.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/http/PortletTitleServiceSoap.class new file mode 100644 index 0000000..8e251b3 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/http/PortletTitleServiceSoap.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/http/TitleServiceSoap.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/http/TitleServiceSoap.class new file mode 100644 index 0000000..4de8706 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/http/TitleServiceSoap.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentLocalServiceImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentLocalServiceImpl.class new file mode 100644 index 0000000..915f60a Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentLocalServiceImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentServiceImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentServiceImpl.class new file mode 100644 index 0000000..fbf127c Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentServiceImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleLocalServiceImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleLocalServiceImpl.class new file mode 100644 index 0000000..9327336 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleLocalServiceImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleServiceImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleServiceImpl.class new file mode 100644 index 0000000..a59d6fb Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleServiceImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleLocalServiceImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleLocalServiceImpl.class new file mode 100644 index 0000000..1d5a31f Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleLocalServiceImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleServiceImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleServiceImpl.class new file mode 100644 index 0000000..95b8d3f Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleServiceImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl$1.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl$1.class new file mode 100644 index 0000000..ac6c98f Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl$1.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl$2.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl$2.class new file mode 100644 index 0000000..a04bffa Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl$2.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl.class new file mode 100644 index 0000000..0ea8b64 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistenceImpl$1.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistenceImpl$1.class new file mode 100644 index 0000000..c7ab5fa Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistenceImpl$1.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistenceImpl$2.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistenceImpl$2.class new file mode 100644 index 0000000..e17e51f Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistenceImpl$2.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistenceImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistenceImpl.class new file mode 100644 index 0000000..c28f69f Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistenceImpl.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistenceImpl$1.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistenceImpl$1.class new file mode 100644 index 0000000..d77072d Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistenceImpl$1.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistenceImpl$2.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistenceImpl$2.class new file mode 100644 index 0000000..c86ff43 Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistenceImpl$2.class differ diff --git a/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistenceImpl.class b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistenceImpl.class new file mode 100644 index 0000000..3504aed Binary files /dev/null and b/docroot/WEB-INF/classes/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistenceImpl.class differ diff --git a/docroot/WEB-INF/classes/log4j.properties b/docroot/WEB-INF/classes/log4j.properties new file mode 100644 index 0000000..bdb36e3 --- /dev/null +++ b/docroot/WEB-INF/classes/log4j.properties @@ -0,0 +1,8 @@ +log4j.rootLogger=INFO, CONSOLE + +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.layout=org.apache.log4j.EnhancedPatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}:%L] %m%n + +log4j.logger.com.liferay.faces.util.lifecycle.DebugPhaseListener=DEBUG +log4j.logger.com.liferay.sample=DEBUG \ No newline at end of file diff --git a/docroot/WEB-INF/classes/service.properties b/docroot/WEB-INF/classes/service.properties new file mode 100644 index 0000000..15984ae --- /dev/null +++ b/docroot/WEB-INF/classes/service.properties @@ -0,0 +1,41 @@ +## +## Properties Override +## + + # + # Specify where to get the overridden properties. Updates should not be made + # on this file but on the overridden version of this file. + # + include-and-override=${base.path}/service-ext.properties + +## +## Build +## + + build.namespace=GDP + build.number=28 + build.date=1503846512779 + build.auto.upgrade=true + +## +## Spring +## + + # + # Input a list of comma delimited Spring configurations. These will be + # loaded after the bean definitions specified in the + # portalContextConfigLocation parameter in web.xml. + # + spring.configs=\ + WEB-INF/classes/META-INF/base-spring.xml,\ + \ + WEB-INF/classes/META-INF/hibernate-spring.xml,\ + WEB-INF/classes/META-INF/infrastructure-spring.xml,\ + \ + WEB-INF/classes/META-INF/cluster-spring.xml,\ + \ + WEB-INF/classes/META-INF/portlet-spring.xml,\ + \ + WEB-INF/classes/META-INF/shard-data-source-spring.xml,\ + \ + WEB-INF/classes/META-INF/ext-spring.xml \ No newline at end of file diff --git a/docroot/WEB-INF/classes/simulation/DatabaseSimulator.class b/docroot/WEB-INF/classes/simulation/DatabaseSimulator.class new file mode 100644 index 0000000..b08087c Binary files /dev/null and b/docroot/WEB-INF/classes/simulation/DatabaseSimulator.class differ diff --git a/docroot/WEB-INF/classes/simulation/SerializationUtils.class b/docroot/WEB-INF/classes/simulation/SerializationUtils.class new file mode 100644 index 0000000..b91914a Binary files /dev/null and b/docroot/WEB-INF/classes/simulation/SerializationUtils.class differ diff --git a/docroot/WEB-INF/faces-config.xml b/docroot/WEB-INF/faces-config.xml new file mode 100644 index 0000000..d629bec --- /dev/null +++ b/docroot/WEB-INF/faces-config.xml @@ -0,0 +1,12 @@ + + + + + com.liferay.faces.util.lifecycle.DebugPhaseListener + + \ No newline at end of file diff --git a/docroot/WEB-INF/lib/GuestDiscussion-portlet-service.jar b/docroot/WEB-INF/lib/GuestDiscussion-portlet-service.jar new file mode 100644 index 0000000..23f1bfb Binary files /dev/null and b/docroot/WEB-INF/lib/GuestDiscussion-portlet-service.jar differ diff --git a/docroot/WEB-INF/lib/all-themes-1.0.10.jar b/docroot/WEB-INF/lib/all-themes-1.0.10.jar new file mode 100644 index 0000000..3fbe825 Binary files /dev/null and b/docroot/WEB-INF/lib/all-themes-1.0.10.jar differ diff --git a/docroot/WEB-INF/lib/javax.json.jar b/docroot/WEB-INF/lib/javax.json.jar new file mode 100644 index 0000000..b0ef09b Binary files /dev/null and b/docroot/WEB-INF/lib/javax.json.jar differ diff --git a/docroot/WEB-INF/lib/prettytime-2.1.3.Final.jar b/docroot/WEB-INF/lib/prettytime-2.1.3.Final.jar new file mode 100644 index 0000000..72f26ad Binary files /dev/null and b/docroot/WEB-INF/lib/prettytime-2.1.3.Final.jar differ diff --git a/docroot/WEB-INF/lib/prettytime-integration-jsf-2.1.2.Final.jar b/docroot/WEB-INF/lib/prettytime-integration-jsf-2.1.2.Final.jar new file mode 100644 index 0000000..a7898af Binary files /dev/null and b/docroot/WEB-INF/lib/prettytime-integration-jsf-2.1.2.Final.jar differ diff --git a/docroot/WEB-INF/lib/primefaces-3.5.jar b/docroot/WEB-INF/lib/primefaces-3.5.jar new file mode 100644 index 0000000..36aaf88 Binary files /dev/null and b/docroot/WEB-INF/lib/primefaces-3.5.jar differ diff --git a/docroot/WEB-INF/liferay-display.xml b/docroot/WEB-INF/liferay-display.xml new file mode 100644 index 0000000..1679254 --- /dev/null +++ b/docroot/WEB-INF/liferay-display.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/docroot/WEB-INF/liferay-hook.xml b/docroot/WEB-INF/liferay-hook.xml new file mode 100644 index 0000000..f71c3b9 --- /dev/null +++ b/docroot/WEB-INF/liferay-hook.xml @@ -0,0 +1,7 @@ + + + + + Language_en_US.properties + Language_fa.properties + \ No newline at end of file diff --git a/docroot/WEB-INF/liferay-plugin-package.properties b/docroot/WEB-INF/liferay-plugin-package.properties new file mode 100644 index 0000000..744d488 --- /dev/null +++ b/docroot/WEB-INF/liferay-plugin-package.properties @@ -0,0 +1,16 @@ +name=Guest Discussion +module-group-id=liferay +module-incremental-version=1 +tags= +short-description= +long-description= +change-log= +page-url=http://www.liferay.com +author=Liferay, Inc. +licenses=LGPL +liferay-versions=6.2.0+ + +portal-dependency-jars=commons-beanutils.jar,commons-collections.jar,commons-digester.jar,commons-fileupload.jar,commons-io.jar,commons-lang.jar + +speed-filters-enabled=false + \ No newline at end of file diff --git a/docroot/WEB-INF/liferay-portlet.xml b/docroot/WEB-INF/liferay-portlet.xml new file mode 100644 index 0000000..0fd2f78 --- /dev/null +++ b/docroot/WEB-INF/liferay-portlet.xml @@ -0,0 +1,31 @@ + + + + + + + guest-discussion + /icon.png + true + false + /css/main.css + /js/main.js + guest-discussion-portlet + + + administrator + Administrator + + + guest + Guest + + + power-user + Power User + + + user + User + + \ No newline at end of file diff --git a/docroot/WEB-INF/portlet.xml b/docroot/WEB-INF/portlet.xml new file mode 100644 index 0000000..e5b0fdc --- /dev/null +++ b/docroot/WEB-INF/portlet.xml @@ -0,0 +1,45 @@ + + + + + + guest-discussion + Guest Discussion + javax.portlet.faces.GenericFacesPortlet + + javax.portlet.faces.defaultViewId.view + /views/commentBox.xhtml + + + javax.portlet.faces.defaultViewId.edit + /views/config.xhtml + + 0 + + text/html + view + edit + + Language + + Guest Discussion + Guest Discussion + + + + administrator + + + guest + + + power-user + + + user + + + \ No newline at end of file diff --git a/docroot/WEB-INF/service.xml b/docroot/WEB-INF/service.xml new file mode 100644 index 0000000..7acb6ce --- /dev/null +++ b/docroot/WEB-INF/service.xml @@ -0,0 +1,80 @@ + + + + Alireza + GDP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/NoSuchCommentException.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/NoSuchCommentException.java new file mode 100644 index 0000000..bfbb4af --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/NoSuchCommentException.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion; + +import com.liferay.portal.NoSuchModelException; + +/** + * @author Alireza + */ +public class NoSuchCommentException extends NoSuchModelException { + + public NoSuchCommentException() { + super(); + } + + public NoSuchCommentException(String msg) { + super(msg); + } + + public NoSuchCommentException(String msg, Throwable cause) { + super(msg, cause); + } + + public NoSuchCommentException(Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/NoSuchPortletTitleException.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/NoSuchPortletTitleException.java new file mode 100644 index 0000000..f845f88 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/NoSuchPortletTitleException.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion; + +import com.liferay.portal.NoSuchModelException; + +/** + * @author Alireza + */ +public class NoSuchPortletTitleException extends NoSuchModelException { + + public NoSuchPortletTitleException() { + super(); + } + + public NoSuchPortletTitleException(String msg) { + super(msg); + } + + public NoSuchPortletTitleException(String msg, Throwable cause) { + super(msg, cause); + } + + public NoSuchPortletTitleException(Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/NoSuchTitleException.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/NoSuchTitleException.java new file mode 100644 index 0000000..38a93fc --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/NoSuchTitleException.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion; + +import com.liferay.portal.NoSuchModelException; + +/** + * @author Alireza + */ +public class NoSuchTitleException extends NoSuchModelException { + + public NoSuchTitleException() { + super(); + } + + public NoSuchTitleException(String msg) { + super(msg); + } + + public NoSuchTitleException(String msg, Throwable cause) { + super(msg, cause); + } + + public NoSuchTitleException(Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/Comment.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/Comment.java new file mode 100644 index 0000000..cbc3e39 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/Comment.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import com.liferay.portal.model.PersistedModel; + +/** + * The extended model interface for the Comment service. Represents a row in the "GDP_Comment" database table, with each column mapped to a property of this class. + * + * @author Alireza + * @see CommentModel + * @see ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentImpl + * @see ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl + * @generated + */ +public interface Comment extends CommentModel, PersistedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this interface directly. Add methods to {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/CommentClp.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/CommentClp.java new file mode 100644 index 0000000..96d18f3 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/CommentClp.java @@ -0,0 +1,823 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.model.BaseModel; +import com.liferay.portal.model.impl.BaseModelImpl; + +import ir.ac.iut.sccportal.guestdiscussion.service.ClpSerializer; +import ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalServiceUtil; + +import java.io.Serializable; + +import java.lang.reflect.Method; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * @author Alireza + */ +public class CommentClp extends BaseModelImpl implements Comment { + public CommentClp() { + } + + @Override + public Class getModelClass() { + return Comment.class; + } + + @Override + public String getModelClassName() { + return Comment.class.getName(); + } + + @Override + public long getPrimaryKey() { + return _commentId; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setCommentId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _commentId; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("commentId", getCommentId()); + attributes.put("groupId", getGroupId()); + attributes.put("companyId", getCompanyId()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("parentId", getParentId()); + attributes.put("parentName", getParentName()); + attributes.put("commentText", getCommentText()); + attributes.put("guestName", getGuestName()); + attributes.put("guestEmailAddress", getGuestEmailAddress()); + attributes.put("guestEmailNotification", getGuestEmailNotification()); + attributes.put("likeCount", getLikeCount()); + attributes.put("dislikeCount", getDislikeCount()); + attributes.put("titleId", getTitleId()); + attributes.put("verified", getVerified()); + attributes.put("hasAnswer", getHasAnswer()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + Long commentId = (Long)attributes.get("commentId"); + + if (commentId != null) { + setCommentId(commentId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Date modifiedDate = (Date)attributes.get("modifiedDate"); + + if (modifiedDate != null) { + setModifiedDate(modifiedDate); + } + + Long parentId = (Long)attributes.get("parentId"); + + if (parentId != null) { + setParentId(parentId); + } + + String parentName = (String)attributes.get("parentName"); + + if (parentName != null) { + setParentName(parentName); + } + + String commentText = (String)attributes.get("commentText"); + + if (commentText != null) { + setCommentText(commentText); + } + + String guestName = (String)attributes.get("guestName"); + + if (guestName != null) { + setGuestName(guestName); + } + + String guestEmailAddress = (String)attributes.get("guestEmailAddress"); + + if (guestEmailAddress != null) { + setGuestEmailAddress(guestEmailAddress); + } + + Boolean guestEmailNotification = (Boolean)attributes.get( + "guestEmailNotification"); + + if (guestEmailNotification != null) { + setGuestEmailNotification(guestEmailNotification); + } + + Long likeCount = (Long)attributes.get("likeCount"); + + if (likeCount != null) { + setLikeCount(likeCount); + } + + Long dislikeCount = (Long)attributes.get("dislikeCount"); + + if (dislikeCount != null) { + setDislikeCount(dislikeCount); + } + + Long titleId = (Long)attributes.get("titleId"); + + if (titleId != null) { + setTitleId(titleId); + } + + Boolean verified = (Boolean)attributes.get("verified"); + + if (verified != null) { + setVerified(verified); + } + + Boolean hasAnswer = (Boolean)attributes.get("hasAnswer"); + + if (hasAnswer != null) { + setHasAnswer(hasAnswer); + } + } + + @Override + public long getCommentId() { + return _commentId; + } + + @Override + public void setCommentId(long commentId) { + _commentId = commentId; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setCommentId", long.class); + + method.invoke(_commentRemoteModel, commentId); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getGroupId() { + return _groupId; + } + + @Override + public void setGroupId(long groupId) { + _groupId = groupId; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setGroupId", long.class); + + method.invoke(_commentRemoteModel, groupId); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getCompanyId() { + return _companyId; + } + + @Override + public void setCompanyId(long companyId) { + _companyId = companyId; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setCompanyId", long.class); + + method.invoke(_commentRemoteModel, companyId); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public Date getModifiedDate() { + return _modifiedDate; + } + + @Override + public void setModifiedDate(Date modifiedDate) { + _modifiedDate = modifiedDate; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setModifiedDate", Date.class); + + method.invoke(_commentRemoteModel, modifiedDate); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getParentId() { + return _parentId; + } + + @Override + public void setParentId(long parentId) { + _parentId = parentId; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setParentId", long.class); + + method.invoke(_commentRemoteModel, parentId); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public String getParentName() { + return _parentName; + } + + @Override + public void setParentName(String parentName) { + _parentName = parentName; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setParentName", String.class); + + method.invoke(_commentRemoteModel, parentName); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public String getCommentText() { + return _commentText; + } + + @Override + public void setCommentText(String commentText) { + _commentText = commentText; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setCommentText", String.class); + + method.invoke(_commentRemoteModel, commentText); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public String getGuestName() { + return _guestName; + } + + @Override + public void setGuestName(String guestName) { + _guestName = guestName; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setGuestName", String.class); + + method.invoke(_commentRemoteModel, guestName); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public String getGuestEmailAddress() { + return _guestEmailAddress; + } + + @Override + public void setGuestEmailAddress(String guestEmailAddress) { + _guestEmailAddress = guestEmailAddress; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setGuestEmailAddress", + String.class); + + method.invoke(_commentRemoteModel, guestEmailAddress); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public boolean getGuestEmailNotification() { + return _guestEmailNotification; + } + + @Override + public boolean isGuestEmailNotification() { + return _guestEmailNotification; + } + + @Override + public void setGuestEmailNotification(boolean guestEmailNotification) { + _guestEmailNotification = guestEmailNotification; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setGuestEmailNotification", + boolean.class); + + method.invoke(_commentRemoteModel, guestEmailNotification); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getLikeCount() { + return _likeCount; + } + + @Override + public void setLikeCount(long likeCount) { + _likeCount = likeCount; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setLikeCount", long.class); + + method.invoke(_commentRemoteModel, likeCount); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getDislikeCount() { + return _dislikeCount; + } + + @Override + public void setDislikeCount(long dislikeCount) { + _dislikeCount = dislikeCount; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setDislikeCount", long.class); + + method.invoke(_commentRemoteModel, dislikeCount); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getTitleId() { + return _titleId; + } + + @Override + public void setTitleId(long titleId) { + _titleId = titleId; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setTitleId", long.class); + + method.invoke(_commentRemoteModel, titleId); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public boolean getVerified() { + return _verified; + } + + @Override + public boolean isVerified() { + return _verified; + } + + @Override + public void setVerified(boolean verified) { + _verified = verified; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setVerified", boolean.class); + + method.invoke(_commentRemoteModel, verified); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public boolean getHasAnswer() { + return _hasAnswer; + } + + @Override + public boolean isHasAnswer() { + return _hasAnswer; + } + + @Override + public void setHasAnswer(boolean hasAnswer) { + _hasAnswer = hasAnswer; + + if (_commentRemoteModel != null) { + try { + Class clazz = _commentRemoteModel.getClass(); + + Method method = clazz.getMethod("setHasAnswer", boolean.class); + + method.invoke(_commentRemoteModel, hasAnswer); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + public BaseModel getCommentRemoteModel() { + return _commentRemoteModel; + } + + public void setCommentRemoteModel(BaseModel commentRemoteModel) { + _commentRemoteModel = commentRemoteModel; + } + + public Object invokeOnRemoteModel(String methodName, + Class[] parameterTypes, Object[] parameterValues) + throws Exception { + Object[] remoteParameterValues = new Object[parameterValues.length]; + + for (int i = 0; i < parameterValues.length; i++) { + if (parameterValues[i] != null) { + remoteParameterValues[i] = ClpSerializer.translateInput(parameterValues[i]); + } + } + + Class remoteModelClass = _commentRemoteModel.getClass(); + + ClassLoader remoteModelClassLoader = remoteModelClass.getClassLoader(); + + Class[] remoteParameterTypes = new Class[parameterTypes.length]; + + for (int i = 0; i < parameterTypes.length; i++) { + if (parameterTypes[i].isPrimitive()) { + remoteParameterTypes[i] = parameterTypes[i]; + } + else { + String parameterTypeName = parameterTypes[i].getName(); + + remoteParameterTypes[i] = remoteModelClassLoader.loadClass(parameterTypeName); + } + } + + Method method = remoteModelClass.getMethod(methodName, + remoteParameterTypes); + + Object returnValue = method.invoke(_commentRemoteModel, + remoteParameterValues); + + if (returnValue != null) { + returnValue = ClpSerializer.translateOutput(returnValue); + } + + return returnValue; + } + + @Override + public void persist() throws SystemException { + if (this.isNew()) { + CommentLocalServiceUtil.addComment(this); + } + else { + CommentLocalServiceUtil.updateComment(this); + } + } + + @Override + public Comment toEscapedModel() { + return (Comment)ProxyUtil.newProxyInstance(Comment.class.getClassLoader(), + new Class[] { Comment.class }, new AutoEscapeBeanHandler(this)); + } + + @Override + public Object clone() { + CommentClp clone = new CommentClp(); + + clone.setCommentId(getCommentId()); + clone.setGroupId(getGroupId()); + clone.setCompanyId(getCompanyId()); + clone.setModifiedDate(getModifiedDate()); + clone.setParentId(getParentId()); + clone.setParentName(getParentName()); + clone.setCommentText(getCommentText()); + clone.setGuestName(getGuestName()); + clone.setGuestEmailAddress(getGuestEmailAddress()); + clone.setGuestEmailNotification(getGuestEmailNotification()); + clone.setLikeCount(getLikeCount()); + clone.setDislikeCount(getDislikeCount()); + clone.setTitleId(getTitleId()); + clone.setVerified(getVerified()); + clone.setHasAnswer(getHasAnswer()); + + return clone; + } + + @Override + public int compareTo(Comment comment) { + int value = 0; + + if (getCommentId() < comment.getCommentId()) { + value = -1; + } + else if (getCommentId() > comment.getCommentId()) { + value = 1; + } + else { + value = 0; + } + + value = value * -1; + + if (value != 0) { + return value; + } + + return 0; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof CommentClp)) { + return false; + } + + CommentClp comment = (CommentClp)obj; + + long primaryKey = comment.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + public Class getClpSerializerClass() { + return _clpSerializerClass; + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(31); + + sb.append("{commentId="); + sb.append(getCommentId()); + sb.append(", groupId="); + sb.append(getGroupId()); + sb.append(", companyId="); + sb.append(getCompanyId()); + sb.append(", modifiedDate="); + sb.append(getModifiedDate()); + sb.append(", parentId="); + sb.append(getParentId()); + sb.append(", parentName="); + sb.append(getParentName()); + sb.append(", commentText="); + sb.append(getCommentText()); + sb.append(", guestName="); + sb.append(getGuestName()); + sb.append(", guestEmailAddress="); + sb.append(getGuestEmailAddress()); + sb.append(", guestEmailNotification="); + sb.append(getGuestEmailNotification()); + sb.append(", likeCount="); + sb.append(getLikeCount()); + sb.append(", dislikeCount="); + sb.append(getDislikeCount()); + sb.append(", titleId="); + sb.append(getTitleId()); + sb.append(", verified="); + sb.append(getVerified()); + sb.append(", hasAnswer="); + sb.append(getHasAnswer()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(49); + + sb.append(""); + sb.append("ir.ac.iut.sccportal.guestdiscussion.model.Comment"); + sb.append(""); + + sb.append( + "commentId"); + sb.append( + "groupId"); + sb.append( + "companyId"); + sb.append( + "modifiedDate"); + sb.append( + "parentId"); + sb.append( + "parentName"); + sb.append( + "commentText"); + sb.append( + "guestName"); + sb.append( + "guestEmailAddress"); + sb.append( + "guestEmailNotification"); + sb.append( + "likeCount"); + sb.append( + "dislikeCount"); + sb.append( + "titleId"); + sb.append( + "verified"); + sb.append( + "hasAnswer"); + + sb.append(""); + + return sb.toString(); + } + + private long _commentId; + private long _groupId; + private long _companyId; + private Date _modifiedDate; + private long _parentId; + private String _parentName; + private String _commentText; + private String _guestName; + private String _guestEmailAddress; + private boolean _guestEmailNotification; + private long _likeCount; + private long _dislikeCount; + private long _titleId; + private boolean _verified; + private boolean _hasAnswer; + private BaseModel _commentRemoteModel; + private Class _clpSerializerClass = ir.ac.iut.sccportal.guestdiscussion.service.ClpSerializer.class; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/CommentModel.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/CommentModel.java new file mode 100644 index 0000000..185dcbb --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/CommentModel.java @@ -0,0 +1,354 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import com.liferay.portal.kernel.bean.AutoEscape; +import com.liferay.portal.model.BaseModel; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.service.ServiceContext; + +import com.liferay.portlet.expando.model.ExpandoBridge; + +import java.io.Serializable; + +import java.util.Date; + +/** + * The base model interface for the Comment service. Represents a row in the "GDP_Comment" database table, with each column mapped to a property of this class. + * + *

+ * This interface and its corresponding implementation {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentImpl}. + *

+ * + * @author Alireza + * @see Comment + * @see ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentImpl + * @see ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl + * @generated + */ +public interface CommentModel extends BaseModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. All methods that expect a comment model instance should use the {@link Comment} interface instead. + */ + + /** + * Returns the primary key of this comment. + * + * @return the primary key of this comment + */ + public long getPrimaryKey(); + + /** + * Sets the primary key of this comment. + * + * @param primaryKey the primary key of this comment + */ + public void setPrimaryKey(long primaryKey); + + /** + * Returns the comment ID of this comment. + * + * @return the comment ID of this comment + */ + public long getCommentId(); + + /** + * Sets the comment ID of this comment. + * + * @param commentId the comment ID of this comment + */ + public void setCommentId(long commentId); + + /** + * Returns the group ID of this comment. + * + * @return the group ID of this comment + */ + public long getGroupId(); + + /** + * Sets the group ID of this comment. + * + * @param groupId the group ID of this comment + */ + public void setGroupId(long groupId); + + /** + * Returns the company ID of this comment. + * + * @return the company ID of this comment + */ + public long getCompanyId(); + + /** + * Sets the company ID of this comment. + * + * @param companyId the company ID of this comment + */ + public void setCompanyId(long companyId); + + /** + * Returns the modified date of this comment. + * + * @return the modified date of this comment + */ + public Date getModifiedDate(); + + /** + * Sets the modified date of this comment. + * + * @param modifiedDate the modified date of this comment + */ + public void setModifiedDate(Date modifiedDate); + + /** + * Returns the parent ID of this comment. + * + * @return the parent ID of this comment + */ + public long getParentId(); + + /** + * Sets the parent ID of this comment. + * + * @param parentId the parent ID of this comment + */ + public void setParentId(long parentId); + + /** + * Returns the parent name of this comment. + * + * @return the parent name of this comment + */ + @AutoEscape + public String getParentName(); + + /** + * Sets the parent name of this comment. + * + * @param parentName the parent name of this comment + */ + public void setParentName(String parentName); + + /** + * Returns the comment text of this comment. + * + * @return the comment text of this comment + */ + @AutoEscape + public String getCommentText(); + + /** + * Sets the comment text of this comment. + * + * @param commentText the comment text of this comment + */ + public void setCommentText(String commentText); + + /** + * Returns the guest name of this comment. + * + * @return the guest name of this comment + */ + @AutoEscape + public String getGuestName(); + + /** + * Sets the guest name of this comment. + * + * @param guestName the guest name of this comment + */ + public void setGuestName(String guestName); + + /** + * Returns the guest email address of this comment. + * + * @return the guest email address of this comment + */ + @AutoEscape + public String getGuestEmailAddress(); + + /** + * Sets the guest email address of this comment. + * + * @param guestEmailAddress the guest email address of this comment + */ + public void setGuestEmailAddress(String guestEmailAddress); + + /** + * Returns the guest email notification of this comment. + * + * @return the guest email notification of this comment + */ + public boolean getGuestEmailNotification(); + + /** + * Returns true if this comment is guest email notification. + * + * @return true if this comment is guest email notification; false otherwise + */ + public boolean isGuestEmailNotification(); + + /** + * Sets whether this comment is guest email notification. + * + * @param guestEmailNotification the guest email notification of this comment + */ + public void setGuestEmailNotification(boolean guestEmailNotification); + + /** + * Returns the like count of this comment. + * + * @return the like count of this comment + */ + public long getLikeCount(); + + /** + * Sets the like count of this comment. + * + * @param likeCount the like count of this comment + */ + public void setLikeCount(long likeCount); + + /** + * Returns the dislike count of this comment. + * + * @return the dislike count of this comment + */ + public long getDislikeCount(); + + /** + * Sets the dislike count of this comment. + * + * @param dislikeCount the dislike count of this comment + */ + public void setDislikeCount(long dislikeCount); + + /** + * Returns the title ID of this comment. + * + * @return the title ID of this comment + */ + public long getTitleId(); + + /** + * Sets the title ID of this comment. + * + * @param titleId the title ID of this comment + */ + public void setTitleId(long titleId); + + /** + * Returns the verified of this comment. + * + * @return the verified of this comment + */ + public boolean getVerified(); + + /** + * Returns true if this comment is verified. + * + * @return true if this comment is verified; false otherwise + */ + public boolean isVerified(); + + /** + * Sets whether this comment is verified. + * + * @param verified the verified of this comment + */ + public void setVerified(boolean verified); + + /** + * Returns the has answer of this comment. + * + * @return the has answer of this comment + */ + public boolean getHasAnswer(); + + /** + * Returns true if this comment is has answer. + * + * @return true if this comment is has answer; false otherwise + */ + public boolean isHasAnswer(); + + /** + * Sets whether this comment is has answer. + * + * @param hasAnswer the has answer of this comment + */ + public void setHasAnswer(boolean hasAnswer); + + @Override + public boolean isNew(); + + @Override + public void setNew(boolean n); + + @Override + public boolean isCachedModel(); + + @Override + public void setCachedModel(boolean cachedModel); + + @Override + public boolean isEscapedModel(); + + @Override + public Serializable getPrimaryKeyObj(); + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj); + + @Override + public ExpandoBridge getExpandoBridge(); + + @Override + public void setExpandoBridgeAttributes(BaseModel baseModel); + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge); + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext); + + @Override + public Object clone(); + + @Override + public int compareTo( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment); + + @Override + public int hashCode(); + + @Override + public CacheModel toCacheModel(); + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment toEscapedModel(); + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment toUnescapedModel(); + + @Override + public String toString(); + + @Override + public String toXmlString(); +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/CommentSoap.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/CommentSoap.java new file mode 100644 index 0000000..02b41fd --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/CommentSoap.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * This class is used by SOAP remote services, specifically {@link ir.ac.iut.sccportal.guestdiscussion.service.http.CommentServiceSoap}. + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.http.CommentServiceSoap + * @generated + */ +public class CommentSoap implements Serializable { + public static CommentSoap toSoapModel(Comment model) { + CommentSoap soapModel = new CommentSoap(); + + soapModel.setCommentId(model.getCommentId()); + soapModel.setGroupId(model.getGroupId()); + soapModel.setCompanyId(model.getCompanyId()); + soapModel.setModifiedDate(model.getModifiedDate()); + soapModel.setParentId(model.getParentId()); + soapModel.setParentName(model.getParentName()); + soapModel.setCommentText(model.getCommentText()); + soapModel.setGuestName(model.getGuestName()); + soapModel.setGuestEmailAddress(model.getGuestEmailAddress()); + soapModel.setGuestEmailNotification(model.getGuestEmailNotification()); + soapModel.setLikeCount(model.getLikeCount()); + soapModel.setDislikeCount(model.getDislikeCount()); + soapModel.setTitleId(model.getTitleId()); + soapModel.setVerified(model.getVerified()); + soapModel.setHasAnswer(model.getHasAnswer()); + + return soapModel; + } + + public static CommentSoap[] toSoapModels(Comment[] models) { + CommentSoap[] soapModels = new CommentSoap[models.length]; + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModel(models[i]); + } + + return soapModels; + } + + public static CommentSoap[][] toSoapModels(Comment[][] models) { + CommentSoap[][] soapModels = null; + + if (models.length > 0) { + soapModels = new CommentSoap[models.length][models[0].length]; + } + else { + soapModels = new CommentSoap[0][0]; + } + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModels(models[i]); + } + + return soapModels; + } + + public static CommentSoap[] toSoapModels(List models) { + List soapModels = new ArrayList(models.size()); + + for (Comment model : models) { + soapModels.add(toSoapModel(model)); + } + + return soapModels.toArray(new CommentSoap[soapModels.size()]); + } + + public CommentSoap() { + } + + public long getPrimaryKey() { + return _commentId; + } + + public void setPrimaryKey(long pk) { + setCommentId(pk); + } + + public long getCommentId() { + return _commentId; + } + + public void setCommentId(long commentId) { + _commentId = commentId; + } + + public long getGroupId() { + return _groupId; + } + + public void setGroupId(long groupId) { + _groupId = groupId; + } + + public long getCompanyId() { + return _companyId; + } + + public void setCompanyId(long companyId) { + _companyId = companyId; + } + + public Date getModifiedDate() { + return _modifiedDate; + } + + public void setModifiedDate(Date modifiedDate) { + _modifiedDate = modifiedDate; + } + + public long getParentId() { + return _parentId; + } + + public void setParentId(long parentId) { + _parentId = parentId; + } + + public String getParentName() { + return _parentName; + } + + public void setParentName(String parentName) { + _parentName = parentName; + } + + public String getCommentText() { + return _commentText; + } + + public void setCommentText(String commentText) { + _commentText = commentText; + } + + public String getGuestName() { + return _guestName; + } + + public void setGuestName(String guestName) { + _guestName = guestName; + } + + public String getGuestEmailAddress() { + return _guestEmailAddress; + } + + public void setGuestEmailAddress(String guestEmailAddress) { + _guestEmailAddress = guestEmailAddress; + } + + public boolean getGuestEmailNotification() { + return _guestEmailNotification; + } + + public boolean isGuestEmailNotification() { + return _guestEmailNotification; + } + + public void setGuestEmailNotification(boolean guestEmailNotification) { + _guestEmailNotification = guestEmailNotification; + } + + public long getLikeCount() { + return _likeCount; + } + + public void setLikeCount(long likeCount) { + _likeCount = likeCount; + } + + public long getDislikeCount() { + return _dislikeCount; + } + + public void setDislikeCount(long dislikeCount) { + _dislikeCount = dislikeCount; + } + + public long getTitleId() { + return _titleId; + } + + public void setTitleId(long titleId) { + _titleId = titleId; + } + + public boolean getVerified() { + return _verified; + } + + public boolean isVerified() { + return _verified; + } + + public void setVerified(boolean verified) { + _verified = verified; + } + + public boolean getHasAnswer() { + return _hasAnswer; + } + + public boolean isHasAnswer() { + return _hasAnswer; + } + + public void setHasAnswer(boolean hasAnswer) { + _hasAnswer = hasAnswer; + } + + private long _commentId; + private long _groupId; + private long _companyId; + private Date _modifiedDate; + private long _parentId; + private String _parentName; + private String _commentText; + private String _guestName; + private String _guestEmailAddress; + private boolean _guestEmailNotification; + private long _likeCount; + private long _dislikeCount; + private long _titleId; + private boolean _verified; + private boolean _hasAnswer; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/CommentWrapper.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/CommentWrapper.java new file mode 100644 index 0000000..a337f33 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/CommentWrapper.java @@ -0,0 +1,657 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.model.ModelWrapper; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + *

+ * This class is a wrapper for {@link Comment}. + *

+ * + * @author Alireza + * @see Comment + * @generated + */ +public class CommentWrapper implements Comment, ModelWrapper { + public CommentWrapper(Comment comment) { + _comment = comment; + } + + @Override + public Class getModelClass() { + return Comment.class; + } + + @Override + public String getModelClassName() { + return Comment.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("commentId", getCommentId()); + attributes.put("groupId", getGroupId()); + attributes.put("companyId", getCompanyId()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("parentId", getParentId()); + attributes.put("parentName", getParentName()); + attributes.put("commentText", getCommentText()); + attributes.put("guestName", getGuestName()); + attributes.put("guestEmailAddress", getGuestEmailAddress()); + attributes.put("guestEmailNotification", getGuestEmailNotification()); + attributes.put("likeCount", getLikeCount()); + attributes.put("dislikeCount", getDislikeCount()); + attributes.put("titleId", getTitleId()); + attributes.put("verified", getVerified()); + attributes.put("hasAnswer", getHasAnswer()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + Long commentId = (Long)attributes.get("commentId"); + + if (commentId != null) { + setCommentId(commentId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Date modifiedDate = (Date)attributes.get("modifiedDate"); + + if (modifiedDate != null) { + setModifiedDate(modifiedDate); + } + + Long parentId = (Long)attributes.get("parentId"); + + if (parentId != null) { + setParentId(parentId); + } + + String parentName = (String)attributes.get("parentName"); + + if (parentName != null) { + setParentName(parentName); + } + + String commentText = (String)attributes.get("commentText"); + + if (commentText != null) { + setCommentText(commentText); + } + + String guestName = (String)attributes.get("guestName"); + + if (guestName != null) { + setGuestName(guestName); + } + + String guestEmailAddress = (String)attributes.get("guestEmailAddress"); + + if (guestEmailAddress != null) { + setGuestEmailAddress(guestEmailAddress); + } + + Boolean guestEmailNotification = (Boolean)attributes.get( + "guestEmailNotification"); + + if (guestEmailNotification != null) { + setGuestEmailNotification(guestEmailNotification); + } + + Long likeCount = (Long)attributes.get("likeCount"); + + if (likeCount != null) { + setLikeCount(likeCount); + } + + Long dislikeCount = (Long)attributes.get("dislikeCount"); + + if (dislikeCount != null) { + setDislikeCount(dislikeCount); + } + + Long titleId = (Long)attributes.get("titleId"); + + if (titleId != null) { + setTitleId(titleId); + } + + Boolean verified = (Boolean)attributes.get("verified"); + + if (verified != null) { + setVerified(verified); + } + + Boolean hasAnswer = (Boolean)attributes.get("hasAnswer"); + + if (hasAnswer != null) { + setHasAnswer(hasAnswer); + } + } + + /** + * Returns the primary key of this comment. + * + * @return the primary key of this comment + */ + @Override + public long getPrimaryKey() { + return _comment.getPrimaryKey(); + } + + /** + * Sets the primary key of this comment. + * + * @param primaryKey the primary key of this comment + */ + @Override + public void setPrimaryKey(long primaryKey) { + _comment.setPrimaryKey(primaryKey); + } + + /** + * Returns the comment ID of this comment. + * + * @return the comment ID of this comment + */ + @Override + public long getCommentId() { + return _comment.getCommentId(); + } + + /** + * Sets the comment ID of this comment. + * + * @param commentId the comment ID of this comment + */ + @Override + public void setCommentId(long commentId) { + _comment.setCommentId(commentId); + } + + /** + * Returns the group ID of this comment. + * + * @return the group ID of this comment + */ + @Override + public long getGroupId() { + return _comment.getGroupId(); + } + + /** + * Sets the group ID of this comment. + * + * @param groupId the group ID of this comment + */ + @Override + public void setGroupId(long groupId) { + _comment.setGroupId(groupId); + } + + /** + * Returns the company ID of this comment. + * + * @return the company ID of this comment + */ + @Override + public long getCompanyId() { + return _comment.getCompanyId(); + } + + /** + * Sets the company ID of this comment. + * + * @param companyId the company ID of this comment + */ + @Override + public void setCompanyId(long companyId) { + _comment.setCompanyId(companyId); + } + + /** + * Returns the modified date of this comment. + * + * @return the modified date of this comment + */ + @Override + public java.util.Date getModifiedDate() { + return _comment.getModifiedDate(); + } + + /** + * Sets the modified date of this comment. + * + * @param modifiedDate the modified date of this comment + */ + @Override + public void setModifiedDate(java.util.Date modifiedDate) { + _comment.setModifiedDate(modifiedDate); + } + + /** + * Returns the parent ID of this comment. + * + * @return the parent ID of this comment + */ + @Override + public long getParentId() { + return _comment.getParentId(); + } + + /** + * Sets the parent ID of this comment. + * + * @param parentId the parent ID of this comment + */ + @Override + public void setParentId(long parentId) { + _comment.setParentId(parentId); + } + + /** + * Returns the parent name of this comment. + * + * @return the parent name of this comment + */ + @Override + public java.lang.String getParentName() { + return _comment.getParentName(); + } + + /** + * Sets the parent name of this comment. + * + * @param parentName the parent name of this comment + */ + @Override + public void setParentName(java.lang.String parentName) { + _comment.setParentName(parentName); + } + + /** + * Returns the comment text of this comment. + * + * @return the comment text of this comment + */ + @Override + public java.lang.String getCommentText() { + return _comment.getCommentText(); + } + + /** + * Sets the comment text of this comment. + * + * @param commentText the comment text of this comment + */ + @Override + public void setCommentText(java.lang.String commentText) { + _comment.setCommentText(commentText); + } + + /** + * Returns the guest name of this comment. + * + * @return the guest name of this comment + */ + @Override + public java.lang.String getGuestName() { + return _comment.getGuestName(); + } + + /** + * Sets the guest name of this comment. + * + * @param guestName the guest name of this comment + */ + @Override + public void setGuestName(java.lang.String guestName) { + _comment.setGuestName(guestName); + } + + /** + * Returns the guest email address of this comment. + * + * @return the guest email address of this comment + */ + @Override + public java.lang.String getGuestEmailAddress() { + return _comment.getGuestEmailAddress(); + } + + /** + * Sets the guest email address of this comment. + * + * @param guestEmailAddress the guest email address of this comment + */ + @Override + public void setGuestEmailAddress(java.lang.String guestEmailAddress) { + _comment.setGuestEmailAddress(guestEmailAddress); + } + + /** + * Returns the guest email notification of this comment. + * + * @return the guest email notification of this comment + */ + @Override + public boolean getGuestEmailNotification() { + return _comment.getGuestEmailNotification(); + } + + /** + * Returns true if this comment is guest email notification. + * + * @return true if this comment is guest email notification; false otherwise + */ + @Override + public boolean isGuestEmailNotification() { + return _comment.isGuestEmailNotification(); + } + + /** + * Sets whether this comment is guest email notification. + * + * @param guestEmailNotification the guest email notification of this comment + */ + @Override + public void setGuestEmailNotification(boolean guestEmailNotification) { + _comment.setGuestEmailNotification(guestEmailNotification); + } + + /** + * Returns the like count of this comment. + * + * @return the like count of this comment + */ + @Override + public long getLikeCount() { + return _comment.getLikeCount(); + } + + /** + * Sets the like count of this comment. + * + * @param likeCount the like count of this comment + */ + @Override + public void setLikeCount(long likeCount) { + _comment.setLikeCount(likeCount); + } + + /** + * Returns the dislike count of this comment. + * + * @return the dislike count of this comment + */ + @Override + public long getDislikeCount() { + return _comment.getDislikeCount(); + } + + /** + * Sets the dislike count of this comment. + * + * @param dislikeCount the dislike count of this comment + */ + @Override + public void setDislikeCount(long dislikeCount) { + _comment.setDislikeCount(dislikeCount); + } + + /** + * Returns the title ID of this comment. + * + * @return the title ID of this comment + */ + @Override + public long getTitleId() { + return _comment.getTitleId(); + } + + /** + * Sets the title ID of this comment. + * + * @param titleId the title ID of this comment + */ + @Override + public void setTitleId(long titleId) { + _comment.setTitleId(titleId); + } + + /** + * Returns the verified of this comment. + * + * @return the verified of this comment + */ + @Override + public boolean getVerified() { + return _comment.getVerified(); + } + + /** + * Returns true if this comment is verified. + * + * @return true if this comment is verified; false otherwise + */ + @Override + public boolean isVerified() { + return _comment.isVerified(); + } + + /** + * Sets whether this comment is verified. + * + * @param verified the verified of this comment + */ + @Override + public void setVerified(boolean verified) { + _comment.setVerified(verified); + } + + /** + * Returns the has answer of this comment. + * + * @return the has answer of this comment + */ + @Override + public boolean getHasAnswer() { + return _comment.getHasAnswer(); + } + + /** + * Returns true if this comment is has answer. + * + * @return true if this comment is has answer; false otherwise + */ + @Override + public boolean isHasAnswer() { + return _comment.isHasAnswer(); + } + + /** + * Sets whether this comment is has answer. + * + * @param hasAnswer the has answer of this comment + */ + @Override + public void setHasAnswer(boolean hasAnswer) { + _comment.setHasAnswer(hasAnswer); + } + + @Override + public boolean isNew() { + return _comment.isNew(); + } + + @Override + public void setNew(boolean n) { + _comment.setNew(n); + } + + @Override + public boolean isCachedModel() { + return _comment.isCachedModel(); + } + + @Override + public void setCachedModel(boolean cachedModel) { + _comment.setCachedModel(cachedModel); + } + + @Override + public boolean isEscapedModel() { + return _comment.isEscapedModel(); + } + + @Override + public java.io.Serializable getPrimaryKeyObj() { + return _comment.getPrimaryKeyObj(); + } + + @Override + public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { + _comment.setPrimaryKeyObj(primaryKeyObj); + } + + @Override + public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { + return _comment.getExpandoBridge(); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.model.BaseModel baseModel) { + _comment.setExpandoBridgeAttributes(baseModel); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { + _comment.setExpandoBridgeAttributes(expandoBridge); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.service.ServiceContext serviceContext) { + _comment.setExpandoBridgeAttributes(serviceContext); + } + + @Override + public java.lang.Object clone() { + return new CommentWrapper((Comment)_comment.clone()); + } + + @Override + public int compareTo( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) { + return _comment.compareTo(comment); + } + + @Override + public int hashCode() { + return _comment.hashCode(); + } + + @Override + public com.liferay.portal.model.CacheModel toCacheModel() { + return _comment.toCacheModel(); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment toEscapedModel() { + return new CommentWrapper(_comment.toEscapedModel()); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment toUnescapedModel() { + return new CommentWrapper(_comment.toUnescapedModel()); + } + + @Override + public java.lang.String toString() { + return _comment.toString(); + } + + @Override + public java.lang.String toXmlString() { + return _comment.toXmlString(); + } + + @Override + public void persist() + throws com.liferay.portal.kernel.exception.SystemException { + _comment.persist(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof CommentWrapper)) { + return false; + } + + CommentWrapper commentWrapper = (CommentWrapper)obj; + + if (Validator.equals(_comment, commentWrapper._comment)) { + return true; + } + + return false; + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} + */ + public Comment getWrappedComment() { + return _comment; + } + + @Override + public Comment getWrappedModel() { + return _comment; + } + + @Override + public void resetOriginalValues() { + _comment.resetOriginalValues(); + } + + private Comment _comment; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitle.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitle.java new file mode 100644 index 0000000..a86d1ee --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitle.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import com.liferay.portal.model.PersistedModel; + +/** + * The extended model interface for the PortletTitle service. Represents a row in the "GDP_PortletTitle" database table, with each column mapped to a property of this class. + * + * @author Alireza + * @see PortletTitleModel + * @see ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleImpl + * @see ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl + * @generated + */ +public interface PortletTitle extends PortletTitleModel, PersistedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this interface directly. Add methods to {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitleClp.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitleClp.java new file mode 100644 index 0000000..125fdb6 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitleClp.java @@ -0,0 +1,295 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.model.BaseModel; +import com.liferay.portal.model.impl.BaseModelImpl; + +import ir.ac.iut.sccportal.guestdiscussion.service.ClpSerializer; +import ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalServiceUtil; + +import java.io.Serializable; + +import java.lang.reflect.Method; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author Alireza + */ +public class PortletTitleClp extends BaseModelImpl + implements PortletTitle { + public PortletTitleClp() { + } + + @Override + public Class getModelClass() { + return PortletTitle.class; + } + + @Override + public String getModelClassName() { + return PortletTitle.class.getName(); + } + + @Override + public String getPrimaryKey() { + return _portletId; + } + + @Override + public void setPrimaryKey(String primaryKey) { + setPortletId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _portletId; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey((String)primaryKeyObj); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("portletId", getPortletId()); + attributes.put("titleId", getTitleId()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + String portletId = (String)attributes.get("portletId"); + + if (portletId != null) { + setPortletId(portletId); + } + + Long titleId = (Long)attributes.get("titleId"); + + if (titleId != null) { + setTitleId(titleId); + } + } + + @Override + public String getPortletId() { + return _portletId; + } + + @Override + public void setPortletId(String portletId) { + _portletId = portletId; + + if (_portletTitleRemoteModel != null) { + try { + Class clazz = _portletTitleRemoteModel.getClass(); + + Method method = clazz.getMethod("setPortletId", String.class); + + method.invoke(_portletTitleRemoteModel, portletId); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getTitleId() { + return _titleId; + } + + @Override + public void setTitleId(long titleId) { + _titleId = titleId; + + if (_portletTitleRemoteModel != null) { + try { + Class clazz = _portletTitleRemoteModel.getClass(); + + Method method = clazz.getMethod("setTitleId", long.class); + + method.invoke(_portletTitleRemoteModel, titleId); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + public BaseModel getPortletTitleRemoteModel() { + return _portletTitleRemoteModel; + } + + public void setPortletTitleRemoteModel(BaseModel portletTitleRemoteModel) { + _portletTitleRemoteModel = portletTitleRemoteModel; + } + + public Object invokeOnRemoteModel(String methodName, + Class[] parameterTypes, Object[] parameterValues) + throws Exception { + Object[] remoteParameterValues = new Object[parameterValues.length]; + + for (int i = 0; i < parameterValues.length; i++) { + if (parameterValues[i] != null) { + remoteParameterValues[i] = ClpSerializer.translateInput(parameterValues[i]); + } + } + + Class remoteModelClass = _portletTitleRemoteModel.getClass(); + + ClassLoader remoteModelClassLoader = remoteModelClass.getClassLoader(); + + Class[] remoteParameterTypes = new Class[parameterTypes.length]; + + for (int i = 0; i < parameterTypes.length; i++) { + if (parameterTypes[i].isPrimitive()) { + remoteParameterTypes[i] = parameterTypes[i]; + } + else { + String parameterTypeName = parameterTypes[i].getName(); + + remoteParameterTypes[i] = remoteModelClassLoader.loadClass(parameterTypeName); + } + } + + Method method = remoteModelClass.getMethod(methodName, + remoteParameterTypes); + + Object returnValue = method.invoke(_portletTitleRemoteModel, + remoteParameterValues); + + if (returnValue != null) { + returnValue = ClpSerializer.translateOutput(returnValue); + } + + return returnValue; + } + + @Override + public void persist() throws SystemException { + if (this.isNew()) { + PortletTitleLocalServiceUtil.addPortletTitle(this); + } + else { + PortletTitleLocalServiceUtil.updatePortletTitle(this); + } + } + + @Override + public PortletTitle toEscapedModel() { + return (PortletTitle)ProxyUtil.newProxyInstance(PortletTitle.class.getClassLoader(), + new Class[] { PortletTitle.class }, new AutoEscapeBeanHandler(this)); + } + + @Override + public Object clone() { + PortletTitleClp clone = new PortletTitleClp(); + + clone.setPortletId(getPortletId()); + clone.setTitleId(getTitleId()); + + return clone; + } + + @Override + public int compareTo(PortletTitle portletTitle) { + String primaryKey = portletTitle.getPrimaryKey(); + + return getPrimaryKey().compareTo(primaryKey); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof PortletTitleClp)) { + return false; + } + + PortletTitleClp portletTitle = (PortletTitleClp)obj; + + String primaryKey = portletTitle.getPrimaryKey(); + + if (getPrimaryKey().equals(primaryKey)) { + return true; + } + else { + return false; + } + } + + public Class getClpSerializerClass() { + return _clpSerializerClass; + } + + @Override + public int hashCode() { + return getPrimaryKey().hashCode(); + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(5); + + sb.append("{portletId="); + sb.append(getPortletId()); + sb.append(", titleId="); + sb.append(getTitleId()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(10); + + sb.append(""); + sb.append("ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle"); + sb.append(""); + + sb.append( + "portletId"); + sb.append( + "titleId"); + + sb.append(""); + + return sb.toString(); + } + + private String _portletId; + private long _titleId; + private BaseModel _portletTitleRemoteModel; + private Class _clpSerializerClass = ir.ac.iut.sccportal.guestdiscussion.service.ClpSerializer.class; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitleModel.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitleModel.java new file mode 100644 index 0000000..c83eb79 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitleModel.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import com.liferay.portal.kernel.bean.AutoEscape; +import com.liferay.portal.model.BaseModel; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.service.ServiceContext; + +import com.liferay.portlet.expando.model.ExpandoBridge; + +import java.io.Serializable; + +/** + * The base model interface for the PortletTitle service. Represents a row in the "GDP_PortletTitle" database table, with each column mapped to a property of this class. + * + *

+ * This interface and its corresponding implementation {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleImpl}. + *

+ * + * @author Alireza + * @see PortletTitle + * @see ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleImpl + * @see ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl + * @generated + */ +public interface PortletTitleModel extends BaseModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. All methods that expect a portlet title model instance should use the {@link PortletTitle} interface instead. + */ + + /** + * Returns the primary key of this portlet title. + * + * @return the primary key of this portlet title + */ + public String getPrimaryKey(); + + /** + * Sets the primary key of this portlet title. + * + * @param primaryKey the primary key of this portlet title + */ + public void setPrimaryKey(String primaryKey); + + /** + * Returns the portlet ID of this portlet title. + * + * @return the portlet ID of this portlet title + */ + @AutoEscape + public String getPortletId(); + + /** + * Sets the portlet ID of this portlet title. + * + * @param portletId the portlet ID of this portlet title + */ + public void setPortletId(String portletId); + + /** + * Returns the title ID of this portlet title. + * + * @return the title ID of this portlet title + */ + public long getTitleId(); + + /** + * Sets the title ID of this portlet title. + * + * @param titleId the title ID of this portlet title + */ + public void setTitleId(long titleId); + + @Override + public boolean isNew(); + + @Override + public void setNew(boolean n); + + @Override + public boolean isCachedModel(); + + @Override + public void setCachedModel(boolean cachedModel); + + @Override + public boolean isEscapedModel(); + + @Override + public Serializable getPrimaryKeyObj(); + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj); + + @Override + public ExpandoBridge getExpandoBridge(); + + @Override + public void setExpandoBridgeAttributes(BaseModel baseModel); + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge); + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext); + + @Override + public Object clone(); + + @Override + public int compareTo( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle); + + @Override + public int hashCode(); + + @Override + public CacheModel toCacheModel(); + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle toEscapedModel(); + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle toUnescapedModel(); + + @Override + public String toString(); + + @Override + public String toXmlString(); +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitleSoap.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitleSoap.java new file mode 100644 index 0000000..81f8b3b --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitleSoap.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.List; + +/** + * This class is used by SOAP remote services, specifically {@link ir.ac.iut.sccportal.guestdiscussion.service.http.PortletTitleServiceSoap}. + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.http.PortletTitleServiceSoap + * @generated + */ +public class PortletTitleSoap implements Serializable { + public static PortletTitleSoap toSoapModel(PortletTitle model) { + PortletTitleSoap soapModel = new PortletTitleSoap(); + + soapModel.setPortletId(model.getPortletId()); + soapModel.setTitleId(model.getTitleId()); + + return soapModel; + } + + public static PortletTitleSoap[] toSoapModels(PortletTitle[] models) { + PortletTitleSoap[] soapModels = new PortletTitleSoap[models.length]; + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModel(models[i]); + } + + return soapModels; + } + + public static PortletTitleSoap[][] toSoapModels(PortletTitle[][] models) { + PortletTitleSoap[][] soapModels = null; + + if (models.length > 0) { + soapModels = new PortletTitleSoap[models.length][models[0].length]; + } + else { + soapModels = new PortletTitleSoap[0][0]; + } + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModels(models[i]); + } + + return soapModels; + } + + public static PortletTitleSoap[] toSoapModels(List models) { + List soapModels = new ArrayList(models.size()); + + for (PortletTitle model : models) { + soapModels.add(toSoapModel(model)); + } + + return soapModels.toArray(new PortletTitleSoap[soapModels.size()]); + } + + public PortletTitleSoap() { + } + + public String getPrimaryKey() { + return _portletId; + } + + public void setPrimaryKey(String pk) { + setPortletId(pk); + } + + public String getPortletId() { + return _portletId; + } + + public void setPortletId(String portletId) { + _portletId = portletId; + } + + public long getTitleId() { + return _titleId; + } + + public void setTitleId(long titleId) { + _titleId = titleId; + } + + private String _portletId; + private long _titleId; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitleWrapper.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitleWrapper.java new file mode 100644 index 0000000..875963e --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/PortletTitleWrapper.java @@ -0,0 +1,275 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.model.ModelWrapper; + +import java.util.HashMap; +import java.util.Map; + +/** + *

+ * This class is a wrapper for {@link PortletTitle}. + *

+ * + * @author Alireza + * @see PortletTitle + * @generated + */ +public class PortletTitleWrapper implements PortletTitle, + ModelWrapper { + public PortletTitleWrapper(PortletTitle portletTitle) { + _portletTitle = portletTitle; + } + + @Override + public Class getModelClass() { + return PortletTitle.class; + } + + @Override + public String getModelClassName() { + return PortletTitle.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("portletId", getPortletId()); + attributes.put("titleId", getTitleId()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + String portletId = (String)attributes.get("portletId"); + + if (portletId != null) { + setPortletId(portletId); + } + + Long titleId = (Long)attributes.get("titleId"); + + if (titleId != null) { + setTitleId(titleId); + } + } + + /** + * Returns the primary key of this portlet title. + * + * @return the primary key of this portlet title + */ + @Override + public java.lang.String getPrimaryKey() { + return _portletTitle.getPrimaryKey(); + } + + /** + * Sets the primary key of this portlet title. + * + * @param primaryKey the primary key of this portlet title + */ + @Override + public void setPrimaryKey(java.lang.String primaryKey) { + _portletTitle.setPrimaryKey(primaryKey); + } + + /** + * Returns the portlet ID of this portlet title. + * + * @return the portlet ID of this portlet title + */ + @Override + public java.lang.String getPortletId() { + return _portletTitle.getPortletId(); + } + + /** + * Sets the portlet ID of this portlet title. + * + * @param portletId the portlet ID of this portlet title + */ + @Override + public void setPortletId(java.lang.String portletId) { + _portletTitle.setPortletId(portletId); + } + + /** + * Returns the title ID of this portlet title. + * + * @return the title ID of this portlet title + */ + @Override + public long getTitleId() { + return _portletTitle.getTitleId(); + } + + /** + * Sets the title ID of this portlet title. + * + * @param titleId the title ID of this portlet title + */ + @Override + public void setTitleId(long titleId) { + _portletTitle.setTitleId(titleId); + } + + @Override + public boolean isNew() { + return _portletTitle.isNew(); + } + + @Override + public void setNew(boolean n) { + _portletTitle.setNew(n); + } + + @Override + public boolean isCachedModel() { + return _portletTitle.isCachedModel(); + } + + @Override + public void setCachedModel(boolean cachedModel) { + _portletTitle.setCachedModel(cachedModel); + } + + @Override + public boolean isEscapedModel() { + return _portletTitle.isEscapedModel(); + } + + @Override + public java.io.Serializable getPrimaryKeyObj() { + return _portletTitle.getPrimaryKeyObj(); + } + + @Override + public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { + _portletTitle.setPrimaryKeyObj(primaryKeyObj); + } + + @Override + public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { + return _portletTitle.getExpandoBridge(); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.model.BaseModel baseModel) { + _portletTitle.setExpandoBridgeAttributes(baseModel); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { + _portletTitle.setExpandoBridgeAttributes(expandoBridge); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.service.ServiceContext serviceContext) { + _portletTitle.setExpandoBridgeAttributes(serviceContext); + } + + @Override + public java.lang.Object clone() { + return new PortletTitleWrapper((PortletTitle)_portletTitle.clone()); + } + + @Override + public int compareTo( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) { + return _portletTitle.compareTo(portletTitle); + } + + @Override + public int hashCode() { + return _portletTitle.hashCode(); + } + + @Override + public com.liferay.portal.model.CacheModel toCacheModel() { + return _portletTitle.toCacheModel(); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle toEscapedModel() { + return new PortletTitleWrapper(_portletTitle.toEscapedModel()); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle toUnescapedModel() { + return new PortletTitleWrapper(_portletTitle.toUnescapedModel()); + } + + @Override + public java.lang.String toString() { + return _portletTitle.toString(); + } + + @Override + public java.lang.String toXmlString() { + return _portletTitle.toXmlString(); + } + + @Override + public void persist() + throws com.liferay.portal.kernel.exception.SystemException { + _portletTitle.persist(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof PortletTitleWrapper)) { + return false; + } + + PortletTitleWrapper portletTitleWrapper = (PortletTitleWrapper)obj; + + if (Validator.equals(_portletTitle, portletTitleWrapper._portletTitle)) { + return true; + } + + return false; + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} + */ + public PortletTitle getWrappedPortletTitle() { + return _portletTitle; + } + + @Override + public PortletTitle getWrappedModel() { + return _portletTitle; + } + + @Override + public void resetOriginalValues() { + _portletTitle.resetOriginalValues(); + } + + private PortletTitle _portletTitle; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/Title.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/Title.java new file mode 100644 index 0000000..411d024 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/Title.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import com.liferay.portal.model.PersistedModel; + +/** + * The extended model interface for the Title service. Represents a row in the "GDP_Title" database table, with each column mapped to a property of this class. + * + * @author Alireza + * @see TitleModel + * @see ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleImpl + * @see ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl + * @generated + */ +public interface Title extends TitleModel, PersistedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this interface directly. Add methods to {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/TitleClp.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/TitleClp.java new file mode 100644 index 0000000..8853881 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/TitleClp.java @@ -0,0 +1,591 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.model.BaseModel; +import com.liferay.portal.model.impl.BaseModelImpl; +import com.liferay.portal.util.PortalUtil; + +import ir.ac.iut.sccportal.guestdiscussion.service.ClpSerializer; +import ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil; + +import java.io.Serializable; + +import java.lang.reflect.Method; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * @author Alireza + */ +public class TitleClp extends BaseModelImpl implements Title { + public TitleClp() { + } + + @Override + public Class<?> getModelClass() { + return Title.class; + } + + @Override + public String getModelClassName() { + return Title.class.getName(); + } + + @Override + public long getPrimaryKey() { + return _titleId; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setTitleId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _titleId; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Map<String, Object> getModelAttributes() { + Map<String, Object> attributes = new HashMap<String, Object>(); + + attributes.put("titleId", getTitleId()); + attributes.put("groupId", getGroupId()); + attributes.put("companyId", getCompanyId()); + attributes.put("userId", getUserId()); + attributes.put("userName", getUserName()); + attributes.put("createDate", getCreateDate()); + attributes.put("titleText", getTitleText()); + attributes.put("newCommentDraft", getNewCommentDraft()); + attributes.put("answerCommentDraft", getAnswerCommentDraft()); + + return attributes; + } + + @Override + public void setModelAttributes(Map<String, Object> attributes) { + Long titleId = (Long)attributes.get("titleId"); + + if (titleId != null) { + setTitleId(titleId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String userName = (String)attributes.get("userName"); + + if (userName != null) { + setUserName(userName); + } + + Date createDate = (Date)attributes.get("createDate"); + + if (createDate != null) { + setCreateDate(createDate); + } + + String titleText = (String)attributes.get("titleText"); + + if (titleText != null) { + setTitleText(titleText); + } + + String newCommentDraft = (String)attributes.get("newCommentDraft"); + + if (newCommentDraft != null) { + setNewCommentDraft(newCommentDraft); + } + + String answerCommentDraft = (String)attributes.get("answerCommentDraft"); + + if (answerCommentDraft != null) { + setAnswerCommentDraft(answerCommentDraft); + } + } + + @Override + public long getTitleId() { + return _titleId; + } + + @Override + public void setTitleId(long titleId) { + _titleId = titleId; + + if (_titleRemoteModel != null) { + try { + Class<?> clazz = _titleRemoteModel.getClass(); + + Method method = clazz.getMethod("setTitleId", long.class); + + method.invoke(_titleRemoteModel, titleId); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getGroupId() { + return _groupId; + } + + @Override + public void setGroupId(long groupId) { + _groupId = groupId; + + if (_titleRemoteModel != null) { + try { + Class<?> clazz = _titleRemoteModel.getClass(); + + Method method = clazz.getMethod("setGroupId", long.class); + + method.invoke(_titleRemoteModel, groupId); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getCompanyId() { + return _companyId; + } + + @Override + public void setCompanyId(long companyId) { + _companyId = companyId; + + if (_titleRemoteModel != null) { + try { + Class<?> clazz = _titleRemoteModel.getClass(); + + Method method = clazz.getMethod("setCompanyId", long.class); + + method.invoke(_titleRemoteModel, companyId); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getUserId() { + return _userId; + } + + @Override + public void setUserId(long userId) { + _userId = userId; + + if (_titleRemoteModel != null) { + try { + Class<?> clazz = _titleRemoteModel.getClass(); + + Method method = clazz.getMethod("setUserId", long.class); + + method.invoke(_titleRemoteModel, userId); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public String getUserUuid() throws SystemException { + return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid); + } + + @Override + public void setUserUuid(String userUuid) { + _userUuid = userUuid; + } + + @Override + public String getUserName() { + return _userName; + } + + @Override + public void setUserName(String userName) { + _userName = userName; + + if (_titleRemoteModel != null) { + try { + Class<?> clazz = _titleRemoteModel.getClass(); + + Method method = clazz.getMethod("setUserName", String.class); + + method.invoke(_titleRemoteModel, userName); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public Date getCreateDate() { + return _createDate; + } + + @Override + public void setCreateDate(Date createDate) { + _createDate = createDate; + + if (_titleRemoteModel != null) { + try { + Class<?> clazz = _titleRemoteModel.getClass(); + + Method method = clazz.getMethod("setCreateDate", Date.class); + + method.invoke(_titleRemoteModel, createDate); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public String getTitleText() { + return _titleText; + } + + @Override + public void setTitleText(String titleText) { + _titleText = titleText; + + if (_titleRemoteModel != null) { + try { + Class<?> clazz = _titleRemoteModel.getClass(); + + Method method = clazz.getMethod("setTitleText", String.class); + + method.invoke(_titleRemoteModel, titleText); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public String getNewCommentDraft() { + return _newCommentDraft; + } + + @Override + public void setNewCommentDraft(String newCommentDraft) { + _newCommentDraft = newCommentDraft; + + if (_titleRemoteModel != null) { + try { + Class<?> clazz = _titleRemoteModel.getClass(); + + Method method = clazz.getMethod("setNewCommentDraft", + String.class); + + method.invoke(_titleRemoteModel, newCommentDraft); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public String getAnswerCommentDraft() { + return _answerCommentDraft; + } + + @Override + public void setAnswerCommentDraft(String answerCommentDraft) { + _answerCommentDraft = answerCommentDraft; + + if (_titleRemoteModel != null) { + try { + Class<?> clazz = _titleRemoteModel.getClass(); + + Method method = clazz.getMethod("setAnswerCommentDraft", + String.class); + + method.invoke(_titleRemoteModel, answerCommentDraft); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + public BaseModel<?> getTitleRemoteModel() { + return _titleRemoteModel; + } + + public void setTitleRemoteModel(BaseModel<?> titleRemoteModel) { + _titleRemoteModel = titleRemoteModel; + } + + public Object invokeOnRemoteModel(String methodName, + Class<?>[] parameterTypes, Object[] parameterValues) + throws Exception { + Object[] remoteParameterValues = new Object[parameterValues.length]; + + for (int i = 0; i < parameterValues.length; i++) { + if (parameterValues[i] != null) { + remoteParameterValues[i] = ClpSerializer.translateInput(parameterValues[i]); + } + } + + Class<?> remoteModelClass = _titleRemoteModel.getClass(); + + ClassLoader remoteModelClassLoader = remoteModelClass.getClassLoader(); + + Class<?>[] remoteParameterTypes = new Class[parameterTypes.length]; + + for (int i = 0; i < parameterTypes.length; i++) { + if (parameterTypes[i].isPrimitive()) { + remoteParameterTypes[i] = parameterTypes[i]; + } + else { + String parameterTypeName = parameterTypes[i].getName(); + + remoteParameterTypes[i] = remoteModelClassLoader.loadClass(parameterTypeName); + } + } + + Method method = remoteModelClass.getMethod(methodName, + remoteParameterTypes); + + Object returnValue = method.invoke(_titleRemoteModel, + remoteParameterValues); + + if (returnValue != null) { + returnValue = ClpSerializer.translateOutput(returnValue); + } + + return returnValue; + } + + @Override + public void persist() throws SystemException { + if (this.isNew()) { + TitleLocalServiceUtil.addTitle(this); + } + else { + TitleLocalServiceUtil.updateTitle(this); + } + } + + @Override + public Title toEscapedModel() { + return (Title)ProxyUtil.newProxyInstance(Title.class.getClassLoader(), + new Class[] { Title.class }, new AutoEscapeBeanHandler(this)); + } + + @Override + public Object clone() { + TitleClp clone = new TitleClp(); + + clone.setTitleId(getTitleId()); + clone.setGroupId(getGroupId()); + clone.setCompanyId(getCompanyId()); + clone.setUserId(getUserId()); + clone.setUserName(getUserName()); + clone.setCreateDate(getCreateDate()); + clone.setTitleText(getTitleText()); + clone.setNewCommentDraft(getNewCommentDraft()); + clone.setAnswerCommentDraft(getAnswerCommentDraft()); + + return clone; + } + + @Override + public int compareTo(Title title) { + int value = 0; + + if (getTitleId() < title.getTitleId()) { + value = -1; + } + else if (getTitleId() > title.getTitleId()) { + value = 1; + } + else { + value = 0; + } + + value = value * -1; + + if (value != 0) { + return value; + } + + return 0; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof TitleClp)) { + return false; + } + + TitleClp title = (TitleClp)obj; + + long primaryKey = title.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + public Class<?> getClpSerializerClass() { + return _clpSerializerClass; + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(19); + + sb.append("{titleId="); + sb.append(getTitleId()); + sb.append(", groupId="); + sb.append(getGroupId()); + sb.append(", companyId="); + sb.append(getCompanyId()); + sb.append(", userId="); + sb.append(getUserId()); + sb.append(", userName="); + sb.append(getUserName()); + sb.append(", createDate="); + sb.append(getCreateDate()); + sb.append(", titleText="); + sb.append(getTitleText()); + sb.append(", newCommentDraft="); + sb.append(getNewCommentDraft()); + sb.append(", answerCommentDraft="); + sb.append(getAnswerCommentDraft()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(31); + + sb.append("<model><model-name>"); + sb.append("ir.ac.iut.sccportal.guestdiscussion.model.Title"); + sb.append("</model-name>"); + + sb.append( + "<column><column-name>titleId</column-name><column-value><![CDATA["); + sb.append(getTitleId()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>groupId</column-name><column-value><![CDATA["); + sb.append(getGroupId()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>companyId</column-name><column-value><![CDATA["); + sb.append(getCompanyId()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>userId</column-name><column-value><![CDATA["); + sb.append(getUserId()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>userName</column-name><column-value><![CDATA["); + sb.append(getUserName()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>createDate</column-name><column-value><![CDATA["); + sb.append(getCreateDate()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>titleText</column-name><column-value><![CDATA["); + sb.append(getTitleText()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>newCommentDraft</column-name><column-value><![CDATA["); + sb.append(getNewCommentDraft()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>answerCommentDraft</column-name><column-value><![CDATA["); + sb.append(getAnswerCommentDraft()); + sb.append("]]></column-value></column>"); + + sb.append("</model>"); + + return sb.toString(); + } + + private long _titleId; + private long _groupId; + private long _companyId; + private long _userId; + private String _userUuid; + private String _userName; + private Date _createDate; + private String _titleText; + private String _newCommentDraft; + private String _answerCommentDraft; + private BaseModel<?> _titleRemoteModel; + private Class<?> _clpSerializerClass = ir.ac.iut.sccportal.guestdiscussion.service.ClpSerializer.class; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/TitleModel.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/TitleModel.java new file mode 100644 index 0000000..1732f85 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/TitleModel.java @@ -0,0 +1,264 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import com.liferay.portal.kernel.bean.AutoEscape; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.model.BaseModel; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.service.ServiceContext; + +import com.liferay.portlet.expando.model.ExpandoBridge; + +import java.io.Serializable; + +import java.util.Date; + +/** + * The base model interface for the Title service. Represents a row in the "GDP_Title" database table, with each column mapped to a property of this class. + * + * <p> + * This interface and its corresponding implementation {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleImpl}. + * </p> + * + * @author Alireza + * @see Title + * @see ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleImpl + * @see ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl + * @generated + */ +public interface TitleModel extends BaseModel<Title> { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. All methods that expect a title model instance should use the {@link Title} interface instead. + */ + + /** + * Returns the primary key of this title. + * + * @return the primary key of this title + */ + public long getPrimaryKey(); + + /** + * Sets the primary key of this title. + * + * @param primaryKey the primary key of this title + */ + public void setPrimaryKey(long primaryKey); + + /** + * Returns the title ID of this title. + * + * @return the title ID of this title + */ + public long getTitleId(); + + /** + * Sets the title ID of this title. + * + * @param titleId the title ID of this title + */ + public void setTitleId(long titleId); + + /** + * Returns the group ID of this title. + * + * @return the group ID of this title + */ + public long getGroupId(); + + /** + * Sets the group ID of this title. + * + * @param groupId the group ID of this title + */ + public void setGroupId(long groupId); + + /** + * Returns the company ID of this title. + * + * @return the company ID of this title + */ + public long getCompanyId(); + + /** + * Sets the company ID of this title. + * + * @param companyId the company ID of this title + */ + public void setCompanyId(long companyId); + + /** + * Returns the user ID of this title. + * + * @return the user ID of this title + */ + public long getUserId(); + + /** + * Sets the user ID of this title. + * + * @param userId the user ID of this title + */ + public void setUserId(long userId); + + /** + * Returns the user uuid of this title. + * + * @return the user uuid of this title + * @throws SystemException if a system exception occurred + */ + public String getUserUuid() throws SystemException; + + /** + * Sets the user uuid of this title. + * + * @param userUuid the user uuid of this title + */ + public void setUserUuid(String userUuid); + + /** + * Returns the user name of this title. + * + * @return the user name of this title + */ + @AutoEscape + public String getUserName(); + + /** + * Sets the user name of this title. + * + * @param userName the user name of this title + */ + public void setUserName(String userName); + + /** + * Returns the create date of this title. + * + * @return the create date of this title + */ + public Date getCreateDate(); + + /** + * Sets the create date of this title. + * + * @param createDate the create date of this title + */ + public void setCreateDate(Date createDate); + + /** + * Returns the title text of this title. + * + * @return the title text of this title + */ + @AutoEscape + public String getTitleText(); + + /** + * Sets the title text of this title. + * + * @param titleText the title text of this title + */ + public void setTitleText(String titleText); + + /** + * Returns the new comment draft of this title. + * + * @return the new comment draft of this title + */ + @AutoEscape + public String getNewCommentDraft(); + + /** + * Sets the new comment draft of this title. + * + * @param newCommentDraft the new comment draft of this title + */ + public void setNewCommentDraft(String newCommentDraft); + + /** + * Returns the answer comment draft of this title. + * + * @return the answer comment draft of this title + */ + @AutoEscape + public String getAnswerCommentDraft(); + + /** + * Sets the answer comment draft of this title. + * + * @param answerCommentDraft the answer comment draft of this title + */ + public void setAnswerCommentDraft(String answerCommentDraft); + + @Override + public boolean isNew(); + + @Override + public void setNew(boolean n); + + @Override + public boolean isCachedModel(); + + @Override + public void setCachedModel(boolean cachedModel); + + @Override + public boolean isEscapedModel(); + + @Override + public Serializable getPrimaryKeyObj(); + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj); + + @Override + public ExpandoBridge getExpandoBridge(); + + @Override + public void setExpandoBridgeAttributes(BaseModel<?> baseModel); + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge); + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext); + + @Override + public Object clone(); + + @Override + public int compareTo(ir.ac.iut.sccportal.guestdiscussion.model.Title title); + + @Override + public int hashCode(); + + @Override + public CacheModel<ir.ac.iut.sccportal.guestdiscussion.model.Title> toCacheModel(); + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title toEscapedModel(); + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title toUnescapedModel(); + + @Override + public String toString(); + + @Override + public String toXmlString(); +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/TitleSoap.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/TitleSoap.java new file mode 100644 index 0000000..d857d44 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/TitleSoap.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * This class is used by SOAP remote services, specifically {@link ir.ac.iut.sccportal.guestdiscussion.service.http.TitleServiceSoap}. + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.http.TitleServiceSoap + * @generated + */ +public class TitleSoap implements Serializable { + public static TitleSoap toSoapModel(Title model) { + TitleSoap soapModel = new TitleSoap(); + + soapModel.setTitleId(model.getTitleId()); + soapModel.setGroupId(model.getGroupId()); + soapModel.setCompanyId(model.getCompanyId()); + soapModel.setUserId(model.getUserId()); + soapModel.setUserName(model.getUserName()); + soapModel.setCreateDate(model.getCreateDate()); + soapModel.setTitleText(model.getTitleText()); + soapModel.setNewCommentDraft(model.getNewCommentDraft()); + soapModel.setAnswerCommentDraft(model.getAnswerCommentDraft()); + + return soapModel; + } + + public static TitleSoap[] toSoapModels(Title[] models) { + TitleSoap[] soapModels = new TitleSoap[models.length]; + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModel(models[i]); + } + + return soapModels; + } + + public static TitleSoap[][] toSoapModels(Title[][] models) { + TitleSoap[][] soapModels = null; + + if (models.length > 0) { + soapModels = new TitleSoap[models.length][models[0].length]; + } + else { + soapModels = new TitleSoap[0][0]; + } + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModels(models[i]); + } + + return soapModels; + } + + public static TitleSoap[] toSoapModels(List<Title> models) { + List<TitleSoap> soapModels = new ArrayList<TitleSoap>(models.size()); + + for (Title model : models) { + soapModels.add(toSoapModel(model)); + } + + return soapModels.toArray(new TitleSoap[soapModels.size()]); + } + + public TitleSoap() { + } + + public long getPrimaryKey() { + return _titleId; + } + + public void setPrimaryKey(long pk) { + setTitleId(pk); + } + + public long getTitleId() { + return _titleId; + } + + public void setTitleId(long titleId) { + _titleId = titleId; + } + + public long getGroupId() { + return _groupId; + } + + public void setGroupId(long groupId) { + _groupId = groupId; + } + + public long getCompanyId() { + return _companyId; + } + + public void setCompanyId(long companyId) { + _companyId = companyId; + } + + public long getUserId() { + return _userId; + } + + public void setUserId(long userId) { + _userId = userId; + } + + public String getUserName() { + return _userName; + } + + public void setUserName(String userName) { + _userName = userName; + } + + public Date getCreateDate() { + return _createDate; + } + + public void setCreateDate(Date createDate) { + _createDate = createDate; + } + + public String getTitleText() { + return _titleText; + } + + public void setTitleText(String titleText) { + _titleText = titleText; + } + + public String getNewCommentDraft() { + return _newCommentDraft; + } + + public void setNewCommentDraft(String newCommentDraft) { + _newCommentDraft = newCommentDraft; + } + + public String getAnswerCommentDraft() { + return _answerCommentDraft; + } + + public void setAnswerCommentDraft(String answerCommentDraft) { + _answerCommentDraft = answerCommentDraft; + } + + private long _titleId; + private long _groupId; + private long _companyId; + private long _userId; + private String _userName; + private Date _createDate; + private String _titleText; + private String _newCommentDraft; + private String _answerCommentDraft; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/TitleWrapper.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/TitleWrapper.java new file mode 100644 index 0000000..c0d7fa1 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/model/TitleWrapper.java @@ -0,0 +1,485 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model; + +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.model.ModelWrapper; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * <p> + * This class is a wrapper for {@link Title}. + * </p> + * + * @author Alireza + * @see Title + * @generated + */ +public class TitleWrapper implements Title, ModelWrapper<Title> { + public TitleWrapper(Title title) { + _title = title; + } + + @Override + public Class<?> getModelClass() { + return Title.class; + } + + @Override + public String getModelClassName() { + return Title.class.getName(); + } + + @Override + public Map<String, Object> getModelAttributes() { + Map<String, Object> attributes = new HashMap<String, Object>(); + + attributes.put("titleId", getTitleId()); + attributes.put("groupId", getGroupId()); + attributes.put("companyId", getCompanyId()); + attributes.put("userId", getUserId()); + attributes.put("userName", getUserName()); + attributes.put("createDate", getCreateDate()); + attributes.put("titleText", getTitleText()); + attributes.put("newCommentDraft", getNewCommentDraft()); + attributes.put("answerCommentDraft", getAnswerCommentDraft()); + + return attributes; + } + + @Override + public void setModelAttributes(Map<String, Object> attributes) { + Long titleId = (Long)attributes.get("titleId"); + + if (titleId != null) { + setTitleId(titleId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String userName = (String)attributes.get("userName"); + + if (userName != null) { + setUserName(userName); + } + + Date createDate = (Date)attributes.get("createDate"); + + if (createDate != null) { + setCreateDate(createDate); + } + + String titleText = (String)attributes.get("titleText"); + + if (titleText != null) { + setTitleText(titleText); + } + + String newCommentDraft = (String)attributes.get("newCommentDraft"); + + if (newCommentDraft != null) { + setNewCommentDraft(newCommentDraft); + } + + String answerCommentDraft = (String)attributes.get("answerCommentDraft"); + + if (answerCommentDraft != null) { + setAnswerCommentDraft(answerCommentDraft); + } + } + + /** + * Returns the primary key of this title. + * + * @return the primary key of this title + */ + @Override + public long getPrimaryKey() { + return _title.getPrimaryKey(); + } + + /** + * Sets the primary key of this title. + * + * @param primaryKey the primary key of this title + */ + @Override + public void setPrimaryKey(long primaryKey) { + _title.setPrimaryKey(primaryKey); + } + + /** + * Returns the title ID of this title. + * + * @return the title ID of this title + */ + @Override + public long getTitleId() { + return _title.getTitleId(); + } + + /** + * Sets the title ID of this title. + * + * @param titleId the title ID of this title + */ + @Override + public void setTitleId(long titleId) { + _title.setTitleId(titleId); + } + + /** + * Returns the group ID of this title. + * + * @return the group ID of this title + */ + @Override + public long getGroupId() { + return _title.getGroupId(); + } + + /** + * Sets the group ID of this title. + * + * @param groupId the group ID of this title + */ + @Override + public void setGroupId(long groupId) { + _title.setGroupId(groupId); + } + + /** + * Returns the company ID of this title. + * + * @return the company ID of this title + */ + @Override + public long getCompanyId() { + return _title.getCompanyId(); + } + + /** + * Sets the company ID of this title. + * + * @param companyId the company ID of this title + */ + @Override + public void setCompanyId(long companyId) { + _title.setCompanyId(companyId); + } + + /** + * Returns the user ID of this title. + * + * @return the user ID of this title + */ + @Override + public long getUserId() { + return _title.getUserId(); + } + + /** + * Sets the user ID of this title. + * + * @param userId the user ID of this title + */ + @Override + public void setUserId(long userId) { + _title.setUserId(userId); + } + + /** + * Returns the user uuid of this title. + * + * @return the user uuid of this title + * @throws SystemException if a system exception occurred + */ + @Override + public java.lang.String getUserUuid() + throws com.liferay.portal.kernel.exception.SystemException { + return _title.getUserUuid(); + } + + /** + * Sets the user uuid of this title. + * + * @param userUuid the user uuid of this title + */ + @Override + public void setUserUuid(java.lang.String userUuid) { + _title.setUserUuid(userUuid); + } + + /** + * Returns the user name of this title. + * + * @return the user name of this title + */ + @Override + public java.lang.String getUserName() { + return _title.getUserName(); + } + + /** + * Sets the user name of this title. + * + * @param userName the user name of this title + */ + @Override + public void setUserName(java.lang.String userName) { + _title.setUserName(userName); + } + + /** + * Returns the create date of this title. + * + * @return the create date of this title + */ + @Override + public java.util.Date getCreateDate() { + return _title.getCreateDate(); + } + + /** + * Sets the create date of this title. + * + * @param createDate the create date of this title + */ + @Override + public void setCreateDate(java.util.Date createDate) { + _title.setCreateDate(createDate); + } + + /** + * Returns the title text of this title. + * + * @return the title text of this title + */ + @Override + public java.lang.String getTitleText() { + return _title.getTitleText(); + } + + /** + * Sets the title text of this title. + * + * @param titleText the title text of this title + */ + @Override + public void setTitleText(java.lang.String titleText) { + _title.setTitleText(titleText); + } + + /** + * Returns the new comment draft of this title. + * + * @return the new comment draft of this title + */ + @Override + public java.lang.String getNewCommentDraft() { + return _title.getNewCommentDraft(); + } + + /** + * Sets the new comment draft of this title. + * + * @param newCommentDraft the new comment draft of this title + */ + @Override + public void setNewCommentDraft(java.lang.String newCommentDraft) { + _title.setNewCommentDraft(newCommentDraft); + } + + /** + * Returns the answer comment draft of this title. + * + * @return the answer comment draft of this title + */ + @Override + public java.lang.String getAnswerCommentDraft() { + return _title.getAnswerCommentDraft(); + } + + /** + * Sets the answer comment draft of this title. + * + * @param answerCommentDraft the answer comment draft of this title + */ + @Override + public void setAnswerCommentDraft(java.lang.String answerCommentDraft) { + _title.setAnswerCommentDraft(answerCommentDraft); + } + + @Override + public boolean isNew() { + return _title.isNew(); + } + + @Override + public void setNew(boolean n) { + _title.setNew(n); + } + + @Override + public boolean isCachedModel() { + return _title.isCachedModel(); + } + + @Override + public void setCachedModel(boolean cachedModel) { + _title.setCachedModel(cachedModel); + } + + @Override + public boolean isEscapedModel() { + return _title.isEscapedModel(); + } + + @Override + public java.io.Serializable getPrimaryKeyObj() { + return _title.getPrimaryKeyObj(); + } + + @Override + public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { + _title.setPrimaryKeyObj(primaryKeyObj); + } + + @Override + public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { + return _title.getExpandoBridge(); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.model.BaseModel<?> baseModel) { + _title.setExpandoBridgeAttributes(baseModel); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { + _title.setExpandoBridgeAttributes(expandoBridge); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.service.ServiceContext serviceContext) { + _title.setExpandoBridgeAttributes(serviceContext); + } + + @Override + public java.lang.Object clone() { + return new TitleWrapper((Title)_title.clone()); + } + + @Override + public int compareTo(ir.ac.iut.sccportal.guestdiscussion.model.Title title) { + return _title.compareTo(title); + } + + @Override + public int hashCode() { + return _title.hashCode(); + } + + @Override + public com.liferay.portal.model.CacheModel<ir.ac.iut.sccportal.guestdiscussion.model.Title> toCacheModel() { + return _title.toCacheModel(); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title toEscapedModel() { + return new TitleWrapper(_title.toEscapedModel()); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title toUnescapedModel() { + return new TitleWrapper(_title.toUnescapedModel()); + } + + @Override + public java.lang.String toString() { + return _title.toString(); + } + + @Override + public java.lang.String toXmlString() { + return _title.toXmlString(); + } + + @Override + public void persist() + throws com.liferay.portal.kernel.exception.SystemException { + _title.persist(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof TitleWrapper)) { + return false; + } + + TitleWrapper titleWrapper = (TitleWrapper)obj; + + if (Validator.equals(_title, titleWrapper._title)) { + return true; + } + + return false; + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} + */ + public Title getWrappedTitle() { + return _title; + } + + @Override + public Title getWrappedModel() { + return _title; + } + + @Override + public void resetOriginalValues() { + _title.resetOriginalValues(); + } + + private Title _title; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/ClpSerializer.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/ClpSerializer.java new file mode 100644 index 0000000..c9894d3 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/ClpSerializer.java @@ -0,0 +1,423 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayInputStream; +import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.ClassLoaderObjectInputStream; +import com.liferay.portal.kernel.util.PropsUtil; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.model.BaseModel; + +import ir.ac.iut.sccportal.guestdiscussion.model.CommentClp; +import ir.ac.iut.sccportal.guestdiscussion.model.PortletTitleClp; +import ir.ac.iut.sccportal.guestdiscussion.model.TitleClp; + +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; + +import java.lang.reflect.Method; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Alireza + */ +public class ClpSerializer { + public static String getServletContextName() { + if (Validator.isNotNull(_servletContextName)) { + return _servletContextName; + } + + synchronized (ClpSerializer.class) { + if (Validator.isNotNull(_servletContextName)) { + return _servletContextName; + } + + try { + ClassLoader classLoader = ClpSerializer.class.getClassLoader(); + + Class<?> portletPropsClass = classLoader.loadClass( + "com.liferay.util.portlet.PortletProps"); + + Method getMethod = portletPropsClass.getMethod("get", + new Class<?>[] { String.class }); + + String portletPropsServletContextName = (String)getMethod.invoke(null, + "GuestDiscussion-portlet-deployment-context"); + + if (Validator.isNotNull(portletPropsServletContextName)) { + _servletContextName = portletPropsServletContextName; + } + } + catch (Throwable t) { + if (_log.isInfoEnabled()) { + _log.info( + "Unable to locate deployment context from portlet properties"); + } + } + + if (Validator.isNull(_servletContextName)) { + try { + String propsUtilServletContextName = PropsUtil.get( + "GuestDiscussion-portlet-deployment-context"); + + if (Validator.isNotNull(propsUtilServletContextName)) { + _servletContextName = propsUtilServletContextName; + } + } + catch (Throwable t) { + if (_log.isInfoEnabled()) { + _log.info( + "Unable to locate deployment context from portal properties"); + } + } + } + + if (Validator.isNull(_servletContextName)) { + _servletContextName = "GuestDiscussion-portlet"; + } + + return _servletContextName; + } + } + + public static Object translateInput(BaseModel<?> oldModel) { + Class<?> oldModelClass = oldModel.getClass(); + + String oldModelClassName = oldModelClass.getName(); + + if (oldModelClassName.equals(CommentClp.class.getName())) { + return translateInputComment(oldModel); + } + + if (oldModelClassName.equals(PortletTitleClp.class.getName())) { + return translateInputPortletTitle(oldModel); + } + + if (oldModelClassName.equals(TitleClp.class.getName())) { + return translateInputTitle(oldModel); + } + + return oldModel; + } + + public static Object translateInput(List<Object> oldList) { + List<Object> newList = new ArrayList<Object>(oldList.size()); + + for (int i = 0; i < oldList.size(); i++) { + Object curObj = oldList.get(i); + + newList.add(translateInput(curObj)); + } + + return newList; + } + + public static Object translateInputComment(BaseModel<?> oldModel) { + CommentClp oldClpModel = (CommentClp)oldModel; + + BaseModel<?> newModel = oldClpModel.getCommentRemoteModel(); + + newModel.setModelAttributes(oldClpModel.getModelAttributes()); + + return newModel; + } + + public static Object translateInputPortletTitle(BaseModel<?> oldModel) { + PortletTitleClp oldClpModel = (PortletTitleClp)oldModel; + + BaseModel<?> newModel = oldClpModel.getPortletTitleRemoteModel(); + + newModel.setModelAttributes(oldClpModel.getModelAttributes()); + + return newModel; + } + + public static Object translateInputTitle(BaseModel<?> oldModel) { + TitleClp oldClpModel = (TitleClp)oldModel; + + BaseModel<?> newModel = oldClpModel.getTitleRemoteModel(); + + newModel.setModelAttributes(oldClpModel.getModelAttributes()); + + return newModel; + } + + public static Object translateInput(Object obj) { + if (obj instanceof BaseModel<?>) { + return translateInput((BaseModel<?>)obj); + } + else if (obj instanceof List<?>) { + return translateInput((List<Object>)obj); + } + else { + return obj; + } + } + + public static Object translateOutput(BaseModel<?> oldModel) { + Class<?> oldModelClass = oldModel.getClass(); + + String oldModelClassName = oldModelClass.getName(); + + if (oldModelClassName.equals( + "ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentImpl")) { + return translateOutputComment(oldModel); + } + else if (oldModelClassName.endsWith("Clp")) { + try { + ClassLoader classLoader = ClpSerializer.class.getClassLoader(); + + Method getClpSerializerClassMethod = oldModelClass.getMethod( + "getClpSerializerClass"); + + Class<?> oldClpSerializerClass = (Class<?>)getClpSerializerClassMethod.invoke(oldModel); + + Class<?> newClpSerializerClass = classLoader.loadClass(oldClpSerializerClass.getName()); + + Method translateOutputMethod = newClpSerializerClass.getMethod("translateOutput", + BaseModel.class); + + Class<?> oldModelModelClass = oldModel.getModelClass(); + + Method getRemoteModelMethod = oldModelClass.getMethod("get" + + oldModelModelClass.getSimpleName() + "RemoteModel"); + + Object oldRemoteModel = getRemoteModelMethod.invoke(oldModel); + + BaseModel<?> newModel = (BaseModel<?>)translateOutputMethod.invoke(null, + oldRemoteModel); + + return newModel; + } + catch (Throwable t) { + if (_log.isInfoEnabled()) { + _log.info("Unable to translate " + oldModelClassName, t); + } + } + } + + if (oldModelClassName.equals( + "ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleImpl")) { + return translateOutputPortletTitle(oldModel); + } + else if (oldModelClassName.endsWith("Clp")) { + try { + ClassLoader classLoader = ClpSerializer.class.getClassLoader(); + + Method getClpSerializerClassMethod = oldModelClass.getMethod( + "getClpSerializerClass"); + + Class<?> oldClpSerializerClass = (Class<?>)getClpSerializerClassMethod.invoke(oldModel); + + Class<?> newClpSerializerClass = classLoader.loadClass(oldClpSerializerClass.getName()); + + Method translateOutputMethod = newClpSerializerClass.getMethod("translateOutput", + BaseModel.class); + + Class<?> oldModelModelClass = oldModel.getModelClass(); + + Method getRemoteModelMethod = oldModelClass.getMethod("get" + + oldModelModelClass.getSimpleName() + "RemoteModel"); + + Object oldRemoteModel = getRemoteModelMethod.invoke(oldModel); + + BaseModel<?> newModel = (BaseModel<?>)translateOutputMethod.invoke(null, + oldRemoteModel); + + return newModel; + } + catch (Throwable t) { + if (_log.isInfoEnabled()) { + _log.info("Unable to translate " + oldModelClassName, t); + } + } + } + + if (oldModelClassName.equals( + "ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleImpl")) { + return translateOutputTitle(oldModel); + } + else if (oldModelClassName.endsWith("Clp")) { + try { + ClassLoader classLoader = ClpSerializer.class.getClassLoader(); + + Method getClpSerializerClassMethod = oldModelClass.getMethod( + "getClpSerializerClass"); + + Class<?> oldClpSerializerClass = (Class<?>)getClpSerializerClassMethod.invoke(oldModel); + + Class<?> newClpSerializerClass = classLoader.loadClass(oldClpSerializerClass.getName()); + + Method translateOutputMethod = newClpSerializerClass.getMethod("translateOutput", + BaseModel.class); + + Class<?> oldModelModelClass = oldModel.getModelClass(); + + Method getRemoteModelMethod = oldModelClass.getMethod("get" + + oldModelModelClass.getSimpleName() + "RemoteModel"); + + Object oldRemoteModel = getRemoteModelMethod.invoke(oldModel); + + BaseModel<?> newModel = (BaseModel<?>)translateOutputMethod.invoke(null, + oldRemoteModel); + + return newModel; + } + catch (Throwable t) { + if (_log.isInfoEnabled()) { + _log.info("Unable to translate " + oldModelClassName, t); + } + } + } + + return oldModel; + } + + public static Object translateOutput(List<Object> oldList) { + List<Object> newList = new ArrayList<Object>(oldList.size()); + + for (int i = 0; i < oldList.size(); i++) { + Object curObj = oldList.get(i); + + newList.add(translateOutput(curObj)); + } + + return newList; + } + + public static Object translateOutput(Object obj) { + if (obj instanceof BaseModel<?>) { + return translateOutput((BaseModel<?>)obj); + } + else if (obj instanceof List<?>) { + return translateOutput((List<Object>)obj); + } + else { + return obj; + } + } + + public static Throwable translateThrowable(Throwable throwable) { + if (_useReflectionToTranslateThrowable) { + try { + UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream(); + ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream); + + objectOutputStream.writeObject(throwable); + + objectOutputStream.flush(); + objectOutputStream.close(); + + UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(), + 0, unsyncByteArrayOutputStream.size()); + + Thread currentThread = Thread.currentThread(); + + ClassLoader contextClassLoader = currentThread.getContextClassLoader(); + + ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream, + contextClassLoader); + + throwable = (Throwable)objectInputStream.readObject(); + + objectInputStream.close(); + + return throwable; + } + catch (SecurityException se) { + if (_log.isInfoEnabled()) { + _log.info("Do not use reflection to translate throwable"); + } + + _useReflectionToTranslateThrowable = false; + } + catch (Throwable throwable2) { + _log.error(throwable2, throwable2); + + return throwable2; + } + } + + Class<?> clazz = throwable.getClass(); + + String className = clazz.getName(); + + if (className.equals(PortalException.class.getName())) { + return new PortalException(); + } + + if (className.equals(SystemException.class.getName())) { + return new SystemException(); + } + + if (className.equals( + "ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException")) { + return new ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException(); + } + + if (className.equals( + "ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException")) { + return new ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException(); + } + + if (className.equals( + "ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException")) { + return new ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException(); + } + + return throwable; + } + + public static Object translateOutputComment(BaseModel<?> oldModel) { + CommentClp newModel = new CommentClp(); + + newModel.setModelAttributes(oldModel.getModelAttributes()); + + newModel.setCommentRemoteModel(oldModel); + + return newModel; + } + + public static Object translateOutputPortletTitle(BaseModel<?> oldModel) { + PortletTitleClp newModel = new PortletTitleClp(); + + newModel.setModelAttributes(oldModel.getModelAttributes()); + + newModel.setPortletTitleRemoteModel(oldModel); + + return newModel; + } + + public static Object translateOutputTitle(BaseModel<?> oldModel) { + TitleClp newModel = new TitleClp(); + + newModel.setModelAttributes(oldModel.getModelAttributes()); + + newModel.setTitleRemoteModel(oldModel); + + return newModel; + } + + private static Log _log = LogFactoryUtil.getLog(ClpSerializer.class); + private static String _servletContextName; + private static boolean _useReflectionToTranslateThrowable = true; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentLocalService.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentLocalService.java new file mode 100644 index 0000000..d0530c2 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentLocalService.java @@ -0,0 +1,282 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Propagation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.service.BaseLocalService; +import com.liferay.portal.service.InvokableLocalService; +import com.liferay.portal.service.PersistedModelLocalService; + +/** + * Provides the local service interface for Comment. Methods of this + * service will not have security checks based on the propagated JAAS + * credentials because this service can only be accessed from within the same + * VM. + * + * @author Alireza + * @see CommentLocalServiceUtil + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.CommentLocalServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentLocalServiceImpl + * @generated + */ +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface CommentLocalService extends BaseLocalService, + InvokableLocalService, PersistedModelLocalService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link CommentLocalServiceUtil} to access the comment local service. Add custom service methods to {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Adds the comment to the database. Also notifies the appropriate model listeners. + * + * @param comment the comment + * @return the comment that was added + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) + public ir.ac.iut.sccportal.guestdiscussion.model.Comment addComment( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Creates a new comment with the primary key. Does not add the comment to the database. + * + * @param commentId the primary key for the new comment + * @return the new comment + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment createComment( + long commentId); + + /** + * Deletes the comment with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param commentId the primary key of the comment + * @return the comment that was removed + * @throws PortalException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) + public ir.ac.iut.sccportal.guestdiscussion.model.Comment deleteComment( + long commentId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + /** + * Deletes the comment from the database. Also notifies the appropriate model listeners. + * + * @param comment the comment + * @return the comment that was removed + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) + public ir.ac.iut.sccportal.guestdiscussion.model.Comment deleteComment( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws com.liferay.portal.kernel.exception.SystemException; + + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchComment( + long commentId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the comment with the primary key. + * + * @param commentId the primary key of the comment + * @return the comment + * @throws PortalException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ir.ac.iut.sccportal.guestdiscussion.model.Comment getComment( + long commentId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + @Override + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns a range of all the comments. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of comments + * @throws SystemException if a system exception occurred + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getComments( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of comments. + * + * @return the number of comments + * @throws SystemException if a system exception occurred + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getCommentsCount() + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Updates the comment in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param comment the comment + * @return the comment that was updated + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) + public ir.ac.iut.sccportal.guestdiscussion.model.Comment updateComment( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public java.lang.String getBeanIdentifier(); + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public void setBeanIdentifier(java.lang.String beanIdentifier); + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable; + + public ir.ac.iut.sccportal.guestdiscussion.model.Comment addComment( + long groupId, long companyId, java.util.Date modifiedDate, + long parentId, java.lang.String commentText, + java.lang.String guestName, long likeCount, long titleId, + boolean verified, boolean hasChild, java.lang.String parentName, + java.lang.String guestEmailAddress, boolean guestEmailNotification) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getCommentsByParentId_TitleId_Verified( + long parentId, long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getCommentsByTitleId_Verified( + long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getCommentsByTitleId( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException; + + public void deleteCommentsByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentLocalServiceClp.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentLocalServiceClp.java new file mode 100644 index 0000000..2c5a2ae --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentLocalServiceClp.java @@ -0,0 +1,911 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.service.InvokableLocalService; + +/** + * @author Alireza + * @generated + */ +public class CommentLocalServiceClp implements CommentLocalService { + public CommentLocalServiceClp(InvokableLocalService invokableLocalService) { + _invokableLocalService = invokableLocalService; + + _methodName0 = "addComment"; + + _methodParameterTypes0 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.Comment" + }; + + _methodName1 = "createComment"; + + _methodParameterTypes1 = new String[] { "long" }; + + _methodName2 = "deleteComment"; + + _methodParameterTypes2 = new String[] { "long" }; + + _methodName3 = "deleteComment"; + + _methodParameterTypes3 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.Comment" + }; + + _methodName4 = "dynamicQuery"; + + _methodParameterTypes4 = new String[] { }; + + _methodName5 = "dynamicQuery"; + + _methodParameterTypes5 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName6 = "dynamicQuery"; + + _methodParameterTypes6 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int" + }; + + _methodName7 = "dynamicQuery"; + + _methodParameterTypes7 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int", + "com.liferay.portal.kernel.util.OrderByComparator" + }; + + _methodName8 = "dynamicQueryCount"; + + _methodParameterTypes8 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName9 = "dynamicQueryCount"; + + _methodParameterTypes9 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", + "com.liferay.portal.kernel.dao.orm.Projection" + }; + + _methodName10 = "fetchComment"; + + _methodParameterTypes10 = new String[] { "long" }; + + _methodName11 = "getComment"; + + _methodParameterTypes11 = new String[] { "long" }; + + _methodName12 = "getPersistedModel"; + + _methodParameterTypes12 = new String[] { "java.io.Serializable" }; + + _methodName13 = "getComments"; + + _methodParameterTypes13 = new String[] { "int", "int" }; + + _methodName14 = "getCommentsCount"; + + _methodParameterTypes14 = new String[] { }; + + _methodName15 = "updateComment"; + + _methodParameterTypes15 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.Comment" + }; + + _methodName16 = "getBeanIdentifier"; + + _methodParameterTypes16 = new String[] { }; + + _methodName17 = "setBeanIdentifier"; + + _methodParameterTypes17 = new String[] { "java.lang.String" }; + + _methodName19 = "addComment"; + + _methodParameterTypes19 = new String[] { + "long", "long", "java.util.Date", "long", "java.lang.String", + "java.lang.String", "long", "long", "boolean", "boolean", + "java.lang.String", "java.lang.String", "boolean" + }; + + _methodName20 = "getCommentsByParentId_TitleId_Verified"; + + _methodParameterTypes20 = new String[] { "long", "long", "boolean" }; + + _methodName21 = "getCommentsByTitleId_Verified"; + + _methodParameterTypes21 = new String[] { "long", "boolean" }; + + _methodName22 = "getCommentsByTitleId"; + + _methodParameterTypes22 = new String[] { "long" }; + + _methodName23 = "deleteCommentsByTitleId"; + + _methodParameterTypes23 = new String[] { "long" }; + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment addComment( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName0, + _methodParameterTypes0, + new Object[] { ClpSerializer.translateInput(comment) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Comment)ClpSerializer.translateOutput(returnObj); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment createComment( + long commentId) { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName1, + _methodParameterTypes1, new Object[] { commentId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Comment)ClpSerializer.translateOutput(returnObj); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment deleteComment( + long commentId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName2, + _methodParameterTypes2, new Object[] { commentId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Comment)ClpSerializer.translateOutput(returnObj); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment deleteComment( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName3, + _methodParameterTypes3, + new Object[] { ClpSerializer.translateInput(comment) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Comment)ClpSerializer.translateOutput(returnObj); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName4, + _methodParameterTypes4, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (com.liferay.portal.kernel.dao.orm.DynamicQuery)ClpSerializer.translateOutput(returnObj); + } + + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName5, + _methodParameterTypes5, + new Object[] { ClpSerializer.translateInput(dynamicQuery) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName6, + _methodParameterTypes6, + new Object[] { + ClpSerializer.translateInput(dynamicQuery), + + start, + + end + }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName7, + _methodParameterTypes7, + new Object[] { + ClpSerializer.translateInput(dynamicQuery), + + start, + + end, + + ClpSerializer.translateInput(orderByComparator) + }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName8, + _methodParameterTypes8, + new Object[] { ClpSerializer.translateInput(dynamicQuery) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Long)returnObj).longValue(); + } + + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName9, + _methodParameterTypes9, + new Object[] { + ClpSerializer.translateInput(dynamicQuery), + + ClpSerializer.translateInput(projection) + }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Long)returnObj).longValue(); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchComment( + long commentId) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName10, + _methodParameterTypes10, new Object[] { commentId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Comment)ClpSerializer.translateOutput(returnObj); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment getComment( + long commentId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName11, + _methodParameterTypes11, new Object[] { commentId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Comment)ClpSerializer.translateOutput(returnObj); + } + + @Override + public com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName12, + _methodParameterTypes12, + new Object[] { ClpSerializer.translateInput(primaryKeyObj) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (com.liferay.portal.model.PersistedModel)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getComments( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName13, + _methodParameterTypes13, new Object[] { start, end }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment>)ClpSerializer.translateOutput(returnObj); + } + + @Override + public int getCommentsCount() + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName14, + _methodParameterTypes14, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Integer)returnObj).intValue(); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment updateComment( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName15, + _methodParameterTypes15, + new Object[] { ClpSerializer.translateInput(comment) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Comment)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.lang.String getBeanIdentifier() { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName16, + _methodParameterTypes16, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.lang.String)ClpSerializer.translateOutput(returnObj); + } + + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + try { + _invokableLocalService.invokeMethod(_methodName17, + _methodParameterTypes17, + new Object[] { ClpSerializer.translateInput(beanIdentifier) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + throw new UnsupportedOperationException(); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment addComment( + long groupId, long companyId, java.util.Date modifiedDate, + long parentId, java.lang.String commentText, + java.lang.String guestName, long likeCount, long titleId, + boolean verified, boolean hasChild, java.lang.String parentName, + java.lang.String guestEmailAddress, boolean guestEmailNotification) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName19, + _methodParameterTypes19, + new Object[] { + groupId, + + companyId, + + ClpSerializer.translateInput(modifiedDate), + + parentId, + + ClpSerializer.translateInput(commentText), + + ClpSerializer.translateInput(guestName), + + likeCount, + + titleId, + + verified, + + hasChild, + + ClpSerializer.translateInput(parentName), + + ClpSerializer.translateInput(guestEmailAddress), + + guestEmailNotification + }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Comment)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getCommentsByParentId_TitleId_Verified( + long parentId, long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName20, + _methodParameterTypes20, + new Object[] { parentId, titleId, verified }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment>)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getCommentsByTitleId_Verified( + long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName21, + _methodParameterTypes21, new Object[] { titleId, verified }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment>)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getCommentsByTitleId( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName22, + _methodParameterTypes22, new Object[] { titleId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment>)ClpSerializer.translateOutput(returnObj); + } + + @Override + public void deleteCommentsByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + try { + _invokableLocalService.invokeMethod(_methodName23, + _methodParameterTypes23, new Object[] { titleId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + } + + private InvokableLocalService _invokableLocalService; + private String _methodName0; + private String[] _methodParameterTypes0; + private String _methodName1; + private String[] _methodParameterTypes1; + private String _methodName2; + private String[] _methodParameterTypes2; + private String _methodName3; + private String[] _methodParameterTypes3; + private String _methodName4; + private String[] _methodParameterTypes4; + private String _methodName5; + private String[] _methodParameterTypes5; + private String _methodName6; + private String[] _methodParameterTypes6; + private String _methodName7; + private String[] _methodParameterTypes7; + private String _methodName8; + private String[] _methodParameterTypes8; + private String _methodName9; + private String[] _methodParameterTypes9; + private String _methodName10; + private String[] _methodParameterTypes10; + private String _methodName11; + private String[] _methodParameterTypes11; + private String _methodName12; + private String[] _methodParameterTypes12; + private String _methodName13; + private String[] _methodParameterTypes13; + private String _methodName14; + private String[] _methodParameterTypes14; + private String _methodName15; + private String[] _methodParameterTypes15; + private String _methodName16; + private String[] _methodParameterTypes16; + private String _methodName17; + private String[] _methodParameterTypes17; + private String _methodName19; + private String[] _methodParameterTypes19; + private String _methodName20; + private String[] _methodParameterTypes20; + private String _methodName21; + private String[] _methodParameterTypes21; + private String _methodName22; + private String[] _methodParameterTypes22; + private String _methodName23; + private String[] _methodParameterTypes23; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentLocalServiceUtil.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentLocalServiceUtil.java new file mode 100644 index 0000000..9cfbdd6 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentLocalServiceUtil.java @@ -0,0 +1,346 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; +import com.liferay.portal.kernel.util.ReferenceRegistry; +import com.liferay.portal.service.InvokableLocalService; + +/** + * Provides the local service utility for Comment. This utility wraps + * {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentLocalServiceImpl} and is the + * primary access point for service operations in application layer code running + * on the local server. Methods of this service will not have security checks + * based on the propagated JAAS credentials because this service can only be + * accessed from within the same VM. + * + * @author Alireza + * @see CommentLocalService + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.CommentLocalServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentLocalServiceImpl + * @generated + */ +public class CommentLocalServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Adds the comment to the database. Also notifies the appropriate model listeners. + * + * @param comment the comment + * @return the comment that was added + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment addComment( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().addComment(comment); + } + + /** + * Creates a new comment with the primary key. Does not add the comment to the database. + * + * @param commentId the primary key for the new comment + * @return the new comment + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment createComment( + long commentId) { + return getService().createComment(commentId); + } + + /** + * Deletes the comment with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param commentId the primary key of the comment + * @return the comment that was removed + * @throws PortalException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment deleteComment( + long commentId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService().deleteComment(commentId); + } + + /** + * Deletes the comment from the database. Also notifies the appropriate model listeners. + * + * @param comment the comment + * @return the comment that was removed + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment deleteComment( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().deleteComment(comment); + } + + public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return getService().dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getService() + .dynamicQuery(dynamicQuery, start, end, orderByComparator); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQueryCount(dynamicQuery, projection); + } + + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchComment( + long commentId) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().fetchComment(commentId); + } + + /** + * Returns the comment with the primary key. + * + * @param commentId the primary key of the comment + * @return the comment + * @throws PortalException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment getComment( + long commentId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService().getComment(commentId); + } + + public static com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService().getPersistedModel(primaryKeyObj); + } + + /** + * Returns a range of all the comments. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of comments + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getComments( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getComments(start, end); + } + + /** + * Returns the number of comments. + * + * @return the number of comments + * @throws SystemException if a system exception occurred + */ + public static int getCommentsCount() + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getCommentsCount(); + } + + /** + * Updates the comment in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param comment the comment + * @return the comment that was updated + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment updateComment( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().updateComment(comment); + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public static java.lang.String getBeanIdentifier() { + return getService().getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public static void setBeanIdentifier(java.lang.String beanIdentifier) { + getService().setBeanIdentifier(beanIdentifier); + } + + public static java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return getService().invokeMethod(name, parameterTypes, arguments); + } + + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment addComment( + long groupId, long companyId, java.util.Date modifiedDate, + long parentId, java.lang.String commentText, + java.lang.String guestName, long likeCount, long titleId, + boolean verified, boolean hasChild, java.lang.String parentName, + java.lang.String guestEmailAddress, boolean guestEmailNotification) + throws com.liferay.portal.kernel.exception.SystemException { + return getService() + .addComment(groupId, companyId, modifiedDate, parentId, + commentText, guestName, likeCount, titleId, verified, hasChild, + parentName, guestEmailAddress, guestEmailNotification); + } + + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getCommentsByParentId_TitleId_Verified( + long parentId, long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException { + return getService() + .getCommentsByParentId_TitleId_Verified(parentId, titleId, + verified); + } + + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getCommentsByTitleId_Verified( + long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getCommentsByTitleId_Verified(titleId, verified); + } + + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getCommentsByTitleId( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getCommentsByTitleId(titleId); + } + + public static void deleteCommentsByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + getService().deleteCommentsByTitleId(titleId); + } + + public static void clearService() { + _service = null; + } + + public static CommentLocalService getService() { + if (_service == null) { + InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), + CommentLocalService.class.getName()); + + if (invokableLocalService instanceof CommentLocalService) { + _service = (CommentLocalService)invokableLocalService; + } + else { + _service = new CommentLocalServiceClp(invokableLocalService); + } + + ReferenceRegistry.registerReference(CommentLocalServiceUtil.class, + "_service"); + } + + return _service; + } + + /** + * @deprecated As of 6.2.0 + */ + public void setService(CommentLocalService service) { + } + + private static CommentLocalService _service; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentLocalServiceWrapper.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentLocalServiceWrapper.java new file mode 100644 index 0000000..d79a0dc --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentLocalServiceWrapper.java @@ -0,0 +1,356 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link CommentLocalService}. + * + * @author Alireza + * @see CommentLocalService + * @generated + */ +public class CommentLocalServiceWrapper implements CommentLocalService, + ServiceWrapper<CommentLocalService> { + public CommentLocalServiceWrapper(CommentLocalService commentLocalService) { + _commentLocalService = commentLocalService; + } + + /** + * Adds the comment to the database. Also notifies the appropriate model listeners. + * + * @param comment the comment + * @return the comment that was added + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment addComment( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.addComment(comment); + } + + /** + * Creates a new comment with the primary key. Does not add the comment to the database. + * + * @param commentId the primary key for the new comment + * @return the new comment + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment createComment( + long commentId) { + return _commentLocalService.createComment(commentId); + } + + /** + * Deletes the comment with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param commentId the primary key of the comment + * @return the comment that was removed + * @throws PortalException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment deleteComment( + long commentId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.deleteComment(commentId); + } + + /** + * Deletes the comment from the database. Also notifies the appropriate model listeners. + * + * @param comment the comment + * @return the comment that was removed + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment deleteComment( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.deleteComment(comment); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return _commentLocalService.dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.dynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.dynamicQueryCount(dynamicQuery, projection); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchComment( + long commentId) + throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.fetchComment(commentId); + } + + /** + * Returns the comment with the primary key. + * + * @param commentId the primary key of the comment + * @return the comment + * @throws PortalException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment getComment( + long commentId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.getComment(commentId); + } + + @Override + public com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.getPersistedModel(primaryKeyObj); + } + + /** + * Returns a range of all the comments. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of comments + * @throws SystemException if a system exception occurred + */ + @Override + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getComments( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.getComments(start, end); + } + + /** + * Returns the number of comments. + * + * @return the number of comments + * @throws SystemException if a system exception occurred + */ + @Override + public int getCommentsCount() + throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.getCommentsCount(); + } + + /** + * Updates the comment in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param comment the comment + * @return the comment that was updated + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment updateComment( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.updateComment(comment); + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public java.lang.String getBeanIdentifier() { + return _commentLocalService.getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + _commentLocalService.setBeanIdentifier(beanIdentifier); + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return _commentLocalService.invokeMethod(name, parameterTypes, arguments); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Comment addComment( + long groupId, long companyId, java.util.Date modifiedDate, + long parentId, java.lang.String commentText, + java.lang.String guestName, long likeCount, long titleId, + boolean verified, boolean hasChild, java.lang.String parentName, + java.lang.String guestEmailAddress, boolean guestEmailNotification) + throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.addComment(groupId, companyId, + modifiedDate, parentId, commentText, guestName, likeCount, titleId, + verified, hasChild, parentName, guestEmailAddress, + guestEmailNotification); + } + + @Override + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getCommentsByParentId_TitleId_Verified( + long parentId, long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.getCommentsByParentId_TitleId_Verified(parentId, + titleId, verified); + } + + @Override + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getCommentsByTitleId_Verified( + long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.getCommentsByTitleId_Verified(titleId, + verified); + } + + @Override + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> getCommentsByTitleId( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + return _commentLocalService.getCommentsByTitleId(titleId); + } + + @Override + public void deleteCommentsByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + _commentLocalService.deleteCommentsByTitleId(titleId); + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} + */ + public CommentLocalService getWrappedCommentLocalService() { + return _commentLocalService; + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} + */ + public void setWrappedCommentLocalService( + CommentLocalService commentLocalService) { + _commentLocalService = commentLocalService; + } + + @Override + public CommentLocalService getWrappedService() { + return _commentLocalService; + } + + @Override + public void setWrappedService(CommentLocalService commentLocalService) { + _commentLocalService = commentLocalService; + } + + private CommentLocalService _commentLocalService; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentService.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentService.java new file mode 100644 index 0000000..f33e204 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentService.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.jsonwebservice.JSONWebService; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.security.ac.AccessControlled; +import com.liferay.portal.service.BaseService; +import com.liferay.portal.service.InvokableService; + +/** + * Provides the remote service interface for Comment. Methods of this + * service are expected to have security checks based on the propagated JAAS + * credentials because this service can be accessed remotely. + * + * @author Alireza + * @see CommentServiceUtil + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.CommentServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentServiceImpl + * @generated + */ +@AccessControlled +@JSONWebService +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface CommentService extends BaseService, InvokableService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link CommentServiceUtil} to access the comment remote service. Add custom service methods to {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public java.lang.String getBeanIdentifier(); + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public void setBeanIdentifier(java.lang.String beanIdentifier); + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentServiceClp.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentServiceClp.java new file mode 100644 index 0000000..8837da3 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentServiceClp.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.service.InvokableService; + +/** + * @author Alireza + * @generated + */ +public class CommentServiceClp implements CommentService { + public CommentServiceClp(InvokableService invokableService) { + _invokableService = invokableService; + + _methodName0 = "getBeanIdentifier"; + + _methodParameterTypes0 = new String[] { }; + + _methodName1 = "setBeanIdentifier"; + + _methodParameterTypes1 = new String[] { "java.lang.String" }; + } + + @Override + public java.lang.String getBeanIdentifier() { + Object returnObj = null; + + try { + returnObj = _invokableService.invokeMethod(_methodName0, + _methodParameterTypes0, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.lang.String)ClpSerializer.translateOutput(returnObj); + } + + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + try { + _invokableService.invokeMethod(_methodName1, + _methodParameterTypes1, + new Object[] { ClpSerializer.translateInput(beanIdentifier) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + throw new UnsupportedOperationException(); + } + + private InvokableService _invokableService; + private String _methodName0; + private String[] _methodParameterTypes0; + private String _methodName1; + private String[] _methodParameterTypes1; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentServiceUtil.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentServiceUtil.java new file mode 100644 index 0000000..4555b95 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentServiceUtil.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; +import com.liferay.portal.kernel.util.ReferenceRegistry; +import com.liferay.portal.service.InvokableService; + +/** + * Provides the remote service utility for Comment. This utility wraps + * {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentServiceImpl} and is the + * primary access point for service operations in application layer code running + * on a remote server. Methods of this service are expected to have security + * checks based on the propagated JAAS credentials because this service can be + * accessed remotely. + * + * @author Alireza + * @see CommentService + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.CommentServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentServiceImpl + * @generated + */ +public class CommentServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public static java.lang.String getBeanIdentifier() { + return getService().getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public static void setBeanIdentifier(java.lang.String beanIdentifier) { + getService().setBeanIdentifier(beanIdentifier); + } + + public static java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return getService().invokeMethod(name, parameterTypes, arguments); + } + + public static void clearService() { + _service = null; + } + + public static CommentService getService() { + if (_service == null) { + InvokableService invokableService = (InvokableService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), + CommentService.class.getName()); + + if (invokableService instanceof CommentService) { + _service = (CommentService)invokableService; + } + else { + _service = new CommentServiceClp(invokableService); + } + + ReferenceRegistry.registerReference(CommentServiceUtil.class, + "_service"); + } + + return _service; + } + + /** + * @deprecated As of 6.2.0 + */ + public void setService(CommentService service) { + } + + private static CommentService _service; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentServiceWrapper.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentServiceWrapper.java new file mode 100644 index 0000000..7fc7e30 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/CommentServiceWrapper.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link CommentService}. + * + * @author Alireza + * @see CommentService + * @generated + */ +public class CommentServiceWrapper implements CommentService, + ServiceWrapper<CommentService> { + public CommentServiceWrapper(CommentService commentService) { + _commentService = commentService; + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public java.lang.String getBeanIdentifier() { + return _commentService.getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + _commentService.setBeanIdentifier(beanIdentifier); + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return _commentService.invokeMethod(name, parameterTypes, arguments); + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} + */ + public CommentService getWrappedCommentService() { + return _commentService; + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} + */ + public void setWrappedCommentService(CommentService commentService) { + _commentService = commentService; + } + + @Override + public CommentService getWrappedService() { + return _commentService; + } + + @Override + public void setWrappedService(CommentService commentService) { + _commentService = commentService; + } + + private CommentService _commentService; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleLocalService.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleLocalService.java new file mode 100644 index 0000000..fdea22d --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleLocalService.java @@ -0,0 +1,259 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Propagation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.service.BaseLocalService; +import com.liferay.portal.service.InvokableLocalService; +import com.liferay.portal.service.PersistedModelLocalService; + +/** + * Provides the local service interface for PortletTitle. Methods of this + * service will not have security checks based on the propagated JAAS + * credentials because this service can only be accessed from within the same + * VM. + * + * @author Alireza + * @see PortletTitleLocalServiceUtil + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.PortletTitleLocalServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleLocalServiceImpl + * @generated + */ +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface PortletTitleLocalService extends BaseLocalService, + InvokableLocalService, PersistedModelLocalService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link PortletTitleLocalServiceUtil} to access the portlet title local service. Add custom service methods to {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Adds the portlet title to the database. Also notifies the appropriate model listeners. + * + * @param portletTitle the portlet title + * @return the portlet title that was added + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle addPortletTitle( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Creates a new portlet title with the primary key. Does not add the portlet title to the database. + * + * @param portletId the primary key for the new portlet title + * @return the new portlet title + */ + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle createPortletTitle( + java.lang.String portletId); + + /** + * Deletes the portlet title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param portletId the primary key of the portlet title + * @return the portlet title that was removed + * @throws PortalException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle deletePortletTitle( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + /** + * Deletes the portlet title from the database. Also notifies the appropriate model listeners. + * + * @param portletTitle the portlet title + * @return the portlet title that was removed + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle deletePortletTitle( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws com.liferay.portal.kernel.exception.SystemException; + + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle fetchPortletTitle( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the portlet title with the primary key. + * + * @param portletId the primary key of the portlet title + * @return the portlet title + * @throws PortalException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle getPortletTitle( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + @Override + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns a range of all the portlet titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @return the range of portlet titles + * @throws SystemException if a system exception occurred + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> getPortletTitles( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of portlet titles. + * + * @return the number of portlet titles + * @throws SystemException if a system exception occurred + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getPortletTitlesCount() + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Updates the portlet title in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param portletTitle the portlet title + * @return the portlet title that was updated + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle updatePortletTitle( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public java.lang.String getBeanIdentifier(); + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public void setBeanIdentifier(java.lang.String beanIdentifier); + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable; + + public void deletePortletTitleByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleLocalServiceClp.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleLocalServiceClp.java new file mode 100644 index 0000000..da1878a --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleLocalServiceClp.java @@ -0,0 +1,740 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.service.InvokableLocalService; + +/** + * @author Alireza + * @generated + */ +public class PortletTitleLocalServiceClp implements PortletTitleLocalService { + public PortletTitleLocalServiceClp( + InvokableLocalService invokableLocalService) { + _invokableLocalService = invokableLocalService; + + _methodName0 = "addPortletTitle"; + + _methodParameterTypes0 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle" + }; + + _methodName1 = "createPortletTitle"; + + _methodParameterTypes1 = new String[] { "java.lang.String" }; + + _methodName2 = "deletePortletTitle"; + + _methodParameterTypes2 = new String[] { "java.lang.String" }; + + _methodName3 = "deletePortletTitle"; + + _methodParameterTypes3 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle" + }; + + _methodName4 = "dynamicQuery"; + + _methodParameterTypes4 = new String[] { }; + + _methodName5 = "dynamicQuery"; + + _methodParameterTypes5 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName6 = "dynamicQuery"; + + _methodParameterTypes6 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int" + }; + + _methodName7 = "dynamicQuery"; + + _methodParameterTypes7 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int", + "com.liferay.portal.kernel.util.OrderByComparator" + }; + + _methodName8 = "dynamicQueryCount"; + + _methodParameterTypes8 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName9 = "dynamicQueryCount"; + + _methodParameterTypes9 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", + "com.liferay.portal.kernel.dao.orm.Projection" + }; + + _methodName10 = "fetchPortletTitle"; + + _methodParameterTypes10 = new String[] { "java.lang.String" }; + + _methodName11 = "getPortletTitle"; + + _methodParameterTypes11 = new String[] { "java.lang.String" }; + + _methodName12 = "getPersistedModel"; + + _methodParameterTypes12 = new String[] { "java.io.Serializable" }; + + _methodName13 = "getPortletTitles"; + + _methodParameterTypes13 = new String[] { "int", "int" }; + + _methodName14 = "getPortletTitlesCount"; + + _methodParameterTypes14 = new String[] { }; + + _methodName15 = "updatePortletTitle"; + + _methodParameterTypes15 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle" + }; + + _methodName16 = "getBeanIdentifier"; + + _methodParameterTypes16 = new String[] { }; + + _methodName17 = "setBeanIdentifier"; + + _methodParameterTypes17 = new String[] { "java.lang.String" }; + + _methodName19 = "deletePortletTitleByTitleId"; + + _methodParameterTypes19 = new String[] { "long" }; + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle addPortletTitle( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName0, + _methodParameterTypes0, + new Object[] { ClpSerializer.translateInput(portletTitle) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle)ClpSerializer.translateOutput(returnObj); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle createPortletTitle( + java.lang.String portletId) { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName1, + _methodParameterTypes1, + new Object[] { ClpSerializer.translateInput(portletId) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle)ClpSerializer.translateOutput(returnObj); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle deletePortletTitle( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName2, + _methodParameterTypes2, + new Object[] { ClpSerializer.translateInput(portletId) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle)ClpSerializer.translateOutput(returnObj); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle deletePortletTitle( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName3, + _methodParameterTypes3, + new Object[] { ClpSerializer.translateInput(portletTitle) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle)ClpSerializer.translateOutput(returnObj); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName4, + _methodParameterTypes4, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (com.liferay.portal.kernel.dao.orm.DynamicQuery)ClpSerializer.translateOutput(returnObj); + } + + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName5, + _methodParameterTypes5, + new Object[] { ClpSerializer.translateInput(dynamicQuery) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName6, + _methodParameterTypes6, + new Object[] { + ClpSerializer.translateInput(dynamicQuery), + + start, + + end + }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName7, + _methodParameterTypes7, + new Object[] { + ClpSerializer.translateInput(dynamicQuery), + + start, + + end, + + ClpSerializer.translateInput(orderByComparator) + }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName8, + _methodParameterTypes8, + new Object[] { ClpSerializer.translateInput(dynamicQuery) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Long)returnObj).longValue(); + } + + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName9, + _methodParameterTypes9, + new Object[] { + ClpSerializer.translateInput(dynamicQuery), + + ClpSerializer.translateInput(projection) + }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Long)returnObj).longValue(); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle fetchPortletTitle( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName10, + _methodParameterTypes10, + new Object[] { ClpSerializer.translateInput(portletId) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle)ClpSerializer.translateOutput(returnObj); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle getPortletTitle( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName11, + _methodParameterTypes11, + new Object[] { ClpSerializer.translateInput(portletId) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle)ClpSerializer.translateOutput(returnObj); + } + + @Override + public com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName12, + _methodParameterTypes12, + new Object[] { ClpSerializer.translateInput(primaryKeyObj) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (com.liferay.portal.model.PersistedModel)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> getPortletTitles( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName13, + _methodParameterTypes13, new Object[] { start, end }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle>)ClpSerializer.translateOutput(returnObj); + } + + @Override + public int getPortletTitlesCount() + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName14, + _methodParameterTypes14, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Integer)returnObj).intValue(); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle updatePortletTitle( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName15, + _methodParameterTypes15, + new Object[] { ClpSerializer.translateInput(portletTitle) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.lang.String getBeanIdentifier() { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName16, + _methodParameterTypes16, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.lang.String)ClpSerializer.translateOutput(returnObj); + } + + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + try { + _invokableLocalService.invokeMethod(_methodName17, + _methodParameterTypes17, + new Object[] { ClpSerializer.translateInput(beanIdentifier) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + throw new UnsupportedOperationException(); + } + + @Override + public void deletePortletTitleByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + try { + _invokableLocalService.invokeMethod(_methodName19, + _methodParameterTypes19, new Object[] { titleId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + } + + private InvokableLocalService _invokableLocalService; + private String _methodName0; + private String[] _methodParameterTypes0; + private String _methodName1; + private String[] _methodParameterTypes1; + private String _methodName2; + private String[] _methodParameterTypes2; + private String _methodName3; + private String[] _methodParameterTypes3; + private String _methodName4; + private String[] _methodParameterTypes4; + private String _methodName5; + private String[] _methodParameterTypes5; + private String _methodName6; + private String[] _methodParameterTypes6; + private String _methodName7; + private String[] _methodParameterTypes7; + private String _methodName8; + private String[] _methodParameterTypes8; + private String _methodName9; + private String[] _methodParameterTypes9; + private String _methodName10; + private String[] _methodParameterTypes10; + private String _methodName11; + private String[] _methodParameterTypes11; + private String _methodName12; + private String[] _methodParameterTypes12; + private String _methodName13; + private String[] _methodParameterTypes13; + private String _methodName14; + private String[] _methodParameterTypes14; + private String _methodName15; + private String[] _methodParameterTypes15; + private String _methodName16; + private String[] _methodParameterTypes16; + private String _methodName17; + private String[] _methodParameterTypes17; + private String _methodName19; + private String[] _methodParameterTypes19; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleLocalServiceUtil.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleLocalServiceUtil.java new file mode 100644 index 0000000..b006d0d --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleLocalServiceUtil.java @@ -0,0 +1,313 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; +import com.liferay.portal.kernel.util.ReferenceRegistry; +import com.liferay.portal.service.InvokableLocalService; + +/** + * Provides the local service utility for PortletTitle. This utility wraps + * {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleLocalServiceImpl} and is the + * primary access point for service operations in application layer code running + * on the local server. Methods of this service will not have security checks + * based on the propagated JAAS credentials because this service can only be + * accessed from within the same VM. + * + * @author Alireza + * @see PortletTitleLocalService + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.PortletTitleLocalServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleLocalServiceImpl + * @generated + */ +public class PortletTitleLocalServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Adds the portlet title to the database. Also notifies the appropriate model listeners. + * + * @param portletTitle the portlet title + * @return the portlet title that was added + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle addPortletTitle( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().addPortletTitle(portletTitle); + } + + /** + * Creates a new portlet title with the primary key. Does not add the portlet title to the database. + * + * @param portletId the primary key for the new portlet title + * @return the new portlet title + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle createPortletTitle( + java.lang.String portletId) { + return getService().createPortletTitle(portletId); + } + + /** + * Deletes the portlet title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param portletId the primary key of the portlet title + * @return the portlet title that was removed + * @throws PortalException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle deletePortletTitle( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService().deletePortletTitle(portletId); + } + + /** + * Deletes the portlet title from the database. Also notifies the appropriate model listeners. + * + * @param portletTitle the portlet title + * @return the portlet title that was removed + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle deletePortletTitle( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().deletePortletTitle(portletTitle); + } + + public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return getService().dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getService() + .dynamicQuery(dynamicQuery, start, end, orderByComparator); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQueryCount(dynamicQuery, projection); + } + + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle fetchPortletTitle( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().fetchPortletTitle(portletId); + } + + /** + * Returns the portlet title with the primary key. + * + * @param portletId the primary key of the portlet title + * @return the portlet title + * @throws PortalException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle getPortletTitle( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService().getPortletTitle(portletId); + } + + public static com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService().getPersistedModel(primaryKeyObj); + } + + /** + * Returns a range of all the portlet titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @return the range of portlet titles + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> getPortletTitles( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getPortletTitles(start, end); + } + + /** + * Returns the number of portlet titles. + * + * @return the number of portlet titles + * @throws SystemException if a system exception occurred + */ + public static int getPortletTitlesCount() + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getPortletTitlesCount(); + } + + /** + * Updates the portlet title in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param portletTitle the portlet title + * @return the portlet title that was updated + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle updatePortletTitle( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().updatePortletTitle(portletTitle); + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public static java.lang.String getBeanIdentifier() { + return getService().getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public static void setBeanIdentifier(java.lang.String beanIdentifier) { + getService().setBeanIdentifier(beanIdentifier); + } + + public static java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return getService().invokeMethod(name, parameterTypes, arguments); + } + + public static void deletePortletTitleByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + getService().deletePortletTitleByTitleId(titleId); + } + + public static void clearService() { + _service = null; + } + + public static PortletTitleLocalService getService() { + if (_service == null) { + InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), + PortletTitleLocalService.class.getName()); + + if (invokableLocalService instanceof PortletTitleLocalService) { + _service = (PortletTitleLocalService)invokableLocalService; + } + else { + _service = new PortletTitleLocalServiceClp(invokableLocalService); + } + + ReferenceRegistry.registerReference(PortletTitleLocalServiceUtil.class, + "_service"); + } + + return _service; + } + + /** + * @deprecated As of 6.2.0 + */ + public void setService(PortletTitleLocalService service) { + } + + private static PortletTitleLocalService _service; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleLocalServiceWrapper.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleLocalServiceWrapper.java new file mode 100644 index 0000000..5c1dfc0 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleLocalServiceWrapper.java @@ -0,0 +1,323 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link PortletTitleLocalService}. + * + * @author Alireza + * @see PortletTitleLocalService + * @generated + */ +public class PortletTitleLocalServiceWrapper implements PortletTitleLocalService, + ServiceWrapper<PortletTitleLocalService> { + public PortletTitleLocalServiceWrapper( + PortletTitleLocalService portletTitleLocalService) { + _portletTitleLocalService = portletTitleLocalService; + } + + /** + * Adds the portlet title to the database. Also notifies the appropriate model listeners. + * + * @param portletTitle the portlet title + * @return the portlet title that was added + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle addPortletTitle( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws com.liferay.portal.kernel.exception.SystemException { + return _portletTitleLocalService.addPortletTitle(portletTitle); + } + + /** + * Creates a new portlet title with the primary key. Does not add the portlet title to the database. + * + * @param portletId the primary key for the new portlet title + * @return the new portlet title + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle createPortletTitle( + java.lang.String portletId) { + return _portletTitleLocalService.createPortletTitle(portletId); + } + + /** + * Deletes the portlet title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param portletId the primary key of the portlet title + * @return the portlet title that was removed + * @throws PortalException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle deletePortletTitle( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _portletTitleLocalService.deletePortletTitle(portletId); + } + + /** + * Deletes the portlet title from the database. Also notifies the appropriate model listeners. + * + * @param portletTitle the portlet title + * @return the portlet title that was removed + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle deletePortletTitle( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws com.liferay.portal.kernel.exception.SystemException { + return _portletTitleLocalService.deletePortletTitle(portletTitle); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return _portletTitleLocalService.dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return _portletTitleLocalService.dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException { + return _portletTitleLocalService.dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return _portletTitleLocalService.dynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return _portletTitleLocalService.dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException { + return _portletTitleLocalService.dynamicQueryCount(dynamicQuery, + projection); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle fetchPortletTitle( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.SystemException { + return _portletTitleLocalService.fetchPortletTitle(portletId); + } + + /** + * Returns the portlet title with the primary key. + * + * @param portletId the primary key of the portlet title + * @return the portlet title + * @throws PortalException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle getPortletTitle( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _portletTitleLocalService.getPortletTitle(portletId); + } + + @Override + public com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _portletTitleLocalService.getPersistedModel(primaryKeyObj); + } + + /** + * Returns a range of all the portlet titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @return the range of portlet titles + * @throws SystemException if a system exception occurred + */ + @Override + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> getPortletTitles( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return _portletTitleLocalService.getPortletTitles(start, end); + } + + /** + * Returns the number of portlet titles. + * + * @return the number of portlet titles + * @throws SystemException if a system exception occurred + */ + @Override + public int getPortletTitlesCount() + throws com.liferay.portal.kernel.exception.SystemException { + return _portletTitleLocalService.getPortletTitlesCount(); + } + + /** + * Updates the portlet title in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param portletTitle the portlet title + * @return the portlet title that was updated + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle updatePortletTitle( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws com.liferay.portal.kernel.exception.SystemException { + return _portletTitleLocalService.updatePortletTitle(portletTitle); + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public java.lang.String getBeanIdentifier() { + return _portletTitleLocalService.getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + _portletTitleLocalService.setBeanIdentifier(beanIdentifier); + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return _portletTitleLocalService.invokeMethod(name, parameterTypes, + arguments); + } + + @Override + public void deletePortletTitleByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + _portletTitleLocalService.deletePortletTitleByTitleId(titleId); + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} + */ + public PortletTitleLocalService getWrappedPortletTitleLocalService() { + return _portletTitleLocalService; + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} + */ + public void setWrappedPortletTitleLocalService( + PortletTitleLocalService portletTitleLocalService) { + _portletTitleLocalService = portletTitleLocalService; + } + + @Override + public PortletTitleLocalService getWrappedService() { + return _portletTitleLocalService; + } + + @Override + public void setWrappedService( + PortletTitleLocalService portletTitleLocalService) { + _portletTitleLocalService = portletTitleLocalService; + } + + private PortletTitleLocalService _portletTitleLocalService; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleService.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleService.java new file mode 100644 index 0000000..840f134 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleService.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.jsonwebservice.JSONWebService; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.security.ac.AccessControlled; +import com.liferay.portal.service.BaseService; +import com.liferay.portal.service.InvokableService; + +/** + * Provides the remote service interface for PortletTitle. Methods of this + * service are expected to have security checks based on the propagated JAAS + * credentials because this service can be accessed remotely. + * + * @author Alireza + * @see PortletTitleServiceUtil + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.PortletTitleServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleServiceImpl + * @generated + */ +@AccessControlled +@JSONWebService +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface PortletTitleService extends BaseService, InvokableService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link PortletTitleServiceUtil} to access the portlet title remote service. Add custom service methods to {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public java.lang.String getBeanIdentifier(); + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public void setBeanIdentifier(java.lang.String beanIdentifier); + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleServiceClp.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleServiceClp.java new file mode 100644 index 0000000..27a9ada --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleServiceClp.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.service.InvokableService; + +/** + * @author Alireza + * @generated + */ +public class PortletTitleServiceClp implements PortletTitleService { + public PortletTitleServiceClp(InvokableService invokableService) { + _invokableService = invokableService; + + _methodName0 = "getBeanIdentifier"; + + _methodParameterTypes0 = new String[] { }; + + _methodName1 = "setBeanIdentifier"; + + _methodParameterTypes1 = new String[] { "java.lang.String" }; + } + + @Override + public java.lang.String getBeanIdentifier() { + Object returnObj = null; + + try { + returnObj = _invokableService.invokeMethod(_methodName0, + _methodParameterTypes0, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.lang.String)ClpSerializer.translateOutput(returnObj); + } + + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + try { + _invokableService.invokeMethod(_methodName1, + _methodParameterTypes1, + new Object[] { ClpSerializer.translateInput(beanIdentifier) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + throw new UnsupportedOperationException(); + } + + private InvokableService _invokableService; + private String _methodName0; + private String[] _methodParameterTypes0; + private String _methodName1; + private String[] _methodParameterTypes1; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleServiceUtil.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleServiceUtil.java new file mode 100644 index 0000000..92dc078 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleServiceUtil.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; +import com.liferay.portal.kernel.util.ReferenceRegistry; +import com.liferay.portal.service.InvokableService; + +/** + * Provides the remote service utility for PortletTitle. This utility wraps + * {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleServiceImpl} and is the + * primary access point for service operations in application layer code running + * on a remote server. Methods of this service are expected to have security + * checks based on the propagated JAAS credentials because this service can be + * accessed remotely. + * + * @author Alireza + * @see PortletTitleService + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.PortletTitleServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleServiceImpl + * @generated + */ +public class PortletTitleServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public static java.lang.String getBeanIdentifier() { + return getService().getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public static void setBeanIdentifier(java.lang.String beanIdentifier) { + getService().setBeanIdentifier(beanIdentifier); + } + + public static java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return getService().invokeMethod(name, parameterTypes, arguments); + } + + public static void clearService() { + _service = null; + } + + public static PortletTitleService getService() { + if (_service == null) { + InvokableService invokableService = (InvokableService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), + PortletTitleService.class.getName()); + + if (invokableService instanceof PortletTitleService) { + _service = (PortletTitleService)invokableService; + } + else { + _service = new PortletTitleServiceClp(invokableService); + } + + ReferenceRegistry.registerReference(PortletTitleServiceUtil.class, + "_service"); + } + + return _service; + } + + /** + * @deprecated As of 6.2.0 + */ + public void setService(PortletTitleService service) { + } + + private static PortletTitleService _service; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleServiceWrapper.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleServiceWrapper.java new file mode 100644 index 0000000..92514a0 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/PortletTitleServiceWrapper.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link PortletTitleService}. + * + * @author Alireza + * @see PortletTitleService + * @generated + */ +public class PortletTitleServiceWrapper implements PortletTitleService, + ServiceWrapper<PortletTitleService> { + public PortletTitleServiceWrapper(PortletTitleService portletTitleService) { + _portletTitleService = portletTitleService; + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public java.lang.String getBeanIdentifier() { + return _portletTitleService.getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + _portletTitleService.setBeanIdentifier(beanIdentifier); + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return _portletTitleService.invokeMethod(name, parameterTypes, arguments); + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} + */ + public PortletTitleService getWrappedPortletTitleService() { + return _portletTitleService; + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} + */ + public void setWrappedPortletTitleService( + PortletTitleService portletTitleService) { + _portletTitleService = portletTitleService; + } + + @Override + public PortletTitleService getWrappedService() { + return _portletTitleService; + } + + @Override + public void setWrappedService(PortletTitleService portletTitleService) { + _portletTitleService = portletTitleService; + } + + private PortletTitleService _portletTitleService; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleLocalService.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleLocalService.java new file mode 100644 index 0000000..c95cc59 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleLocalService.java @@ -0,0 +1,267 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Propagation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.service.BaseLocalService; +import com.liferay.portal.service.InvokableLocalService; +import com.liferay.portal.service.PersistedModelLocalService; + +/** + * Provides the local service interface for Title. Methods of this + * service will not have security checks based on the propagated JAAS + * credentials because this service can only be accessed from within the same + * VM. + * + * @author Alireza + * @see TitleLocalServiceUtil + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.TitleLocalServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleLocalServiceImpl + * @generated + */ +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface TitleLocalService extends BaseLocalService, + InvokableLocalService, PersistedModelLocalService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link TitleLocalServiceUtil} to access the title local service. Add custom service methods to {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Adds the title to the database. Also notifies the appropriate model listeners. + * + * @param title the title + * @return the title that was added + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) + public ir.ac.iut.sccportal.guestdiscussion.model.Title addTitle( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Creates a new title with the primary key. Does not add the title to the database. + * + * @param titleId the primary key for the new title + * @return the new title + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Title createTitle( + long titleId); + + /** + * Deletes the title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param titleId the primary key of the title + * @return the title that was removed + * @throws PortalException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) + public ir.ac.iut.sccportal.guestdiscussion.model.Title deleteTitle( + long titleId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + /** + * Deletes the title from the database. Also notifies the appropriate model listeners. + * + * @param title the title + * @return the title that was removed + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) + public ir.ac.iut.sccportal.guestdiscussion.model.Title deleteTitle( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws com.liferay.portal.kernel.exception.SystemException; + + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ir.ac.iut.sccportal.guestdiscussion.model.Title fetchTitle( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the title with the primary key. + * + * @param titleId the primary key of the title + * @return the title + * @throws PortalException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ir.ac.iut.sccportal.guestdiscussion.model.Title getTitle( + long titleId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + @Override + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns a range of all the titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @return the range of titles + * @throws SystemException if a system exception occurred + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> getTitles( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of titles. + * + * @return the number of titles + * @throws SystemException if a system exception occurred + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getTitlesCount() + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Updates the title in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param title the title + * @return the title that was updated + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) + public ir.ac.iut.sccportal.guestdiscussion.model.Title updateTitle( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public java.lang.String getBeanIdentifier(); + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public void setBeanIdentifier(java.lang.String beanIdentifier); + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable; + + public ir.ac.iut.sccportal.guestdiscussion.model.Title addTitle( + long groupId, long companyId, long userId, java.lang.String userName, + java.lang.String titleText) + throws com.liferay.portal.NoSuchUserException, + com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> getTitlesByCompanyId( + long companyId) + throws com.liferay.portal.kernel.exception.SystemException; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleLocalServiceClp.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleLocalServiceClp.java new file mode 100644 index 0000000..be04f42 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleLocalServiceClp.java @@ -0,0 +1,794 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.service.InvokableLocalService; + +/** + * @author Alireza + * @generated + */ +public class TitleLocalServiceClp implements TitleLocalService { + public TitleLocalServiceClp(InvokableLocalService invokableLocalService) { + _invokableLocalService = invokableLocalService; + + _methodName0 = "addTitle"; + + _methodParameterTypes0 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.Title" + }; + + _methodName1 = "createTitle"; + + _methodParameterTypes1 = new String[] { "long" }; + + _methodName2 = "deleteTitle"; + + _methodParameterTypes2 = new String[] { "long" }; + + _methodName3 = "deleteTitle"; + + _methodParameterTypes3 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.Title" + }; + + _methodName4 = "dynamicQuery"; + + _methodParameterTypes4 = new String[] { }; + + _methodName5 = "dynamicQuery"; + + _methodParameterTypes5 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName6 = "dynamicQuery"; + + _methodParameterTypes6 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int" + }; + + _methodName7 = "dynamicQuery"; + + _methodParameterTypes7 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int", + "com.liferay.portal.kernel.util.OrderByComparator" + }; + + _methodName8 = "dynamicQueryCount"; + + _methodParameterTypes8 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName9 = "dynamicQueryCount"; + + _methodParameterTypes9 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", + "com.liferay.portal.kernel.dao.orm.Projection" + }; + + _methodName10 = "fetchTitle"; + + _methodParameterTypes10 = new String[] { "long" }; + + _methodName11 = "getTitle"; + + _methodParameterTypes11 = new String[] { "long" }; + + _methodName12 = "getPersistedModel"; + + _methodParameterTypes12 = new String[] { "java.io.Serializable" }; + + _methodName13 = "getTitles"; + + _methodParameterTypes13 = new String[] { "int", "int" }; + + _methodName14 = "getTitlesCount"; + + _methodParameterTypes14 = new String[] { }; + + _methodName15 = "updateTitle"; + + _methodParameterTypes15 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.Title" + }; + + _methodName16 = "getBeanIdentifier"; + + _methodParameterTypes16 = new String[] { }; + + _methodName17 = "setBeanIdentifier"; + + _methodParameterTypes17 = new String[] { "java.lang.String" }; + + _methodName19 = "addTitle"; + + _methodParameterTypes19 = new String[] { + "long", "long", "long", "java.lang.String", "java.lang.String" + }; + + _methodName20 = "getTitlesByCompanyId"; + + _methodParameterTypes20 = new String[] { "long" }; + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title addTitle( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName0, + _methodParameterTypes0, + new Object[] { ClpSerializer.translateInput(title) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Title)ClpSerializer.translateOutput(returnObj); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title createTitle( + long titleId) { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName1, + _methodParameterTypes1, new Object[] { titleId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Title)ClpSerializer.translateOutput(returnObj); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title deleteTitle( + long titleId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName2, + _methodParameterTypes2, new Object[] { titleId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Title)ClpSerializer.translateOutput(returnObj); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title deleteTitle( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName3, + _methodParameterTypes3, + new Object[] { ClpSerializer.translateInput(title) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Title)ClpSerializer.translateOutput(returnObj); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName4, + _methodParameterTypes4, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (com.liferay.portal.kernel.dao.orm.DynamicQuery)ClpSerializer.translateOutput(returnObj); + } + + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName5, + _methodParameterTypes5, + new Object[] { ClpSerializer.translateInput(dynamicQuery) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName6, + _methodParameterTypes6, + new Object[] { + ClpSerializer.translateInput(dynamicQuery), + + start, + + end + }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName7, + _methodParameterTypes7, + new Object[] { + ClpSerializer.translateInput(dynamicQuery), + + start, + + end, + + ClpSerializer.translateInput(orderByComparator) + }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName8, + _methodParameterTypes8, + new Object[] { ClpSerializer.translateInput(dynamicQuery) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Long)returnObj).longValue(); + } + + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName9, + _methodParameterTypes9, + new Object[] { + ClpSerializer.translateInput(dynamicQuery), + + ClpSerializer.translateInput(projection) + }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Long)returnObj).longValue(); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title fetchTitle( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName10, + _methodParameterTypes10, new Object[] { titleId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Title)ClpSerializer.translateOutput(returnObj); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title getTitle( + long titleId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName11, + _methodParameterTypes11, new Object[] { titleId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Title)ClpSerializer.translateOutput(returnObj); + } + + @Override + public com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName12, + _methodParameterTypes12, + new Object[] { ClpSerializer.translateInput(primaryKeyObj) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (com.liferay.portal.model.PersistedModel)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> getTitles( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName13, + _methodParameterTypes13, new Object[] { start, end }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title>)ClpSerializer.translateOutput(returnObj); + } + + @Override + public int getTitlesCount() + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName14, + _methodParameterTypes14, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Integer)returnObj).intValue(); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title updateTitle( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName15, + _methodParameterTypes15, + new Object[] { ClpSerializer.translateInput(title) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Title)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.lang.String getBeanIdentifier() { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName16, + _methodParameterTypes16, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.lang.String)ClpSerializer.translateOutput(returnObj); + } + + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + try { + _invokableLocalService.invokeMethod(_methodName17, + _methodParameterTypes17, + new Object[] { ClpSerializer.translateInput(beanIdentifier) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + throw new UnsupportedOperationException(); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title addTitle( + long groupId, long companyId, long userId, java.lang.String userName, + java.lang.String titleText) + throws com.liferay.portal.NoSuchUserException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName19, + _methodParameterTypes19, + new Object[] { + groupId, + + companyId, + + userId, + + ClpSerializer.translateInput(userName), + + ClpSerializer.translateInput(titleText) + }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.NoSuchUserException) { + throw (com.liferay.portal.NoSuchUserException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (ir.ac.iut.sccportal.guestdiscussion.model.Title)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> getTitlesByCompanyId( + long companyId) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName20, + _methodParameterTypes20, new Object[] { companyId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title>)ClpSerializer.translateOutput(returnObj); + } + + private InvokableLocalService _invokableLocalService; + private String _methodName0; + private String[] _methodParameterTypes0; + private String _methodName1; + private String[] _methodParameterTypes1; + private String _methodName2; + private String[] _methodParameterTypes2; + private String _methodName3; + private String[] _methodParameterTypes3; + private String _methodName4; + private String[] _methodParameterTypes4; + private String _methodName5; + private String[] _methodParameterTypes5; + private String _methodName6; + private String[] _methodParameterTypes6; + private String _methodName7; + private String[] _methodParameterTypes7; + private String _methodName8; + private String[] _methodParameterTypes8; + private String _methodName9; + private String[] _methodParameterTypes9; + private String _methodName10; + private String[] _methodParameterTypes10; + private String _methodName11; + private String[] _methodParameterTypes11; + private String _methodName12; + private String[] _methodParameterTypes12; + private String _methodName13; + private String[] _methodParameterTypes13; + private String _methodName14; + private String[] _methodParameterTypes14; + private String _methodName15; + private String[] _methodParameterTypes15; + private String _methodName16; + private String[] _methodParameterTypes16; + private String _methodName17; + private String[] _methodParameterTypes17; + private String _methodName19; + private String[] _methodParameterTypes19; + private String _methodName20; + private String[] _methodParameterTypes20; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleLocalServiceUtil.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleLocalServiceUtil.java new file mode 100644 index 0000000..6b504e3 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleLocalServiceUtil.java @@ -0,0 +1,323 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; +import com.liferay.portal.kernel.util.ReferenceRegistry; +import com.liferay.portal.service.InvokableLocalService; + +/** + * Provides the local service utility for Title. This utility wraps + * {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleLocalServiceImpl} and is the + * primary access point for service operations in application layer code running + * on the local server. Methods of this service will not have security checks + * based on the propagated JAAS credentials because this service can only be + * accessed from within the same VM. + * + * @author Alireza + * @see TitleLocalService + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.TitleLocalServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleLocalServiceImpl + * @generated + */ +public class TitleLocalServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Adds the title to the database. Also notifies the appropriate model listeners. + * + * @param title the title + * @return the title that was added + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title addTitle( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().addTitle(title); + } + + /** + * Creates a new title with the primary key. Does not add the title to the database. + * + * @param titleId the primary key for the new title + * @return the new title + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title createTitle( + long titleId) { + return getService().createTitle(titleId); + } + + /** + * Deletes the title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param titleId the primary key of the title + * @return the title that was removed + * @throws PortalException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title deleteTitle( + long titleId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService().deleteTitle(titleId); + } + + /** + * Deletes the title from the database. Also notifies the appropriate model listeners. + * + * @param title the title + * @return the title that was removed + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title deleteTitle( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().deleteTitle(title); + } + + public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return getService().dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getService() + .dynamicQuery(dynamicQuery, start, end, orderByComparator); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQueryCount(dynamicQuery, projection); + } + + public static ir.ac.iut.sccportal.guestdiscussion.model.Title fetchTitle( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().fetchTitle(titleId); + } + + /** + * Returns the title with the primary key. + * + * @param titleId the primary key of the title + * @return the title + * @throws PortalException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title getTitle( + long titleId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService().getTitle(titleId); + } + + public static com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService().getPersistedModel(primaryKeyObj); + } + + /** + * Returns a range of all the titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @return the range of titles + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> getTitles( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getTitles(start, end); + } + + /** + * Returns the number of titles. + * + * @return the number of titles + * @throws SystemException if a system exception occurred + */ + public static int getTitlesCount() + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getTitlesCount(); + } + + /** + * Updates the title in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param title the title + * @return the title that was updated + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title updateTitle( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().updateTitle(title); + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public static java.lang.String getBeanIdentifier() { + return getService().getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public static void setBeanIdentifier(java.lang.String beanIdentifier) { + getService().setBeanIdentifier(beanIdentifier); + } + + public static java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return getService().invokeMethod(name, parameterTypes, arguments); + } + + public static ir.ac.iut.sccportal.guestdiscussion.model.Title addTitle( + long groupId, long companyId, long userId, java.lang.String userName, + java.lang.String titleText) + throws com.liferay.portal.NoSuchUserException, + com.liferay.portal.kernel.exception.SystemException { + return getService() + .addTitle(groupId, companyId, userId, userName, titleText); + } + + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> getTitlesByCompanyId( + long companyId) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getTitlesByCompanyId(companyId); + } + + public static void clearService() { + _service = null; + } + + public static TitleLocalService getService() { + if (_service == null) { + InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), + TitleLocalService.class.getName()); + + if (invokableLocalService instanceof TitleLocalService) { + _service = (TitleLocalService)invokableLocalService; + } + else { + _service = new TitleLocalServiceClp(invokableLocalService); + } + + ReferenceRegistry.registerReference(TitleLocalServiceUtil.class, + "_service"); + } + + return _service; + } + + /** + * @deprecated As of 6.2.0 + */ + public void setService(TitleLocalService service) { + } + + private static TitleLocalService _service; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleLocalServiceWrapper.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleLocalServiceWrapper.java new file mode 100644 index 0000000..6c5855d --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleLocalServiceWrapper.java @@ -0,0 +1,329 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link TitleLocalService}. + * + * @author Alireza + * @see TitleLocalService + * @generated + */ +public class TitleLocalServiceWrapper implements TitleLocalService, + ServiceWrapper<TitleLocalService> { + public TitleLocalServiceWrapper(TitleLocalService titleLocalService) { + _titleLocalService = titleLocalService; + } + + /** + * Adds the title to the database. Also notifies the appropriate model listeners. + * + * @param title the title + * @return the title that was added + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title addTitle( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.addTitle(title); + } + + /** + * Creates a new title with the primary key. Does not add the title to the database. + * + * @param titleId the primary key for the new title + * @return the new title + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title createTitle( + long titleId) { + return _titleLocalService.createTitle(titleId); + } + + /** + * Deletes the title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param titleId the primary key of the title + * @return the title that was removed + * @throws PortalException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title deleteTitle( + long titleId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.deleteTitle(titleId); + } + + /** + * Deletes the title from the database. Also notifies the appropriate model listeners. + * + * @param title the title + * @return the title that was removed + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title deleteTitle( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.deleteTitle(title); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return _titleLocalService.dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.dynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.dynamicQueryCount(dynamicQuery, projection); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title fetchTitle( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.fetchTitle(titleId); + } + + /** + * Returns the title with the primary key. + * + * @param titleId the primary key of the title + * @return the title + * @throws PortalException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title getTitle( + long titleId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.getTitle(titleId); + } + + @Override + public com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.getPersistedModel(primaryKeyObj); + } + + /** + * Returns a range of all the titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @return the range of titles + * @throws SystemException if a system exception occurred + */ + @Override + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> getTitles( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.getTitles(start, end); + } + + /** + * Returns the number of titles. + * + * @return the number of titles + * @throws SystemException if a system exception occurred + */ + @Override + public int getTitlesCount() + throws com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.getTitlesCount(); + } + + /** + * Updates the title in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param title the title + * @return the title that was updated + * @throws SystemException if a system exception occurred + */ + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title updateTitle( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.updateTitle(title); + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public java.lang.String getBeanIdentifier() { + return _titleLocalService.getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + _titleLocalService.setBeanIdentifier(beanIdentifier); + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return _titleLocalService.invokeMethod(name, parameterTypes, arguments); + } + + @Override + public ir.ac.iut.sccportal.guestdiscussion.model.Title addTitle( + long groupId, long companyId, long userId, java.lang.String userName, + java.lang.String titleText) + throws com.liferay.portal.NoSuchUserException, + com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.addTitle(groupId, companyId, userId, + userName, titleText); + } + + @Override + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> getTitlesByCompanyId( + long companyId) + throws com.liferay.portal.kernel.exception.SystemException { + return _titleLocalService.getTitlesByCompanyId(companyId); + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} + */ + public TitleLocalService getWrappedTitleLocalService() { + return _titleLocalService; + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} + */ + public void setWrappedTitleLocalService(TitleLocalService titleLocalService) { + _titleLocalService = titleLocalService; + } + + @Override + public TitleLocalService getWrappedService() { + return _titleLocalService; + } + + @Override + public void setWrappedService(TitleLocalService titleLocalService) { + _titleLocalService = titleLocalService; + } + + private TitleLocalService _titleLocalService; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleService.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleService.java new file mode 100644 index 0000000..733cf17 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleService.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.jsonwebservice.JSONWebService; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.security.ac.AccessControlled; +import com.liferay.portal.service.BaseService; +import com.liferay.portal.service.InvokableService; + +/** + * Provides the remote service interface for Title. Methods of this + * service are expected to have security checks based on the propagated JAAS + * credentials because this service can be accessed remotely. + * + * @author Alireza + * @see TitleServiceUtil + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.TitleServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleServiceImpl + * @generated + */ +@AccessControlled +@JSONWebService +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface TitleService extends BaseService, InvokableService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link TitleServiceUtil} to access the title remote service. Add custom service methods to {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public java.lang.String getBeanIdentifier(); + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public void setBeanIdentifier(java.lang.String beanIdentifier); + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleServiceClp.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleServiceClp.java new file mode 100644 index 0000000..cf047c2 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleServiceClp.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.service.InvokableService; + +/** + * @author Alireza + * @generated + */ +public class TitleServiceClp implements TitleService { + public TitleServiceClp(InvokableService invokableService) { + _invokableService = invokableService; + + _methodName0 = "getBeanIdentifier"; + + _methodParameterTypes0 = new String[] { }; + + _methodName1 = "setBeanIdentifier"; + + _methodParameterTypes1 = new String[] { "java.lang.String" }; + } + + @Override + public java.lang.String getBeanIdentifier() { + Object returnObj = null; + + try { + returnObj = _invokableService.invokeMethod(_methodName0, + _methodParameterTypes0, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.lang.String)ClpSerializer.translateOutput(returnObj); + } + + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + try { + _invokableService.invokeMethod(_methodName1, + _methodParameterTypes1, + new Object[] { ClpSerializer.translateInput(beanIdentifier) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + throw new UnsupportedOperationException(); + } + + private InvokableService _invokableService; + private String _methodName0; + private String[] _methodParameterTypes0; + private String _methodName1; + private String[] _methodParameterTypes1; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleServiceUtil.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleServiceUtil.java new file mode 100644 index 0000000..03a6960 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleServiceUtil.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; +import com.liferay.portal.kernel.util.ReferenceRegistry; +import com.liferay.portal.service.InvokableService; + +/** + * Provides the remote service utility for Title. This utility wraps + * {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleServiceImpl} and is the + * primary access point for service operations in application layer code running + * on a remote server. Methods of this service are expected to have security + * checks based on the propagated JAAS credentials because this service can be + * accessed remotely. + * + * @author Alireza + * @see TitleService + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.TitleServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleServiceImpl + * @generated + */ +public class TitleServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public static java.lang.String getBeanIdentifier() { + return getService().getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public static void setBeanIdentifier(java.lang.String beanIdentifier) { + getService().setBeanIdentifier(beanIdentifier); + } + + public static java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return getService().invokeMethod(name, parameterTypes, arguments); + } + + public static void clearService() { + _service = null; + } + + public static TitleService getService() { + if (_service == null) { + InvokableService invokableService = (InvokableService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), + TitleService.class.getName()); + + if (invokableService instanceof TitleService) { + _service = (TitleService)invokableService; + } + else { + _service = new TitleServiceClp(invokableService); + } + + ReferenceRegistry.registerReference(TitleServiceUtil.class, + "_service"); + } + + return _service; + } + + /** + * @deprecated As of 6.2.0 + */ + public void setService(TitleService service) { + } + + private static TitleService _service; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleServiceWrapper.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleServiceWrapper.java new file mode 100644 index 0000000..63dec71 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/TitleServiceWrapper.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service; + +import com.liferay.portal.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link TitleService}. + * + * @author Alireza + * @see TitleService + * @generated + */ +public class TitleServiceWrapper implements TitleService, + ServiceWrapper<TitleService> { + public TitleServiceWrapper(TitleService titleService) { + _titleService = titleService; + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public java.lang.String getBeanIdentifier() { + return _titleService.getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + _titleService.setBeanIdentifier(beanIdentifier); + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return _titleService.invokeMethod(name, parameterTypes, arguments); + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} + */ + public TitleService getWrappedTitleService() { + return _titleService; + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} + */ + public void setWrappedTitleService(TitleService titleService) { + _titleService = titleService; + } + + @Override + public TitleService getWrappedService() { + return _titleService; + } + + @Override + public void setWrappedService(TitleService titleService) { + _titleService = titleService; + } + + private TitleService _titleService; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/messaging/ClpMessageListener.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/messaging/ClpMessageListener.java new file mode 100644 index 0000000..5b2f970 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/messaging/ClpMessageListener.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.messaging; + +import com.liferay.portal.kernel.messaging.BaseMessageListener; +import com.liferay.portal.kernel.messaging.Message; + +import ir.ac.iut.sccportal.guestdiscussion.service.ClpSerializer; +import ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalServiceUtil; +import ir.ac.iut.sccportal.guestdiscussion.service.CommentServiceUtil; +import ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalServiceUtil; +import ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil; +import ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil; +import ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil; + +/** + * @author Alireza + */ +public class ClpMessageListener extends BaseMessageListener { + public static String getServletContextName() { + return ClpSerializer.getServletContextName(); + } + + @Override + protected void doReceive(Message message) throws Exception { + String command = message.getString("command"); + String servletContextName = message.getString("servletContextName"); + + if (command.equals("undeploy") && + servletContextName.equals(getServletContextName())) { + CommentLocalServiceUtil.clearService(); + + CommentServiceUtil.clearService(); + PortletTitleLocalServiceUtil.clearService(); + + PortletTitleServiceUtil.clearService(); + TitleLocalServiceUtil.clearService(); + + TitleServiceUtil.clearService(); + } + } +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentActionableDynamicQuery.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentActionableDynamicQuery.java new file mode 100644 index 0000000..8c3ec15 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentActionableDynamicQuery.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.persistence; + +import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery; +import com.liferay.portal.kernel.exception.SystemException; + +import ir.ac.iut.sccportal.guestdiscussion.model.Comment; +import ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalServiceUtil; + +/** + * @author Alireza + * @generated + */ +public abstract class CommentActionableDynamicQuery + extends BaseActionableDynamicQuery { + public CommentActionableDynamicQuery() throws SystemException { + setBaseLocalService(CommentLocalServiceUtil.getService()); + setClass(Comment.class); + + setClassLoader(ir.ac.iut.sccportal.guestdiscussion.service.ClpSerializer.class.getClassLoader()); + + setPrimaryKeyPropertyName("commentId"); + } +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistence.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistence.java new file mode 100644 index 0000000..f7f3699 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistence.java @@ -0,0 +1,611 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.persistence; + +import com.liferay.portal.service.persistence.BasePersistence; + +import ir.ac.iut.sccportal.guestdiscussion.model.Comment; + +/** + * The persistence interface for the comment service. + * + * <p> + * Caching information and settings can be found in <code>portal.properties</code> + * </p> + * + * @author Alireza + * @see CommentPersistenceImpl + * @see CommentUtil + * @generated + */ +public interface CommentPersistence extends BasePersistence<Comment> { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link CommentUtil} to access the comment persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. + */ + + /** + * Returns all the comments where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @return the matching comments + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByParentId_TitleId_Verified( + long parentId, long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns a range of all the comments where parentId = ? and titleId = ? and verified = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of matching comments + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByParentId_TitleId_Verified( + long parentId, long titleId, boolean verified, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns an ordered range of all the comments where parentId = ? and titleId = ? and verified = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching comments + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByParentId_TitleId_Verified( + long parentId, long titleId, boolean verified, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the first comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment findByParentId_TitleId_Verified_First( + long parentId, long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException; + + /** + * Returns the first comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchByParentId_TitleId_Verified_First( + long parentId, long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the last comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment findByParentId_TitleId_Verified_Last( + long parentId, long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException; + + /** + * Returns the last comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchByParentId_TitleId_Verified_Last( + long parentId, long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the comments before and after the current comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param commentId the primary key of the current comment + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment[] findByParentId_TitleId_Verified_PrevAndNext( + long commentId, long parentId, long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException; + + /** + * Removes all the comments where parentId = ? and titleId = ? and verified = ? from the database. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @throws SystemException if a system exception occurred + */ + public void removeByParentId_TitleId_Verified(long parentId, long titleId, + boolean verified) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of comments where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @return the number of matching comments + * @throws SystemException if a system exception occurred + */ + public int countByParentId_TitleId_Verified(long parentId, long titleId, + boolean verified) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns all the comments where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @return the matching comments + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByTitleId_Virified( + long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns a range of all the comments where titleId = ? and verified = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param verified the verified + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of matching comments + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByTitleId_Virified( + long titleId, boolean verified, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns an ordered range of all the comments where titleId = ? and verified = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param verified the verified + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching comments + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByTitleId_Virified( + long titleId, boolean verified, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the first comment in the ordered set where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment findByTitleId_Virified_First( + long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException; + + /** + * Returns the first comment in the ordered set where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchByTitleId_Virified_First( + long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the last comment in the ordered set where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment findByTitleId_Virified_Last( + long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException; + + /** + * Returns the last comment in the ordered set where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchByTitleId_Virified_Last( + long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the comments before and after the current comment in the ordered set where titleId = ? and verified = ?. + * + * @param commentId the primary key of the current comment + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment[] findByTitleId_Virified_PrevAndNext( + long commentId, long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException; + + /** + * Removes all the comments where titleId = ? and verified = ? from the database. + * + * @param titleId the title ID + * @param verified the verified + * @throws SystemException if a system exception occurred + */ + public void removeByTitleId_Virified(long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of comments where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @return the number of matching comments + * @throws SystemException if a system exception occurred + */ + public int countByTitleId_Virified(long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns all the comments where titleId = ?. + * + * @param titleId the title ID + * @return the matching comments + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByTitleId( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns a range of all the comments where titleId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of matching comments + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByTitleId( + long titleId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns an ordered range of all the comments where titleId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching comments + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByTitleId( + long titleId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the first comment in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment findByTitleId_First( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException; + + /** + * Returns the first comment in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchByTitleId_First( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the last comment in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment findByTitleId_Last( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException; + + /** + * Returns the last comment in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchByTitleId_Last( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the comments before and after the current comment in the ordered set where titleId = ?. + * + * @param commentId the primary key of the current comment + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment[] findByTitleId_PrevAndNext( + long commentId, long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException; + + /** + * Removes all the comments where titleId = ? from the database. + * + * @param titleId the title ID + * @throws SystemException if a system exception occurred + */ + public void removeByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of comments where titleId = ?. + * + * @param titleId the title ID + * @return the number of matching comments + * @throws SystemException if a system exception occurred + */ + public int countByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Caches the comment in the entity cache if it is enabled. + * + * @param comment the comment + */ + public void cacheResult( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment); + + /** + * Caches the comments in the entity cache if it is enabled. + * + * @param comments the comments + */ + public void cacheResult( + java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> comments); + + /** + * Creates a new comment with the primary key. Does not add the comment to the database. + * + * @param commentId the primary key for the new comment + * @return the new comment + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment create( + long commentId); + + /** + * Removes the comment with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param commentId the primary key of the comment + * @return the comment that was removed + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment remove( + long commentId) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException; + + public ir.ac.iut.sccportal.guestdiscussion.model.Comment updateImpl( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the comment with the primary key or throws a {@link ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException} if it could not be found. + * + * @param commentId the primary key of the comment + * @return the comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment findByPrimaryKey( + long commentId) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException; + + /** + * Returns the comment with the primary key or returns <code>null</code> if it could not be found. + * + * @param commentId the primary key of the comment + * @return the comment, or <code>null</code> if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchByPrimaryKey( + long commentId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns all the comments. + * + * @return the comments + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findAll() + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns a range of all the comments. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of comments + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findAll( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns an ordered range of all the comments. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of comments + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findAll( + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Removes all the comments from the database. + * + * @throws SystemException if a system exception occurred + */ + public void removeAll() + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of comments. + * + * @return the number of comments + * @throws SystemException if a system exception occurred + */ + public int countAll() + throws com.liferay.portal.kernel.exception.SystemException; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentUtil.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentUtil.java new file mode 100644 index 0000000..e8d80c2 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentUtil.java @@ -0,0 +1,820 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.persistence; + +import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.ReferenceRegistry; +import com.liferay.portal.service.ServiceContext; + +import ir.ac.iut.sccportal.guestdiscussion.model.Comment; + +import java.util.List; + +/** + * The persistence utility for the comment service. This utility wraps {@link CommentPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. + * + * <p> + * Caching information and settings can be found in <code>portal.properties</code> + * </p> + * + * @author Alireza + * @see CommentPersistence + * @see CommentPersistenceImpl + * @generated + */ +public class CommentUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. + */ + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() + */ + public static void clearCache() { + getPersistence().clearCache(); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) + */ + public static void clearCache(Comment comment) { + getPersistence().clearCache(comment); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) + */ + public static long countWithDynamicQuery(DynamicQuery dynamicQuery) + throws SystemException { + return getPersistence().countWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) + */ + public static List<Comment> findWithDynamicQuery(DynamicQuery dynamicQuery) + throws SystemException { + return getPersistence().findWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) + */ + public static List<Comment> findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end) + throws SystemException { + return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) + */ + public static List<Comment> findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end, + OrderByComparator orderByComparator) throws SystemException { + return getPersistence() + .findWithDynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) + */ + public static Comment update(Comment comment) throws SystemException { + return getPersistence().update(comment); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) + */ + public static Comment update(Comment comment, ServiceContext serviceContext) + throws SystemException { + return getPersistence().update(comment, serviceContext); + } + + /** + * Returns all the comments where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @return the matching comments + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByParentId_TitleId_Verified( + long parentId, long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .findByParentId_TitleId_Verified(parentId, titleId, verified); + } + + /** + * Returns a range of all the comments where parentId = ? and titleId = ? and verified = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of matching comments + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByParentId_TitleId_Verified( + long parentId, long titleId, boolean verified, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .findByParentId_TitleId_Verified(parentId, titleId, + verified, start, end); + } + + /** + * Returns an ordered range of all the comments where parentId = ? and titleId = ? and verified = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching comments + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByParentId_TitleId_Verified( + long parentId, long titleId, boolean verified, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .findByParentId_TitleId_Verified(parentId, titleId, + verified, start, end, orderByComparator); + } + + /** + * Returns the first comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment findByParentId_TitleId_Verified_First( + long parentId, long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException { + return getPersistence() + .findByParentId_TitleId_Verified_First(parentId, titleId, + verified, orderByComparator); + } + + /** + * Returns the first comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchByParentId_TitleId_Verified_First( + long parentId, long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .fetchByParentId_TitleId_Verified_First(parentId, titleId, + verified, orderByComparator); + } + + /** + * Returns the last comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment findByParentId_TitleId_Verified_Last( + long parentId, long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException { + return getPersistence() + .findByParentId_TitleId_Verified_Last(parentId, titleId, + verified, orderByComparator); + } + + /** + * Returns the last comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchByParentId_TitleId_Verified_Last( + long parentId, long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .fetchByParentId_TitleId_Verified_Last(parentId, titleId, + verified, orderByComparator); + } + + /** + * Returns the comments before and after the current comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param commentId the primary key of the current comment + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment[] findByParentId_TitleId_Verified_PrevAndNext( + long commentId, long parentId, long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException { + return getPersistence() + .findByParentId_TitleId_Verified_PrevAndNext(commentId, + parentId, titleId, verified, orderByComparator); + } + + /** + * Removes all the comments where parentId = ? and titleId = ? and verified = ? from the database. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @throws SystemException if a system exception occurred + */ + public static void removeByParentId_TitleId_Verified(long parentId, + long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException { + getPersistence() + .removeByParentId_TitleId_Verified(parentId, titleId, verified); + } + + /** + * Returns the number of comments where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @return the number of matching comments + * @throws SystemException if a system exception occurred + */ + public static int countByParentId_TitleId_Verified(long parentId, + long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .countByParentId_TitleId_Verified(parentId, titleId, verified); + } + + /** + * Returns all the comments where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @return the matching comments + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByTitleId_Virified( + long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findByTitleId_Virified(titleId, verified); + } + + /** + * Returns a range of all the comments where titleId = ? and verified = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param verified the verified + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of matching comments + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByTitleId_Virified( + long titleId, boolean verified, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .findByTitleId_Virified(titleId, verified, start, end); + } + + /** + * Returns an ordered range of all the comments where titleId = ? and verified = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param verified the verified + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching comments + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByTitleId_Virified( + long titleId, boolean verified, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .findByTitleId_Virified(titleId, verified, start, end, + orderByComparator); + } + + /** + * Returns the first comment in the ordered set where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment findByTitleId_Virified_First( + long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException { + return getPersistence() + .findByTitleId_Virified_First(titleId, verified, + orderByComparator); + } + + /** + * Returns the first comment in the ordered set where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchByTitleId_Virified_First( + long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .fetchByTitleId_Virified_First(titleId, verified, + orderByComparator); + } + + /** + * Returns the last comment in the ordered set where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment findByTitleId_Virified_Last( + long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException { + return getPersistence() + .findByTitleId_Virified_Last(titleId, verified, + orderByComparator); + } + + /** + * Returns the last comment in the ordered set where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchByTitleId_Virified_Last( + long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .fetchByTitleId_Virified_Last(titleId, verified, + orderByComparator); + } + + /** + * Returns the comments before and after the current comment in the ordered set where titleId = ? and verified = ?. + * + * @param commentId the primary key of the current comment + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment[] findByTitleId_Virified_PrevAndNext( + long commentId, long titleId, boolean verified, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException { + return getPersistence() + .findByTitleId_Virified_PrevAndNext(commentId, titleId, + verified, orderByComparator); + } + + /** + * Removes all the comments where titleId = ? and verified = ? from the database. + * + * @param titleId the title ID + * @param verified the verified + * @throws SystemException if a system exception occurred + */ + public static void removeByTitleId_Virified(long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException { + getPersistence().removeByTitleId_Virified(titleId, verified); + } + + /** + * Returns the number of comments where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @return the number of matching comments + * @throws SystemException if a system exception occurred + */ + public static int countByTitleId_Virified(long titleId, boolean verified) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().countByTitleId_Virified(titleId, verified); + } + + /** + * Returns all the comments where titleId = ?. + * + * @param titleId the title ID + * @return the matching comments + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByTitleId( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findByTitleId(titleId); + } + + /** + * Returns a range of all the comments where titleId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of matching comments + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByTitleId( + long titleId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findByTitleId(titleId, start, end); + } + + /** + * Returns an ordered range of all the comments where titleId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching comments + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findByTitleId( + long titleId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .findByTitleId(titleId, start, end, orderByComparator); + } + + /** + * Returns the first comment in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment findByTitleId_First( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException { + return getPersistence().findByTitleId_First(titleId, orderByComparator); + } + + /** + * Returns the first comment in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchByTitleId_First( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByTitleId_First(titleId, orderByComparator); + } + + /** + * Returns the last comment in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment findByTitleId_Last( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException { + return getPersistence().findByTitleId_Last(titleId, orderByComparator); + } + + /** + * Returns the last comment in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchByTitleId_Last( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByTitleId_Last(titleId, orderByComparator); + } + + /** + * Returns the comments before and after the current comment in the ordered set where titleId = ?. + * + * @param commentId the primary key of the current comment + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment[] findByTitleId_PrevAndNext( + long commentId, long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException { + return getPersistence() + .findByTitleId_PrevAndNext(commentId, titleId, + orderByComparator); + } + + /** + * Removes all the comments where titleId = ? from the database. + * + * @param titleId the title ID + * @throws SystemException if a system exception occurred + */ + public static void removeByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + getPersistence().removeByTitleId(titleId); + } + + /** + * Returns the number of comments where titleId = ?. + * + * @param titleId the title ID + * @return the number of matching comments + * @throws SystemException if a system exception occurred + */ + public static int countByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().countByTitleId(titleId); + } + + /** + * Caches the comment in the entity cache if it is enabled. + * + * @param comment the comment + */ + public static void cacheResult( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) { + getPersistence().cacheResult(comment); + } + + /** + * Caches the comments in the entity cache if it is enabled. + * + * @param comments the comments + */ + public static void cacheResult( + java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> comments) { + getPersistence().cacheResult(comments); + } + + /** + * Creates a new comment with the primary key. Does not add the comment to the database. + * + * @param commentId the primary key for the new comment + * @return the new comment + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment create( + long commentId) { + return getPersistence().create(commentId); + } + + /** + * Removes the comment with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param commentId the primary key of the comment + * @return the comment that was removed + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment remove( + long commentId) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException { + return getPersistence().remove(commentId); + } + + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment updateImpl( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().updateImpl(comment); + } + + /** + * Returns the comment with the primary key or throws a {@link ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException} if it could not be found. + * + * @param commentId the primary key of the comment + * @return the comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment findByPrimaryKey( + long commentId) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException { + return getPersistence().findByPrimaryKey(commentId); + } + + /** + * Returns the comment with the primary key or returns <code>null</code> if it could not be found. + * + * @param commentId the primary key of the comment + * @return the comment, or <code>null</code> if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Comment fetchByPrimaryKey( + long commentId) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByPrimaryKey(commentId); + } + + /** + * Returns all the comments. + * + * @return the comments + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findAll() + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findAll(); + } + + /** + * Returns a range of all the comments. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of comments + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findAll( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findAll(start, end); + } + + /** + * Returns an ordered range of all the comments. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of comments + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> findAll( + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findAll(start, end, orderByComparator); + } + + /** + * Removes all the comments from the database. + * + * @throws SystemException if a system exception occurred + */ + public static void removeAll() + throws com.liferay.portal.kernel.exception.SystemException { + getPersistence().removeAll(); + } + + /** + * Returns the number of comments. + * + * @return the number of comments + * @throws SystemException if a system exception occurred + */ + public static int countAll() + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().countAll(); + } + + public static CommentPersistence getPersistence() { + if (_persistence == null) { + _persistence = (CommentPersistence)PortletBeanLocatorUtil.locate(ir.ac.iut.sccportal.guestdiscussion.service.ClpSerializer.getServletContextName(), + CommentPersistence.class.getName()); + + ReferenceRegistry.registerReference(CommentUtil.class, + "_persistence"); + } + + return _persistence; + } + + /** + * @deprecated As of 6.2.0 + */ + public void setPersistence(CommentPersistence persistence) { + } + + private static CommentPersistence _persistence; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistence.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistence.java new file mode 100644 index 0000000..8329850 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistence.java @@ -0,0 +1,303 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.persistence; + +import com.liferay.portal.service.persistence.BasePersistence; + +import ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle; + +/** + * The persistence interface for the portlet title service. + * + * <p> + * Caching information and settings can be found in <code>portal.properties</code> + * </p> + * + * @author Alireza + * @see PortletTitlePersistenceImpl + * @see PortletTitleUtil + * @generated + */ +public interface PortletTitlePersistence extends BasePersistence<PortletTitle> { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link PortletTitleUtil} to access the portlet title persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. + */ + + /** + * Returns all the portlet titles where titleId = ?. + * + * @param titleId the title ID + * @return the matching portlet titles + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> findByTitleId( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns a range of all the portlet titles where titleId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @return the range of matching portlet titles + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> findByTitleId( + long titleId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns an ordered range of all the portlet titles where titleId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching portlet titles + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> findByTitleId( + long titleId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the first portlet title in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching portlet title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a matching portlet title could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle findByTitleId_First( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException; + + /** + * Returns the first portlet title in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching portlet title, or <code>null</code> if a matching portlet title could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle fetchByTitleId_First( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the last portlet title in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching portlet title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a matching portlet title could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle findByTitleId_Last( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException; + + /** + * Returns the last portlet title in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching portlet title, or <code>null</code> if a matching portlet title could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle fetchByTitleId_Last( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the portlet titles before and after the current portlet title in the ordered set where titleId = ?. + * + * @param portletId the primary key of the current portlet title + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next portlet title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle[] findByTitleId_PrevAndNext( + java.lang.String portletId, long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException; + + /** + * Removes all the portlet titles where titleId = ? from the database. + * + * @param titleId the title ID + * @throws SystemException if a system exception occurred + */ + public void removeByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of portlet titles where titleId = ?. + * + * @param titleId the title ID + * @return the number of matching portlet titles + * @throws SystemException if a system exception occurred + */ + public int countByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Caches the portlet title in the entity cache if it is enabled. + * + * @param portletTitle the portlet title + */ + public void cacheResult( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle); + + /** + * Caches the portlet titles in the entity cache if it is enabled. + * + * @param portletTitles the portlet titles + */ + public void cacheResult( + java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> portletTitles); + + /** + * Creates a new portlet title with the primary key. Does not add the portlet title to the database. + * + * @param portletId the primary key for the new portlet title + * @return the new portlet title + */ + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle create( + java.lang.String portletId); + + /** + * Removes the portlet title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param portletId the primary key of the portlet title + * @return the portlet title that was removed + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle remove( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException; + + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle updateImpl( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the portlet title with the primary key or throws a {@link ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException} if it could not be found. + * + * @param portletId the primary key of the portlet title + * @return the portlet title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle findByPrimaryKey( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException; + + /** + * Returns the portlet title with the primary key or returns <code>null</code> if it could not be found. + * + * @param portletId the primary key of the portlet title + * @return the portlet title, or <code>null</code> if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle fetchByPrimaryKey( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns all the portlet titles. + * + * @return the portlet titles + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> findAll() + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns a range of all the portlet titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @return the range of portlet titles + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> findAll( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns an ordered range of all the portlet titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of portlet titles + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> findAll( + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Removes all the portlet titles from the database. + * + * @throws SystemException if a system exception occurred + */ + public void removeAll() + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of portlet titles. + * + * @return the number of portlet titles + * @throws SystemException if a system exception occurred + */ + public int countAll() + throws com.liferay.portal.kernel.exception.SystemException; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitleUtil.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitleUtil.java new file mode 100644 index 0000000..03e047e --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitleUtil.java @@ -0,0 +1,443 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.persistence; + +import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.ReferenceRegistry; +import com.liferay.portal.service.ServiceContext; + +import ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle; + +import java.util.List; + +/** + * The persistence utility for the portlet title service. This utility wraps {@link PortletTitlePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. + * + * <p> + * Caching information and settings can be found in <code>portal.properties</code> + * </p> + * + * @author Alireza + * @see PortletTitlePersistence + * @see PortletTitlePersistenceImpl + * @generated + */ +public class PortletTitleUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. + */ + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() + */ + public static void clearCache() { + getPersistence().clearCache(); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) + */ + public static void clearCache(PortletTitle portletTitle) { + getPersistence().clearCache(portletTitle); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) + */ + public static long countWithDynamicQuery(DynamicQuery dynamicQuery) + throws SystemException { + return getPersistence().countWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) + */ + public static List<PortletTitle> findWithDynamicQuery( + DynamicQuery dynamicQuery) throws SystemException { + return getPersistence().findWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) + */ + public static List<PortletTitle> findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end) + throws SystemException { + return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) + */ + public static List<PortletTitle> findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end, + OrderByComparator orderByComparator) throws SystemException { + return getPersistence() + .findWithDynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) + */ + public static PortletTitle update(PortletTitle portletTitle) + throws SystemException { + return getPersistence().update(portletTitle); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) + */ + public static PortletTitle update(PortletTitle portletTitle, + ServiceContext serviceContext) throws SystemException { + return getPersistence().update(portletTitle, serviceContext); + } + + /** + * Returns all the portlet titles where titleId = ?. + * + * @param titleId the title ID + * @return the matching portlet titles + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> findByTitleId( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findByTitleId(titleId); + } + + /** + * Returns a range of all the portlet titles where titleId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @return the range of matching portlet titles + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> findByTitleId( + long titleId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findByTitleId(titleId, start, end); + } + + /** + * Returns an ordered range of all the portlet titles where titleId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching portlet titles + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> findByTitleId( + long titleId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .findByTitleId(titleId, start, end, orderByComparator); + } + + /** + * Returns the first portlet title in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching portlet title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a matching portlet title could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle findByTitleId_First( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException { + return getPersistence().findByTitleId_First(titleId, orderByComparator); + } + + /** + * Returns the first portlet title in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching portlet title, or <code>null</code> if a matching portlet title could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle fetchByTitleId_First( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByTitleId_First(titleId, orderByComparator); + } + + /** + * Returns the last portlet title in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching portlet title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a matching portlet title could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle findByTitleId_Last( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException { + return getPersistence().findByTitleId_Last(titleId, orderByComparator); + } + + /** + * Returns the last portlet title in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching portlet title, or <code>null</code> if a matching portlet title could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle fetchByTitleId_Last( + long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByTitleId_Last(titleId, orderByComparator); + } + + /** + * Returns the portlet titles before and after the current portlet title in the ordered set where titleId = ?. + * + * @param portletId the primary key of the current portlet title + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next portlet title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle[] findByTitleId_PrevAndNext( + java.lang.String portletId, long titleId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException { + return getPersistence() + .findByTitleId_PrevAndNext(portletId, titleId, + orderByComparator); + } + + /** + * Removes all the portlet titles where titleId = ? from the database. + * + * @param titleId the title ID + * @throws SystemException if a system exception occurred + */ + public static void removeByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + getPersistence().removeByTitleId(titleId); + } + + /** + * Returns the number of portlet titles where titleId = ?. + * + * @param titleId the title ID + * @return the number of matching portlet titles + * @throws SystemException if a system exception occurred + */ + public static int countByTitleId(long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().countByTitleId(titleId); + } + + /** + * Caches the portlet title in the entity cache if it is enabled. + * + * @param portletTitle the portlet title + */ + public static void cacheResult( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) { + getPersistence().cacheResult(portletTitle); + } + + /** + * Caches the portlet titles in the entity cache if it is enabled. + * + * @param portletTitles the portlet titles + */ + public static void cacheResult( + java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> portletTitles) { + getPersistence().cacheResult(portletTitles); + } + + /** + * Creates a new portlet title with the primary key. Does not add the portlet title to the database. + * + * @param portletId the primary key for the new portlet title + * @return the new portlet title + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle create( + java.lang.String portletId) { + return getPersistence().create(portletId); + } + + /** + * Removes the portlet title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param portletId the primary key of the portlet title + * @return the portlet title that was removed + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle remove( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException { + return getPersistence().remove(portletId); + } + + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle updateImpl( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().updateImpl(portletTitle); + } + + /** + * Returns the portlet title with the primary key or throws a {@link ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException} if it could not be found. + * + * @param portletId the primary key of the portlet title + * @return the portlet title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle findByPrimaryKey( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException { + return getPersistence().findByPrimaryKey(portletId); + } + + /** + * Returns the portlet title with the primary key or returns <code>null</code> if it could not be found. + * + * @param portletId the primary key of the portlet title + * @return the portlet title, or <code>null</code> if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle fetchByPrimaryKey( + java.lang.String portletId) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByPrimaryKey(portletId); + } + + /** + * Returns all the portlet titles. + * + * @return the portlet titles + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> findAll() + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findAll(); + } + + /** + * Returns a range of all the portlet titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @return the range of portlet titles + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> findAll( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findAll(start, end); + } + + /** + * Returns an ordered range of all the portlet titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of portlet titles + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle> findAll( + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findAll(start, end, orderByComparator); + } + + /** + * Removes all the portlet titles from the database. + * + * @throws SystemException if a system exception occurred + */ + public static void removeAll() + throws com.liferay.portal.kernel.exception.SystemException { + getPersistence().removeAll(); + } + + /** + * Returns the number of portlet titles. + * + * @return the number of portlet titles + * @throws SystemException if a system exception occurred + */ + public static int countAll() + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().countAll(); + } + + public static PortletTitlePersistence getPersistence() { + if (_persistence == null) { + _persistence = (PortletTitlePersistence)PortletBeanLocatorUtil.locate(ir.ac.iut.sccportal.guestdiscussion.service.ClpSerializer.getServletContextName(), + PortletTitlePersistence.class.getName()); + + ReferenceRegistry.registerReference(PortletTitleUtil.class, + "_persistence"); + } + + return _persistence; + } + + /** + * @deprecated As of 6.2.0 + */ + public void setPersistence(PortletTitlePersistence persistence) { + } + + private static PortletTitlePersistence _persistence; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitleActionableDynamicQuery.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitleActionableDynamicQuery.java new file mode 100644 index 0000000..47d5197 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitleActionableDynamicQuery.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.persistence; + +import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery; +import com.liferay.portal.kernel.exception.SystemException; + +import ir.ac.iut.sccportal.guestdiscussion.model.Title; +import ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil; + +/** + * @author Alireza + * @generated + */ +public abstract class TitleActionableDynamicQuery + extends BaseActionableDynamicQuery { + public TitleActionableDynamicQuery() throws SystemException { + setBaseLocalService(TitleLocalServiceUtil.getService()); + setClass(Title.class); + + setClassLoader(ir.ac.iut.sccportal.guestdiscussion.service.ClpSerializer.class.getClassLoader()); + + setPrimaryKeyPropertyName("titleId"); + } +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistence.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistence.java new file mode 100644 index 0000000..61c5a08 --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistence.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.persistence; + +import com.liferay.portal.service.persistence.BasePersistence; + +import ir.ac.iut.sccportal.guestdiscussion.model.Title; + +/** + * The persistence interface for the title service. + * + * <p> + * Caching information and settings can be found in <code>portal.properties</code> + * </p> + * + * @author Alireza + * @see TitlePersistenceImpl + * @see TitleUtil + * @generated + */ +public interface TitlePersistence extends BasePersistence<Title> { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link TitleUtil} to access the title persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. + */ + + /** + * Returns all the titles where companyId = ?. + * + * @param companyId the company ID + * @return the matching titles + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> findByCompanyId( + long companyId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns a range of all the titles where companyId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param companyId the company ID + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @return the range of matching titles + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> findByCompanyId( + long companyId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns an ordered range of all the titles where companyId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param companyId the company ID + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching titles + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> findByCompanyId( + long companyId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the first title in the ordered set where companyId = ?. + * + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a matching title could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Title findByCompanyId_First( + long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException; + + /** + * Returns the first title in the ordered set where companyId = ?. + * + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching title, or <code>null</code> if a matching title could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Title fetchByCompanyId_First( + long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the last title in the ordered set where companyId = ?. + * + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a matching title could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Title findByCompanyId_Last( + long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException; + + /** + * Returns the last title in the ordered set where companyId = ?. + * + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching title, or <code>null</code> if a matching title could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Title fetchByCompanyId_Last( + long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the titles before and after the current title in the ordered set where companyId = ?. + * + * @param titleId the primary key of the current title + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Title[] findByCompanyId_PrevAndNext( + long titleId, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException; + + /** + * Removes all the titles where companyId = ? from the database. + * + * @param companyId the company ID + * @throws SystemException if a system exception occurred + */ + public void removeByCompanyId(long companyId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of titles where companyId = ?. + * + * @param companyId the company ID + * @return the number of matching titles + * @throws SystemException if a system exception occurred + */ + public int countByCompanyId(long companyId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Caches the title in the entity cache if it is enabled. + * + * @param title the title + */ + public void cacheResult( + ir.ac.iut.sccportal.guestdiscussion.model.Title title); + + /** + * Caches the titles in the entity cache if it is enabled. + * + * @param titles the titles + */ + public void cacheResult( + java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> titles); + + /** + * Creates a new title with the primary key. Does not add the title to the database. + * + * @param titleId the primary key for the new title + * @return the new title + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Title create(long titleId); + + /** + * Removes the title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param titleId the primary key of the title + * @return the title that was removed + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Title remove(long titleId) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException; + + public ir.ac.iut.sccportal.guestdiscussion.model.Title updateImpl( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the title with the primary key or throws a {@link ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException} if it could not be found. + * + * @param titleId the primary key of the title + * @return the title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Title findByPrimaryKey( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException; + + /** + * Returns the title with the primary key or returns <code>null</code> if it could not be found. + * + * @param titleId the primary key of the title + * @return the title, or <code>null</code> if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public ir.ac.iut.sccportal.guestdiscussion.model.Title fetchByPrimaryKey( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns all the titles. + * + * @return the titles + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> findAll() + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns a range of all the titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @return the range of titles + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> findAll( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns an ordered range of all the titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of titles + * @throws SystemException if a system exception occurred + */ + public java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> findAll( + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Removes all the titles from the database. + * + * @throws SystemException if a system exception occurred + */ + public void removeAll() + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of titles. + * + * @return the number of titles + * @throws SystemException if a system exception occurred + */ + public int countAll() + throws com.liferay.portal.kernel.exception.SystemException; +} \ No newline at end of file diff --git a/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitleUtil.java b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitleUtil.java new file mode 100644 index 0000000..c4c6ddf --- /dev/null +++ b/docroot/WEB-INF/service/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitleUtil.java @@ -0,0 +1,444 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.persistence; + +import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.ReferenceRegistry; +import com.liferay.portal.service.ServiceContext; + +import ir.ac.iut.sccportal.guestdiscussion.model.Title; + +import java.util.List; + +/** + * The persistence utility for the title service. This utility wraps {@link TitlePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. + * + * <p> + * Caching information and settings can be found in <code>portal.properties</code> + * </p> + * + * @author Alireza + * @see TitlePersistence + * @see TitlePersistenceImpl + * @generated + */ +public class TitleUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. + */ + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() + */ + public static void clearCache() { + getPersistence().clearCache(); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) + */ + public static void clearCache(Title title) { + getPersistence().clearCache(title); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) + */ + public static long countWithDynamicQuery(DynamicQuery dynamicQuery) + throws SystemException { + return getPersistence().countWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) + */ + public static List<Title> findWithDynamicQuery(DynamicQuery dynamicQuery) + throws SystemException { + return getPersistence().findWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) + */ + public static List<Title> findWithDynamicQuery(DynamicQuery dynamicQuery, + int start, int end) throws SystemException { + return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) + */ + public static List<Title> findWithDynamicQuery(DynamicQuery dynamicQuery, + int start, int end, OrderByComparator orderByComparator) + throws SystemException { + return getPersistence() + .findWithDynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) + */ + public static Title update(Title title) throws SystemException { + return getPersistence().update(title); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) + */ + public static Title update(Title title, ServiceContext serviceContext) + throws SystemException { + return getPersistence().update(title, serviceContext); + } + + /** + * Returns all the titles where companyId = ?. + * + * @param companyId the company ID + * @return the matching titles + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> findByCompanyId( + long companyId) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findByCompanyId(companyId); + } + + /** + * Returns a range of all the titles where companyId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param companyId the company ID + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @return the range of matching titles + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> findByCompanyId( + long companyId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findByCompanyId(companyId, start, end); + } + + /** + * Returns an ordered range of all the titles where companyId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param companyId the company ID + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching titles + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> findByCompanyId( + long companyId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .findByCompanyId(companyId, start, end, orderByComparator); + } + + /** + * Returns the first title in the ordered set where companyId = ?. + * + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a matching title could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title findByCompanyId_First( + long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException { + return getPersistence() + .findByCompanyId_First(companyId, orderByComparator); + } + + /** + * Returns the first title in the ordered set where companyId = ?. + * + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching title, or <code>null</code> if a matching title could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title fetchByCompanyId_First( + long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .fetchByCompanyId_First(companyId, orderByComparator); + } + + /** + * Returns the last title in the ordered set where companyId = ?. + * + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a matching title could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title findByCompanyId_Last( + long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException { + return getPersistence() + .findByCompanyId_Last(companyId, orderByComparator); + } + + /** + * Returns the last title in the ordered set where companyId = ?. + * + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching title, or <code>null</code> if a matching title could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title fetchByCompanyId_Last( + long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .fetchByCompanyId_Last(companyId, orderByComparator); + } + + /** + * Returns the titles before and after the current title in the ordered set where companyId = ?. + * + * @param titleId the primary key of the current title + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title[] findByCompanyId_PrevAndNext( + long titleId, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException { + return getPersistence() + .findByCompanyId_PrevAndNext(titleId, companyId, + orderByComparator); + } + + /** + * Removes all the titles where companyId = ? from the database. + * + * @param companyId the company ID + * @throws SystemException if a system exception occurred + */ + public static void removeByCompanyId(long companyId) + throws com.liferay.portal.kernel.exception.SystemException { + getPersistence().removeByCompanyId(companyId); + } + + /** + * Returns the number of titles where companyId = ?. + * + * @param companyId the company ID + * @return the number of matching titles + * @throws SystemException if a system exception occurred + */ + public static int countByCompanyId(long companyId) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().countByCompanyId(companyId); + } + + /** + * Caches the title in the entity cache if it is enabled. + * + * @param title the title + */ + public static void cacheResult( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) { + getPersistence().cacheResult(title); + } + + /** + * Caches the titles in the entity cache if it is enabled. + * + * @param titles the titles + */ + public static void cacheResult( + java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> titles) { + getPersistence().cacheResult(titles); + } + + /** + * Creates a new title with the primary key. Does not add the title to the database. + * + * @param titleId the primary key for the new title + * @return the new title + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title create( + long titleId) { + return getPersistence().create(titleId); + } + + /** + * Removes the title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param titleId the primary key of the title + * @return the title that was removed + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title remove( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException { + return getPersistence().remove(titleId); + } + + public static ir.ac.iut.sccportal.guestdiscussion.model.Title updateImpl( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().updateImpl(title); + } + + /** + * Returns the title with the primary key or throws a {@link ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException} if it could not be found. + * + * @param titleId the primary key of the title + * @return the title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title findByPrimaryKey( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException, + ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException { + return getPersistence().findByPrimaryKey(titleId); + } + + /** + * Returns the title with the primary key or returns <code>null</code> if it could not be found. + * + * @param titleId the primary key of the title + * @return the title, or <code>null</code> if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static ir.ac.iut.sccportal.guestdiscussion.model.Title fetchByPrimaryKey( + long titleId) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByPrimaryKey(titleId); + } + + /** + * Returns all the titles. + * + * @return the titles + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> findAll() + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findAll(); + } + + /** + * Returns a range of all the titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @return the range of titles + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> findAll( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findAll(start, end); + } + + /** + * Returns an ordered range of all the titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of titles + * @throws SystemException if a system exception occurred + */ + public static java.util.List<ir.ac.iut.sccportal.guestdiscussion.model.Title> findAll( + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findAll(start, end, orderByComparator); + } + + /** + * Removes all the titles from the database. + * + * @throws SystemException if a system exception occurred + */ + public static void removeAll() + throws com.liferay.portal.kernel.exception.SystemException { + getPersistence().removeAll(); + } + + /** + * Returns the number of titles. + * + * @return the number of titles + * @throws SystemException if a system exception occurred + */ + public static int countAll() + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().countAll(); + } + + public static TitlePersistence getPersistence() { + if (_persistence == null) { + _persistence = (TitlePersistence)PortletBeanLocatorUtil.locate(ir.ac.iut.sccportal.guestdiscussion.service.ClpSerializer.getServletContextName(), + TitlePersistence.class.getName()); + + ReferenceRegistry.registerReference(TitleUtil.class, "_persistence"); + } + + return _persistence; + } + + /** + * @deprecated As of 6.2.0 + */ + public void setPersistence(TitlePersistence persistence) { + } + + private static TitlePersistence _persistence; +} \ No newline at end of file diff --git a/docroot/WEB-INF/sql/indexes.properties b/docroot/WEB-INF/sql/indexes.properties new file mode 100644 index 0000000..8bf0bc3 --- /dev/null +++ b/docroot/WEB-INF/sql/indexes.properties @@ -0,0 +1,7 @@ +IX_C0B070CD=GDP_Comment.ParentId_TitleId_Verified +IX_73EC900A=GDP_Comment.TitleId +IX_16F13346=GDP_Comment.TitleId_Virified + +IX_52ADC273=GDP_PortletTitle.TitleId + +IX_13096E16=GDP_Title.CompanyId \ No newline at end of file diff --git a/docroot/WEB-INF/sql/indexes.sql b/docroot/WEB-INF/sql/indexes.sql new file mode 100644 index 0000000..2d96346 --- /dev/null +++ b/docroot/WEB-INF/sql/indexes.sql @@ -0,0 +1,7 @@ +create index IX_C0B070CD on GDP_Comment (parentId, titleId, verified); +create index IX_73EC900A on GDP_Comment (titleId); +create index IX_16F13346 on GDP_Comment (titleId, verified); + +create index IX_52ADC273 on GDP_PortletTitle (titleId); + +create index IX_13096E16 on GDP_Title (companyId); \ No newline at end of file diff --git a/docroot/WEB-INF/sql/sequences.sql b/docroot/WEB-INF/sql/sequences.sql new file mode 100644 index 0000000..e69de29 diff --git a/docroot/WEB-INF/sql/tables.sql b/docroot/WEB-INF/sql/tables.sql new file mode 100644 index 0000000..bd48a37 --- /dev/null +++ b/docroot/WEB-INF/sql/tables.sql @@ -0,0 +1,34 @@ +create table GDP_Comment ( + commentId LONG not null primary key IDENTITY, + groupId LONG, + companyId LONG, + modifiedDate DATE null, + parentId LONG, + parentName VARCHAR(75) null, + commentText TEXT null, + guestName VARCHAR(75) null, + guestEmailAddress VARCHAR(75) null, + guestEmailNotification BOOLEAN, + likeCount LONG, + dislikeCount LONG, + titleId LONG, + verified BOOLEAN, + hasAnswer BOOLEAN +); + +create table GDP_PortletTitle ( + portletId VARCHAR(75) not null primary key, + titleId LONG +); + +create table GDP_Title ( + titleId LONG not null primary key IDENTITY, + groupId LONG, + companyId LONG, + userId LONG, + userName VARCHAR(75) null, + createDate DATE null, + titleText VARCHAR(1000) null, + newCommentDraft TEXT null, + answerCommentDraft TEXT null +); \ No newline at end of file diff --git a/docroot/WEB-INF/src/Language_en_US.properties b/docroot/WEB-INF/src/Language_en_US.properties new file mode 100644 index 0000000..5e1fc17 --- /dev/null +++ b/docroot/WEB-INF/src/Language_en_US.properties @@ -0,0 +1,43 @@ +javax.portlet.title=Guest Discussion +javax.portlet.short-title=Guest Discussion +javax.portlet.keywords=Discussion +commentbox.user.empty=You need to be logged in to create a comment. +commentbox.guest.name=Your Name +commentbox.guest.email=Email +commentbox.editor.notclicked=Leave a comment... +commentbox.editor.save=Post +commentbox.editor.savedraft=Save Draft +commentbox.editor.clear=Clear +commentbox.editor.cancel=Cancel +commentbox.editor.submitting=Submitting +commentbox.comments.empty=There are no comments yet. +commentbox.comments.comment.likecount=Likes +commentbox.comments.comment.dislikecount=Dislikes +commentbox.comments.comment.like=Like +commentbox.comments.comment.dislike=Dislike +commentbox.comments.comment.spam=Spam +commentbox.comments.comment.edit=Edit +commentbox.comments.comment.delete=Delete +commentbox.comments.comment.reply=Reply +commentbox.comments.comment.deletedmsg=This comment was deleted by the Author +commentbox.comments.comment.new.single=Show new Comment +commentbox.comments.comment.new.multiple=Show {0} new Comments +commentbox.comments.comment.newreply.single=Show new reply +commentbox.comments.comment.newreplies.multiple=Show {0} new replies +commentbox.comments.comment.typinguser.single=One typing User... +commentbox.comments.comment.typinguser.multiple={0} typing Users... +Select-Topic=Select Title +Verify-Comments=Verify Comments +Discussion-Topic=Discussion Topic +New-Topic=New Topic +There-is-no-unverified-comment=There is no unverified comment. +There-is-no-title=There is no title. +Guest-Name=Guest Name +Are-you-sure-about-deleting-this-title=Are you sure about deleting this title? +Deleting-title=Deleting title +Are-you-sure-about-deleting-this-comment=Are you sure about deleting this comment? +Deleting-comment=Deleting comment +Reply-to=Reply to +inform-by-email=Notify you when we received a new reply to your comment +empty-title-message=The configuration of this place has not set yet. Please contact admin. +inform-by-email-help=if you choose this option, you will be notified by email when we receive a new answer to your comment \ No newline at end of file diff --git a/docroot/WEB-INF/src/Language_fa.properties b/docroot/WEB-INF/src/Language_fa.properties new file mode 100644 index 0000000..61f06e3 --- /dev/null +++ b/docroot/WEB-INF/src/Language_fa.properties @@ -0,0 +1,53 @@ +javax.portlet.title=نظر مهمان +javax.portlet.short-title=نظر مهمان +javax.portlet.keywords=نظر +commentbox.user.empty=You need to be logged in to create a comment. +commentbox.guest.name=نام شما +commentbox.guest.email=ایمیل +commentbox.editor.notclicked=Leave a comment... +commentbox.editor.save=ارسال +commentbox.editor.savedraft=ذخیره پیش نویس +commentbox.editor.clear=پاک کردن +commentbox.editor.cancel=لغو +commentbox.editor.submitting=Submitting +commentbox.comments.empty=هیچ پیامی برای این موضوع ارسال نشده است. +commentbox.comments.comment.likecount=موافق ها +commentbox.comments.comment.dislikecount=مخالف ها +commentbox.comments.comment.like=موافق +commentbox.comments.comment.dislike=مخالف +commentbox.comments.comment.spam=Spam +commentbox.comments.comment.edit=Edit +commentbox.comments.comment.delete=Delete +commentbox.comments.comment.reply=پاسخ +commentbox.comments.comment.deletedmsg=This comment was deleted by the Author +commentbox.comments.comment.new.single=Show new Comment +commentbox.comments.comment.new.multiple=Show {0} new Comments +commentbox.comments.comment.newreply.single=Show new reply +commentbox.comments.comment.newreplies.multiple=Show {0} new replies +commentbox.comments.comment.typinguser.single=One typing User... +commentbox.comments.comment.typinguser.multiple={0} typing Users... +Select-Topic=انتخاب موضوع +Verify-Comments=تایید پیام ها +Discussion-Topic=موضوع بحث +New-Topic=موضوع جدید +Add=اضافه کردن +Please-enter--a-topic-first=لطفا ابتدا یک موضوع وارد کنید! +Choose=انتخاب کردن +Comment=پیام +There-is-no-unverified-comment=پیام تایید نشده ای وجود ندارد. +There-is-no-title=موضوعی وجود ندارد. +Guest-Name=نام مهمان +Verify=تایید +Unverify=عدم تایید +Delete=حذف +Titles=موضوع ها +Are-you-sure-about-deleting-this-title=آیا از حذف این موضوع اطمینان دارید؟ +Deleting-title=حذف موضوع +Are-you-sure-about-deleting-this-comment=آیا از حذف این پیام اطمینان دارید؟ +Deleting-comment=حذف پیام +Yes=بلی +No=خیر +Reply-to=پاسخ به +inform-by-email=اطلاع رسانی هنگام دریافت پاسخ جدید به پیام شما +empty-title-message=تنظیمات لازم برای این بخش انجام نشده است. لطفا با مدیر تماس حاصل نمایید. +inform-by-email-help=در صورت انتخاب این گزینه، در صورتی که برای نظرهای شما پاسخی درج شد، از طریق ایمیل به شما اطلاع‌رسانی می‌شود. \ No newline at end of file diff --git a/docroot/WEB-INF/src/META-INF/base-spring.xml b/docroot/WEB-INF/src/META-INF/base-spring.xml new file mode 100644 index 0000000..8e5edba --- /dev/null +++ b/docroot/WEB-INF/src/META-INF/base-spring.xml @@ -0,0 +1,126 @@ +<?xml version="1.0"?> + +<beans + default-destroy-method="destroy" + default-init-method="afterPropertiesSet" + xmlns="http://www.springframework.org/schema/beans" + xmlns:aop="http://www.springframework.org/schema/aop" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" +> + <bean class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.spring.aop.ServiceBeanAutoProxyCreator" /> + <constructor-arg> + <map> + <entry key="beanMatcher"> + <bean class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.spring.aop.ServiceBeanMatcher" /> + </bean> + </entry> + <entry key="methodInterceptor" value-ref="serviceAdvice" /> + </map> + </constructor-arg> + </bean> + <bean class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor" /> + </bean> + <bean class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.spring.context.PortletBeanFactoryCleaner" /> + </bean> + <bean id="portletClassLoader" class="com.liferay.portal.kernel.portlet.PortletClassLoaderUtil" factory-method="getClassLoader" /> + <bean id="servletContextName" class="com.liferay.portal.kernel.portlet.PortletClassLoaderUtil" factory-method="getServletContextName" /> + <bean id="basePersistence" abstract="true"> + <property name="dataSource" ref="liferayDataSource" /> + <property name="sessionFactory" ref="liferaySessionFactory" /> + </bean> + <bean id="serviceAdvice" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.spring.aop.SkipAdvice" /> + <constructor-arg> + <map> + <entry key="nextMethodInterceptor" value-ref="accessControlAdvice" /> + </map> + </constructor-arg> + </bean> + <bean id="accessControlAdvice" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.security.ac.AccessControlAdvice" /> + <constructor-arg> + <map> + <entry key="accessControlAdvisor"> + <bean class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.security.ac.AccessControlAdvisorImpl" /> + </bean> + </entry> + <entry key="nextMethodInterceptor" value-ref="portalResiliencyAdvice" /> + </map> + </constructor-arg> + </bean> + <bean id="portalResiliencyAdvice" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.resiliency.service.PortalResiliencyAdvice" /> + <constructor-arg> + <map> + <entry key="nextMethodInterceptor" value-ref="serviceMonitorAdvice" /> + </map> + </constructor-arg> + </bean> + <bean id="serviceMonitorAdvice" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.monitoring.statistics.service.ServiceMonitorAdvice" /> + <constructor-arg> + <map> + <entry key="nextMethodInterceptor" value-ref="asyncAdvice" /> + </map> + </constructor-arg> + </bean> + <bean id="asyncAdvice" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.messaging.async.AsyncAdvice" /> + <constructor-arg> + <map> + <entry key="defaultDestinationName" value="liferay/async_service" /> + <entry key="nextMethodInterceptor" value-ref="threadLocalCacheAdvice" /> + </map> + </constructor-arg> + </bean> + <bean id="threadLocalCacheAdvice" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.cache.ThreadLocalCacheAdvice" /> + <constructor-arg> + <map> + <entry key="nextMethodInterceptor" value-ref="bufferedIncrementAdvice" /> + </map> + </constructor-arg> + </bean> + <bean id="bufferedIncrementAdvice" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.increment.BufferedIncrementAdvice" /> + <constructor-arg> + <map> + <entry key="nextMethodInterceptor" value-ref="indexableAdvice" /> + </map> + </constructor-arg> + </bean> + <bean id="indexableAdvice" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.search.IndexableAdvice" /> + <constructor-arg> + <map> + <entry key="nextMethodInterceptor" value-ref="systemEventAdvice" /> + </map> + </constructor-arg> + </bean> + <bean id="systemEventAdvice" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.systemevent.SystemEventAdvice" /> + <constructor-arg> + <map> + <entry key="nextMethodInterceptor" value-ref="transactionAdvice" /> + </map> + </constructor-arg> + </bean> + <bean id="transactionAdvice" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.spring.transaction.TransactionInterceptorFactoryBean" /> + <constructor-arg> + <map> + <entry key="platformTransactionManager" value-ref="liferayTransactionManager" /> + <entry key="transactionAttributeSource" value-ref="transactionAttributeSource" /> + </map> + </constructor-arg> + </bean> + <bean id="transactionAttributeSource" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.spring.transaction.AnnotationTransactionAttributeSource" /> + </bean> +</beans> \ No newline at end of file diff --git a/docroot/WEB-INF/src/META-INF/cluster-spring.xml b/docroot/WEB-INF/src/META-INF/cluster-spring.xml new file mode 100644 index 0000000..cd5219b --- /dev/null +++ b/docroot/WEB-INF/src/META-INF/cluster-spring.xml @@ -0,0 +1,19 @@ +<?xml version="1.0"?> + +<beans + default-destroy-method="destroy" + default-init-method="afterPropertiesSet" + xmlns="http://www.springframework.org/schema/beans" + xmlns:util="http://www.springframework.org/schema/util" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd" +> + <bean class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.cluster.ClusterableChainableMethodAdviceInjector" /> + <constructor-arg> + <map> + <entry key="parentChainableMethodAdvice" value-ref="serviceAdvice" /> + </map> + </constructor-arg> + </bean> +</beans> \ No newline at end of file diff --git a/docroot/WEB-INF/src/META-INF/hibernate-spring.xml b/docroot/WEB-INF/src/META-INF/hibernate-spring.xml new file mode 100644 index 0000000..27564a2 --- /dev/null +++ b/docroot/WEB-INF/src/META-INF/hibernate-spring.xml @@ -0,0 +1,29 @@ +<?xml version="1.0"?> + +<beans + default-destroy-method="destroy" + default-init-method="afterPropertiesSet" + xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" +> + <bean id="liferayHibernateSessionFactory" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.spring.hibernate.PortletHibernateConfiguration" /> + <constructor-arg> + <map> + <entry key="dataSource" value-ref="liferayDataSource" /> + </map> + </constructor-arg> + </bean> + <bean id="liferaySessionFactory" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.dao.orm.hibernate.PortletSessionFactoryImpl" /> + <constructor-arg> + <map> + <entry key="dataSource" value-ref="liferayDataSource" /> + <entry key="sessionFactoryClassLoader" value-ref="portletClassLoader" /> + <entry key="sessionFactoryImplementor" value-ref="liferayHibernateSessionFactory" /> + </map> + </constructor-arg> + </bean> + <bean id="liferayTransactionManager" class="com.liferay.portal.kernel.util.InfrastructureUtil" factory-method="getTransactionManager" /> +</beans> \ No newline at end of file diff --git a/docroot/WEB-INF/src/META-INF/infrastructure-spring.xml b/docroot/WEB-INF/src/META-INF/infrastructure-spring.xml new file mode 100644 index 0000000..380d697 --- /dev/null +++ b/docroot/WEB-INF/src/META-INF/infrastructure-spring.xml @@ -0,0 +1,11 @@ +<?xml version="1.0"?> + +<beans + default-destroy-method="destroy" + default-init-method="afterPropertiesSet" + xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" +> + <bean id="liferayDataSource" class="com.liferay.portal.kernel.util.InfrastructureUtil" factory-method="getDataSource" /> +</beans> \ No newline at end of file diff --git a/docroot/WEB-INF/src/META-INF/portlet-hbm.xml b/docroot/WEB-INF/src/META-INF/portlet-hbm.xml new file mode 100644 index 0000000..0936b9a --- /dev/null +++ b/docroot/WEB-INF/src/META-INF/portlet-hbm.xml @@ -0,0 +1,49 @@ +<?xml version="1.0"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> + +<hibernate-mapping default-lazy="false" auto-import="false"> + <import class="ir.ac.iut.sccportal.guestdiscussion.model.Comment" /> + <import class="ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle" /> + <import class="ir.ac.iut.sccportal.guestdiscussion.model.Title" /> + <class name="ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentImpl" table="GDP_Comment"> + <cache usage="read-write" /> + <id name="commentId" type="long"> + <generator class="identity" /> + </id> + <property name="groupId" type="com.liferay.portal.dao.orm.hibernate.LongType" /> + <property name="companyId" type="com.liferay.portal.dao.orm.hibernate.LongType" /> + <property name="modifiedDate" type="org.hibernate.type.TimestampType" /> + <property name="parentId" type="com.liferay.portal.dao.orm.hibernate.LongType" /> + <property name="parentName" type="com.liferay.portal.dao.orm.hibernate.StringType" /> + <property name="commentText" type="com.liferay.portal.dao.orm.hibernate.StringType" /> + <property name="guestName" type="com.liferay.portal.dao.orm.hibernate.StringType" /> + <property name="guestEmailAddress" type="com.liferay.portal.dao.orm.hibernate.StringType" /> + <property name="guestEmailNotification" type="com.liferay.portal.dao.orm.hibernate.BooleanType" /> + <property name="likeCount" type="com.liferay.portal.dao.orm.hibernate.LongType" /> + <property name="dislikeCount" type="com.liferay.portal.dao.orm.hibernate.LongType" /> + <property name="titleId" type="com.liferay.portal.dao.orm.hibernate.LongType" /> + <property name="verified" type="com.liferay.portal.dao.orm.hibernate.BooleanType" /> + <property name="hasAnswer" type="com.liferay.portal.dao.orm.hibernate.BooleanType" /> + </class> + <class name="ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleImpl" table="GDP_PortletTitle"> + <cache usage="read-write" /> + <id name="portletId" type="java.lang.String"> + <generator class="assigned" /> + </id> + <property name="titleId" type="com.liferay.portal.dao.orm.hibernate.LongType" /> + </class> + <class name="ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleImpl" table="GDP_Title"> + <cache usage="read-write" /> + <id name="titleId" type="long"> + <generator class="identity" /> + </id> + <property name="groupId" type="com.liferay.portal.dao.orm.hibernate.LongType" /> + <property name="companyId" type="com.liferay.portal.dao.orm.hibernate.LongType" /> + <property name="userId" type="com.liferay.portal.dao.orm.hibernate.LongType" /> + <property name="userName" type="com.liferay.portal.dao.orm.hibernate.StringType" /> + <property name="createDate" type="org.hibernate.type.TimestampType" /> + <property name="titleText" type="com.liferay.portal.dao.orm.hibernate.StringType" /> + <property name="newCommentDraft" type="com.liferay.portal.dao.orm.hibernate.StringType" /> + <property name="answerCommentDraft" type="com.liferay.portal.dao.orm.hibernate.StringType" /> + </class> +</hibernate-mapping> \ No newline at end of file diff --git a/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml b/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml new file mode 100644 index 0000000..843e258 --- /dev/null +++ b/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> + +<model-hints> + <model name="ir.ac.iut.sccportal.guestdiscussion.model.Comment"> + <field name="commentId" type="long" /> + <field name="groupId" type="long" /> + <field name="companyId" type="long" /> + <field name="modifiedDate" type="Date" /> + <field name="parentId" type="long" /> + <field name="parentName" type="String" /> + <field name="commentText" type="String"> + <hint name="max-length">10000</hint> + </field> + <field name="guestName" type="String" /> + <field name="guestEmailAddress" type="String" /> + <field name="guestEmailNotification" type="boolean" /> + <field name="likeCount" type="long" /> + <field name="dislikeCount" type="long" /> + <field name="titleId" type="long" /> + <field name="verified" type="boolean" /> + <field name="hasAnswer" type="boolean" /> + </model> + <model name="ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle"> + <field name="portletId" type="String" /> + <field name="titleId" type="long" /> + </model> + <model name="ir.ac.iut.sccportal.guestdiscussion.model.Title"> + <field name="titleId" type="long" /> + <field name="groupId" type="long" /> + <field name="companyId" type="long" /> + <field name="userId" type="long" /> + <field name="userName" type="String" /> + <field name="createDate" type="Date" /> + <field name="titleText" type="String"> + <hint name="max-length">1000</hint> + </field> + <field name="newCommentDraft" type="String"> + <hint name="max-length">10000</hint> + </field> + <field name="answerCommentDraft" type="String"> + <hint name="max-length">10000</hint> + </field> + </model> +</model-hints> \ No newline at end of file diff --git a/docroot/WEB-INF/src/META-INF/portlet-orm.xml b/docroot/WEB-INF/src/META-INF/portlet-orm.xml new file mode 100644 index 0000000..e2b870b --- /dev/null +++ b/docroot/WEB-INF/src/META-INF/portlet-orm.xml @@ -0,0 +1,74 @@ +<?xml version="1.0"?> + +<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"> + <persistence-unit-metadata> + <xml-mapping-metadata-complete/> + <persistence-unit-defaults> + <access>PROPERTY</access> + </persistence-unit-defaults> + </persistence-unit-metadata> + <mapped-superclass class="ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl"> + <attributes> + <id name="commentId" /> + <basic name="groupId" /> + <basic name="companyId" /> + <basic name="modifiedDate"> + <temporal>TIMESTAMP</temporal> + </basic> + <basic name="parentId" /> + <basic name="parentName" /> + <basic name="commentText" /> + <basic name="guestName" /> + <basic name="guestEmailAddress" /> + <basic name="guestEmailNotification" /> + <basic name="likeCount" /> + <basic name="dislikeCount" /> + <basic name="titleId" /> + <basic name="verified" /> + <basic name="hasAnswer" /> + <transient name="modelAttributes" /> + <transient name="primaryKey" /> + <transient name="primaryKeyObj" /> + </attributes> + </mapped-superclass> + <mapped-superclass class="ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl"> + <attributes> + <id name="portletId" /> + <basic name="titleId" /> + <transient name="modelAttributes" /> + <transient name="primaryKey" /> + <transient name="primaryKeyObj" /> + </attributes> + </mapped-superclass> + <mapped-superclass class="ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl"> + <attributes> + <id name="titleId" /> + <basic name="groupId" /> + <basic name="companyId" /> + <basic name="userId" /> + <basic name="userName" /> + <basic name="createDate"> + <temporal>TIMESTAMP</temporal> + </basic> + <basic name="titleText" /> + <basic name="newCommentDraft" /> + <basic name="answerCommentDraft" /> + <transient name="modelAttributes" /> + <transient name="primaryKey" /> + <transient name="primaryKeyObj" /> + <transient name="userUuid" /> + </attributes> + </mapped-superclass> + <entity class="ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentImpl" name="Comment"> + <table name="GDP_Comment" /> + <attributes /> + </entity> + <entity class="ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleImpl" name="PortletTitle"> + <table name="GDP_PortletTitle" /> + <attributes /> + </entity> + <entity class="ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleImpl" name="Title"> + <table name="GDP_Title" /> + <attributes /> + </entity> +</entity-mappings> \ No newline at end of file diff --git a/docroot/WEB-INF/src/META-INF/portlet-spring.xml b/docroot/WEB-INF/src/META-INF/portlet-spring.xml new file mode 100644 index 0000000..a5be5d6 --- /dev/null +++ b/docroot/WEB-INF/src/META-INF/portlet-spring.xml @@ -0,0 +1,13 @@ +<?xml version="1.0"?> + +<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" default-destroy-method="destroy" default-init-method="afterPropertiesSet" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> + <bean id="ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService" class="ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentLocalServiceImpl" /> + <bean id="ir.ac.iut.sccportal.guestdiscussion.service.CommentService" class="ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentServiceImpl" /> + <bean id="ir.ac.iut.sccportal.guestdiscussion.service.persistence.CommentPersistence" class="ir.ac.iut.sccportal.guestdiscussion.service.persistence.CommentPersistenceImpl" parent="basePersistence" /> + <bean id="ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService" class="ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleLocalServiceImpl" /> + <bean id="ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService" class="ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleServiceImpl" /> + <bean id="ir.ac.iut.sccportal.guestdiscussion.service.persistence.PortletTitlePersistence" class="ir.ac.iut.sccportal.guestdiscussion.service.persistence.PortletTitlePersistenceImpl" parent="basePersistence" /> + <bean id="ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService" class="ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleLocalServiceImpl" /> + <bean id="ir.ac.iut.sccportal.guestdiscussion.service.TitleService" class="ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleServiceImpl" /> + <bean id="ir.ac.iut.sccportal.guestdiscussion.service.persistence.TitlePersistence" class="ir.ac.iut.sccportal.guestdiscussion.service.persistence.TitlePersistenceImpl" parent="basePersistence" /> +</beans> \ No newline at end of file diff --git a/docroot/WEB-INF/src/META-INF/shard-data-source-spring.xml b/docroot/WEB-INF/src/META-INF/shard-data-source-spring.xml new file mode 100644 index 0000000..fe293f4 --- /dev/null +++ b/docroot/WEB-INF/src/META-INF/shard-data-source-spring.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> + +<beans + default-destroy-method="destroy" + default-init-method="afterPropertiesSet" + xmlns="http://www.springframework.org/schema/beans" + xmlns:aop="http://www.springframework.org/schema/aop" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" +> + <bean id="com.liferay.portal.dao.shard.advice.ShardAdvice" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.dao.shard.advice.ShardAdvice" /> + </bean> + <bean id="com.liferay.portal.dao.shard.advice.ShardPersistenceAdvice" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean"> + <constructor-arg value="com.liferay.portal.dao.shard.advice.ShardPersistenceAdvice" /> + <constructor-arg> + <map> + <entry key="shardAdvice" value-ref="com.liferay.portal.dao.shard.advice.ShardAdvice" /> + </map> + </constructor-arg> + </bean> + <aop:config proxy-target-class="false"> + <aop:advisor advice-ref="com.liferay.portal.dao.shard.advice.ShardPersistenceAdvice" pointcut="bean(*Persistence) || bean(*Finder)" /> + </aop:config> +</beans> \ No newline at end of file diff --git a/docroot/WEB-INF/src/i18n.properties b/docroot/WEB-INF/src/i18n.properties new file mode 100644 index 0000000..af9e8ed --- /dev/null +++ b/docroot/WEB-INF/src/i18n.properties @@ -0,0 +1 @@ +guest-discussion-hello-world=Hello Guest Discussion \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/Comment.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/Comment.java new file mode 100644 index 0000000..9945d1a --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/Comment.java @@ -0,0 +1,120 @@ + +package ir.ac.iut.sccportal.guestdiscussion.bean; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class Comment implements Serializable{ + private static final long serialVersionUID = -7901024765095281401L; + + private long id; + private String comment_text; + private String guestName; + private Date modification_time; + private long likecount; + private long dislikeCount; + private Comment parent; + private List<Comment> answers = new ArrayList<Comment>(); + private boolean hasAnswer; + + private Object tag; + + + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public String getComment_text() { + return comment_text; + } + + public void setComment_text(String comment_text) { + this.comment_text = comment_text; + } + + + public String getGuestName() { + return guestName; + } + + public void setGuestName(String guestName) { + this.guestName = guestName; + } + + public Date getModification_time() { + return modification_time; + } + + public void setModification_time(Date modification_time) { + this.modification_time = modification_time; + } + + public long getLikecount() { + return likecount; + } + + public void setLikecount(long likecount) { + this.likecount = likecount; + } + + public Object getTag() { + return tag; + } + + public void setTag(Object tag) { + this.tag = tag; + } + + public List<Comment> getAnswers() { + return answers; + } + + public void setAnswers(List<Comment> answers) { + this.answers = answers; + } + + public Comment getParent() { + return parent; + } + + public void setParent(Comment parent) { + this.parent = parent; + } + + + public boolean isHasAnswer() { + return hasAnswer; + } + + public void setHasAnswer(boolean hasAnswer) { + this.hasAnswer = hasAnswer; + } + + + + public long getDislikeCount() { + return dislikeCount; + } + + public void setDislikeCount(long dislikeCount) { + this.dislikeCount = dislikeCount; + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof Comment) { + Comment other = (Comment)obj; + + return this.getId()==(other.getId()); + } + + return false; + } +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/CommentBoxB.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/CommentBoxB.java new file mode 100644 index 0000000..650df28 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/CommentBoxB.java @@ -0,0 +1,1245 @@ +package ir.ac.iut.sccportal.guestdiscussion.bean; + +import ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle; +import ir.ac.iut.sccportal.guestdiscussion.model.Title; +import ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalServiceUtil; +import ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalServiceUtil; +import ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil; + +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.StringReader; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.ResourceBundle; +import java.util.logging.Logger; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.annotation.PostConstruct; +import javax.el.ValueExpression; +import javax.faces.application.FacesMessage; +import javax.faces.application.ProjectStage; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.ViewScoped; +import javax.faces.component.UIComponent; +import javax.faces.component.UINamingContainer; +import javax.faces.context.ExternalContext; +import javax.faces.context.FacesContext; +import javax.json.Json; +import javax.json.JsonObject; +import javax.json.JsonReader; +import javax.mail.internet.AddressException; +import javax.mail.internet.InternetAddress; +import javax.net.ssl.HttpsURLConnection; +import javax.portlet.PortletRequest; + +import org.primefaces.model.DefaultTreeNode; +import org.primefaces.model.TreeNode; + +import com.liferay.faces.portal.context.LiferayFacesContext; +import com.liferay.mail.service.MailServiceUtil; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.mail.MailMessage; +import com.liferay.portal.kernel.util.PrefsPropsUtil; +import com.liferay.portal.kernel.util.PropsKeys; + +@ManagedBean(name = "commentBoxB") +@ViewScoped +public class CommentBoxB extends UINamingContainer { + + public static final String RESOURCE_BUNDLE = "Language"; + + private String currentUserAvatarUrl; + private String currentUserUsername; + private String guestName; + private String new_comment_editor_text; + private List<Comment> comments; + private Boolean canEditAll; + private Boolean canDeleteAll; + private long commentCount; + private long commentsPerPage; + private long currentPage; + private String edit_comment_editor_text; + private String answer_comment_editor_text; + private Boolean enableLiveFeatures; + private String contextID; + private String discussionTitle; + private long titleId; + private String guestEmailAddress; + private boolean guestEmailNotification; + private boolean administratorFeatures; + + private TreeNode reversedTree; + private String currentLocale; + private String portalEmailAddress; + + // simulation functions + + private void loadAnswerComments(Comment parentComment) { + try { + List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> answerCommentList = CommentLocalServiceUtil + .getCommentsByParentId_TitleId_Verified( + parentComment.getId(), titleId, true); + parentComment.setAnswers(new ArrayList<Comment>()); + for (int i = 0; i < answerCommentList.size(); i++) { + Comment answerComment = new Comment(); + answerComment.setId(answerCommentList.get(i).getCommentId()); + answerComment.setComment_text(answerCommentList.get(i) + .getCommentText()); + answerComment.setGuestName(answerCommentList.get(i) + .getGuestName()); + answerComment.setModification_time(answerCommentList.get(i) + .getModifiedDate()); + answerComment.setLikecount(answerCommentList.get(i) + .getLikeCount()); + answerComment.setDislikeCount(answerCommentList.get(i) + .getDislikeCount()); + answerComment.setParent(parentComment); + answerComment.setHasAnswer(answerCommentList.get(i) + .getHasAnswer()); + if (answerCommentList.get(i).getHasAnswer() == true) { + loadAnswerComments(answerComment); + } + parentComment.getAnswers().add(answerComment); + } + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + private void loadRootComments() { + /* + * comments = dbSimulator.getRootComments((currentPage - 1L) + * commentsPerPage, commentsPerPage); commentCount = + * dbSimulator.getRootCommentCount(); + */ + try { + List<ir.ac.iut.sccportal.guestdiscussion.model.Comment> rootCommentList = CommentLocalServiceUtil + .getCommentsByParentId_TitleId_Verified(-1, titleId, true); + comments = new ArrayList<Comment>(); + + for (int i = 0; i < rootCommentList.size(); i++) { + Comment rootComment = new Comment(); + rootComment.setId(rootCommentList.get(i).getCommentId()); + rootComment.setComment_text(rootCommentList.get(i) + .getCommentText()); + rootComment.setGuestName(rootCommentList.get(i).getGuestName()); + rootComment.setModification_time(rootCommentList.get(i) + .getModifiedDate()); + rootComment.setLikecount(rootCommentList.get(i).getLikeCount()); + rootComment.setDislikeCount(rootCommentList.get(i) + .getDislikeCount()); + rootComment.setParent(null); + rootComment.setHasAnswer(rootCommentList.get(i).getHasAnswer()); + if (rootCommentList.get(i).getHasAnswer() == true) { + loadAnswerComments(rootComment); + } + + comments.add(rootComment); + + } + commentCount = rootCommentList.size(); + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + @PostConstruct + public void init() { + + try { + Map<String, String[]> serverPortletPreferencesMap; + serverPortletPreferencesMap = PrefsPropsUtil.getPreferences() + .getMap(); + portalEmailAddress = serverPortletPreferencesMap + .get(PropsKeys.MAIL_SESSION_MAIL_SMTP_USER)[0]; + } catch (SystemException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + + String lower = "abcdefghigklmnopqrstuvwxyz"; + String upper = lower.toUpperCase(); + String alphabets = lower + upper; + final int N = alphabets.length(); + Random r = new Random(); + int randomNumber1 = r.nextInt(N); + int randomNumber2 = r.nextInt(N); + String firstPart = alphabets + .substring(randomNumber1, randomNumber1 + 1); + String secondPart = alphabets.substring(randomNumber2, + randomNumber2 + 1); + String randomId = firstPart + secondPart; + setId(randomId); + currentUserAvatarUrl = "../resources/images/default_avatar.png"; + LiferayFacesContext liferayFacesContext = LiferayFacesContext + .getInstance(); + + currentLocale = liferayFacesContext.getLocale().getLanguage(); + administratorFeatures = false; + try { + PortletTitle portletTitle = PortletTitleLocalServiceUtil + .fetchPortletTitle(liferayFacesContext + .getPortletInstanceId()); + if (portletTitle != null) { + titleId = portletTitle.getTitleId(); + Title title = TitleLocalServiceUtil.getTitle(titleId); + discussionTitle = title.getTitleText(); + for (int i = 0; i < liferayFacesContext.getUser().getRoles() + .size(); i++) { + if (liferayFacesContext.getUser().getRoles().get(i) + .getName().equals("Administrator")) { + Title currentTitle = TitleLocalServiceUtil + .getTitle(titleId); + new_comment_editor_text = currentTitle + .getNewCommentDraft(); + answer_comment_editor_text = currentTitle + .getAnswerCommentDraft(); + administratorFeatures = true; + + break; + } + } + + } else { + titleId = -1; + if (liferayFacesContext.getLocale().getLanguage() == "en") { + discussionTitle = "No Title"; + + } else { + discussionTitle = "بدون موضوع"; + } + + } + + } catch (PortalException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + if (liferayFacesContext.getLocale().getLanguage() == "en") { + currentUserUsername = "Please enter your comment in area below"; + + } else { + currentUserUsername = "لطفا نظرات خود را در کادر متنی زیر وارد کنید"; + } + enableLiveFeatures = false; + + // simulation codes + commentsPerPage = 30L; + currentPage = 1L; + + if (titleId != -1) { + loadRootComments(); + + } else { + comments = new ArrayList<Comment>(); + commentCount = 0; + } + + } + + // helping functions + + public void addErrorMessage(String summary, String id) { + FacesContext.getCurrentInstance().addMessage(id, + new FacesMessage(FacesMessage.SEVERITY_ERROR, null, summary)); + } + + public void addInfoMessage(String summary, String id) { + FacesContext.getCurrentInstance().addMessage(id, + new FacesMessage(FacesMessage.SEVERITY_INFO, null, summary)); + } + + private void _generateTree(TreeNode tn, Comment comment) { + TreeNode node0 = new DefaultTreeNode(new Pair<Boolean, Comment>(false, + comment), tn); + node0.setExpanded(true); + + // Add dummy child + new DefaultTreeNode(new Pair<Boolean, Comment>(true, comment), node0); + + List<Comment> comments = comment.getAnswers(); + + for (int i = comments.size() - 1; i >= 0; i--) { + _generateTree(node0, comments.get(i)); + } + } + + private void initTree() { + if (reversedTree == null) { + reversedTree = new DefaultTreeNode("Root", null); + + List<Comment> comments = getComments(); + + for (int i = comments.size() - 1; i >= 0; i--) { + _generateTree(reversedTree, comments.get(i)); + } + } + } + + private static String mapToJSON(ResourceBundle bundle) { + String json = "{"; + String iterator = ""; + + for (String k : bundle.keySet()) { + json += iterator + "\"" + k + "\"" + ":" + "\"" + + bundle.getString(k) + "\""; + iterator = ","; + } + + json += "}"; + + return json; + } + + private Comment _createComment(String text) { + Comment comment = new Comment(); + comment.setComment_text(text); + comment.setModification_time(new Date()); + if (guestName != null && guestName != "") { + comment.setGuestName(guestName); + } else { + LiferayFacesContext liferayFacesContext = LiferayFacesContext + .getInstance(); + if (liferayFacesContext.getLocale().getLanguage() == "en") { + comment.setGuestName("Anonymous"); + + } else { + comment.setGuestName("ناشناس"); + } + } + + return comment; + } + + public void addNode(Comment comment, TreeNode parent) { + TreeNode node0 = new DefaultTreeNode(new Pair<Boolean, Comment>(false, + comment), parent); + node0.setExpanded(true); + + // Add dummy child + new DefaultTreeNode(new Pair<Boolean, Comment>(true, comment), node0); + } + + public static void log(String msg) { + FacesContext ctx = FacesContext.getCurrentInstance(); + if (ctx.isProjectStage(ProjectStage.Development)) { + Logger.getLogger("CommentBox").info(msg); + } + } + + /* + * public void push(String msg) { if (!getEnableLiveFeatures()) { return; } + * + * log("push: " + msg); + * + * PushContext pushContext = PushContextFactory.getDefault() + * .getPushContext(); pushContext.push( "/commentboxpush-" + + * this.getClientId() + "-" + this.getContextID(), msg); } + */ + + private void _getCommentsAsList(List<Comment> comments, + List<Comment> commentsAsList) { + for (Comment comment : comments) { + commentsAsList.add(comment); + _getCommentsAsList(comment.getAnswers(), commentsAsList); + } + } + + private List<Comment> getCommentsAsList() { + List<Comment> result = new ArrayList<Comment>(); + _getCommentsAsList(getComments(), result); + return result; + } + + private Comment findCommentByID(long id) { + List<Comment> commentsAsList = getCommentsAsList(); + + for (Comment comment : commentsAsList) { + if (comment.getId() == (id)) { + return comment; + } + } + + return null; + } + + private void _getTreeAsList(List<TreeNode> children, + List<TreeNode> nodesAsList) { + for (TreeNode node : children) { + nodesAsList.add(node); + _getTreeAsList(node.getChildren(), nodesAsList); + } + } + + private List<TreeNode> getTreeAsList() { + List<TreeNode> result = new ArrayList<TreeNode>(); + _getTreeAsList(reversedTree.getChildren(), result); + return result; + } + + @SuppressWarnings("unchecked") + private TreeNode findByComment(Comment comment) { + List<TreeNode> treeAsList = getTreeAsList(); + + for (TreeNode treeNode : treeAsList) { + Pair<Boolean, Comment> wrapper = (Pair<Boolean, Comment>) treeNode + .getData(); + + if (wrapper.getRight().equals(comment)) { + return treeNode; + } + } + + return null; + } + + private boolean verifyRecaptcha(String gRecaptchaResponse) { + + if (administratorFeatures == true) { + return true; + } + + URL obj; + String secret = ""; + try { + + obj = new URL("https://www.google.com/recaptcha/api/siteverify"); + HttpsURLConnection connection = (HttpsURLConnection) obj + .openConnection(); + connection.setRequestMethod("POST"); + + String postParams = "secret=" + secret + "&response=" + + gRecaptchaResponse; + + connection.setDoOutput(true); + DataOutputStream wr = new DataOutputStream( + connection.getOutputStream()); + wr.writeBytes(postParams); + wr.flush(); + wr.close(); + + BufferedReader in = new BufferedReader(new InputStreamReader( + connection.getInputStream())); + String inputLine; + StringBuffer response = new StringBuffer(); + + while ((inputLine = in.readLine()) != null) { + response.append(inputLine); + } + in.close(); + + JsonReader jsonReader = Json.createReader(new StringReader(response + .toString())); + JsonObject jsonObject = jsonReader.readObject(); + jsonReader.close(); + + return jsonObject.getBoolean("success"); + + } catch (MalformedURLException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return false; + + } + + public boolean validateEmail(String emailAddress) { + String EMAIL_PATTERN = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@" + + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"; + Pattern pattern; + pattern = Pattern.compile(EMAIL_PATTERN); + Matcher matcher; + matcher = pattern.matcher(emailAddress); + return matcher.matches(); + } + + public void sendMail(String ReceiverEmailAddress, String replierName) { + InternetAddress fromAddress = null; + InternetAddress toAddress = null; + + if (portalEmailAddress != null && portalEmailAddress != "") { + try { + fromAddress = new InternetAddress(portalEmailAddress); + toAddress = new InternetAddress(ReceiverEmailAddress); + MailMessage mailMessage = new MailMessage(); + mailMessage.setTo(toAddress); + mailMessage.setFrom(fromAddress); + + if (currentLocale == "en") { + mailMessage.setSubject("New reply from discussion \"" + + discussionTitle + "\""); + mailMessage.setBody(replierName + + " has sent a new reply to your comment."); + } else { + mailMessage.setSubject("پاسخ جدید از بحث \"" + + discussionTitle + "\""); + mailMessage.setBody(replierName + + " پاسخ جدیدی به پیام شما داده است."); + + } + + MailServiceUtil.sendEmail(mailMessage); + } catch (AddressException e) { + e.printStackTrace(); + } + } + } + + // in XHTML functions + public static String cid(UIComponent component) { + FacesContext context = FacesContext.getCurrentInstance(); + return component.getClientId(context); + } + + public void createComment() { + + if ((guestEmailAddress == "" && guestEmailNotification == false) + || (validateEmail(guestEmailAddress) == true)) { + + if (titleId != -1 && new_comment_editor_text.length() != 0) { + + log("createComment"); + + FacesContext facesContext = FacesContext.getCurrentInstance(); + ExternalContext externalContext = facesContext + .getExternalContext(); + PortletRequest portletRequest = (PortletRequest) externalContext + .getRequest(); + String gRecaptchaResponse = portletRequest + .getParameter("g-recaptcha-response"); + + if (verifyRecaptcha(gRecaptchaResponse) == true) { + boolean insertComment = false; + + List<Comment> comments = getComments(); + Comment comment = _createComment(new_comment_editor_text); + + LiferayFacesContext liferayFacesContext = LiferayFacesContext + .getInstance(); + ir.ac.iut.sccportal.guestdiscussion.model.Comment databaseComment = null; + try { + if (guestName != null && guestName != "") { + databaseComment = CommentLocalServiceUtil + .addComment(liferayFacesContext + .getScopeGroupId(), + liferayFacesContext.getCompanyId(), + new Date(), -1, + new_comment_editor_text, guestName, + 0, titleId, administratorFeatures, + false, "-", guestEmailAddress, + guestEmailNotification); + } + + else { + if (liferayFacesContext.getLocale().getLanguage() == "en") { + databaseComment = CommentLocalServiceUtil + .addComment(liferayFacesContext + .getScopeGroupId(), + liferayFacesContext + .getCompanyId(), + new Date(), -1, + new_comment_editor_text, + "Anonymous", 0, titleId, + administratorFeatures, false, + "-", guestEmailAddress, + guestEmailNotification); + + } else { + databaseComment = CommentLocalServiceUtil + .addComment(liferayFacesContext + .getScopeGroupId(), + liferayFacesContext + .getCompanyId(), + new Date(), -1, + new_comment_editor_text, + "ناشناس", 0, titleId, + administratorFeatures, false, + "-", guestEmailAddress, + guestEmailNotification); + } + + } + + if (administratorFeatures == true) { + comment.setId(databaseComment.getCommentId()); + comments.add(0, comment); + addNode(comment, this.reversedTree); + Title currentTitle = TitleLocalServiceUtil + .getTitle(titleId); + currentTitle.setNewCommentDraft(""); + TitleLocalServiceUtil.updateTitle(currentTitle); + new_comment_editor_text = ""; + + if (liferayFacesContext.getLocale().getLanguage() == "en") { + addInfoMessage( + "Your Comment recevied successfully!", + "newcomment"); + + } else { + + addInfoMessage("پیام شما با موفقیت دریافت شد!", + "newcomment"); + } + + } + + else { + + if (liferayFacesContext.getLocale().getLanguage() == "en") { + addInfoMessage( + "Your Comment recevied successfully and will be shown after verification!", + "newcomment"); + + } else { + + addInfoMessage( + "پیام شما با موفقیت دریافت شد و پس از تایید نمایش داده خواهد شد!", + "newcomment"); + } + + } + + insertComment = true; + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (Throwable e) { + if (liferayFacesContext.getLocale().getLanguage() == "en") { + addErrorMessage( + "Your comment is too long (maximum 8000 character)!", + "newcomment"); + + } else { + + addErrorMessage( + "پیام شما طولانی است (حداکثر طول پیام 8000 کاراکتر)!", + "newcomment"); + } + } + + // onCreateComment simulation codes + /* + * if (1==1) { dbSimulator.createComment(comment); + * insertComment = true; } + */ + + if (insertComment) { + // comment.setId(databaseComment.getCommentId()); + // comments.add(0, comment); + // addNode(comment, this.reversedTree); + } + } + + else { + if (currentLocale == "en") { + addErrorMessage( + "The security challenge has not sloved correctly!", + "newcomment"); + + } else { + + addErrorMessage("چالش امنیتی به درستی حل نشده است!", + "newcomment"); + } + } + } + + else if (new_comment_editor_text.length() == 0) { + + if (currentLocale == "en") { + addErrorMessage("The comment text is empty!", "newcomment"); + + } else { + + addErrorMessage("متن پیام خالی است!", "newcomment"); + } + } else { + + if (currentLocale == "en") { + addErrorMessage("You should choose a topic first!", + "newcomment"); + + } else { + + addErrorMessage("ابتدا یک موضوع باید انتخاب شود!", + "newcomment"); + } + + } + } else { + if (currentLocale == "en") { + addErrorMessage("The email address is not valid!", "newcomment"); + + } else { + + addErrorMessage("آدرس ایمیل به درستی وارد نشده است!", + "newcomment"); + } + } + + } + + public void fetchNewComments() { + log("fetchNewComments"); + + // onFetchNewComments simulation code + if (1 == 1) { + loadRootComments(); + } + + this.reversedTree = null; + initTree(); + } + + public void likeComment(Comment comment) { + log("likeComment"); + + comment.setLikecount(comment.getLikecount() + 1); + + try { + ir.ac.iut.sccportal.guestdiscussion.model.Comment databaseComment = CommentLocalServiceUtil + .getComment(comment.getId()); + databaseComment.setLikeCount(databaseComment.getLikeCount() + 1); + CommentLocalServiceUtil.updateComment(databaseComment); + } catch (PortalException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + // onLikeComment simulation code + /* + * if (1 == 1) { dbSimulator.likeComment(comment); } + */ + } + + public void dislikeComment(Comment comment) { + log("likeComment"); + + comment.setDislikeCount(comment.getDislikeCount() + 1); + + try { + ir.ac.iut.sccportal.guestdiscussion.model.Comment databaseComment = CommentLocalServiceUtil + .getComment(comment.getId()); + databaseComment + .setDislikeCount(databaseComment.getDislikeCount() + 1); + CommentLocalServiceUtil.updateComment(databaseComment); + } catch (PortalException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + // onLikeComment simulation code + /* + * if (1 == 1) { dbSimulator.likeComment(comment); } + */ + } + + public void answerComment() { + + if ((guestEmailAddress == "" && guestEmailNotification == false) + || (validateEmail(guestEmailAddress) == true)) { + + if (answer_comment_editor_text.length() != 0) { + + log("answerComment"); + + FacesContext facesContext = FacesContext.getCurrentInstance(); + ExternalContext externalContext = facesContext + .getExternalContext(); + PortletRequest portletRequest = (PortletRequest) externalContext + .getRequest(); + String gRecaptchaResponse = portletRequest + .getParameter("g-recaptcha-response"); + + if (verifyRecaptcha(gRecaptchaResponse) == true) { + + Map<String, String> params = FacesContext + .getCurrentInstance().getExternalContext() + .getRequestParameterMap(); + String answerID = params.get("currentAnswerComment"); + + boolean insertComment = false; + + Comment parent = findCommentByID(Long.parseLong(answerID)); + + Comment comment = _createComment(answer_comment_editor_text); + comment.setParent(parent); + + LiferayFacesContext liferayFacesContext = LiferayFacesContext + .getInstance(); + + ir.ac.iut.sccportal.guestdiscussion.model.Comment newDatabaseComment = null; + + try { + + if (guestName != null && guestName != "") { + newDatabaseComment = CommentLocalServiceUtil + .addComment(liferayFacesContext + .getHostGroupId(), + liferayFacesContext.getCompanyId(), + new Date(), parent.getId(), + answer_comment_editor_text, + guestName, 0, titleId, + administratorFeatures, false, + parent.getGuestName(), + guestEmailAddress, + guestEmailNotification); + } + + else { + if (liferayFacesContext.getLocale().getLanguage() == "en") { + + newDatabaseComment = CommentLocalServiceUtil + .addComment(liferayFacesContext + .getHostGroupId(), + liferayFacesContext + .getCompanyId(), + new Date(), parent.getId(), + answer_comment_editor_text, + "Anonymous", 0, titleId, + administratorFeatures, false, + parent.getGuestName(), + guestEmailAddress, + guestEmailNotification); + + } else { + newDatabaseComment = CommentLocalServiceUtil + .addComment(liferayFacesContext + .getHostGroupId(), + liferayFacesContext + .getCompanyId(), + new Date(), parent.getId(), + answer_comment_editor_text, + "ناشناس", 0, titleId, + administratorFeatures, false, + parent.getGuestName(), + guestEmailAddress, + guestEmailNotification); + + } + + } + + if (parent.isHasAnswer() == false) { + ir.ac.iut.sccportal.guestdiscussion.model.Comment databaseComment = CommentLocalServiceUtil + .getComment(parent.getId()); + databaseComment.setHasAnswer(true); + CommentLocalServiceUtil + .updateComment(databaseComment); + } + + if (administratorFeatures == true) { + comment.setId(newDatabaseComment.getCommentId()); + comment.getParent().getAnswers().add(0, comment); + addNode(comment, findByComment(comment.getParent())); + + Title currentTitle = TitleLocalServiceUtil + .getTitle(titleId); + currentTitle.setAnswerCommentDraft(""); + TitleLocalServiceUtil.updateTitle(currentTitle); + answer_comment_editor_text = ""; + + ir.ac.iut.sccportal.guestdiscussion.model.Comment databaseParentComment = CommentLocalServiceUtil + .getComment(parent.getId()); + if (databaseParentComment.getGuestEmailNotification() == true) { + sendMail(databaseParentComment.getGuestEmailAddress(),newDatabaseComment.getGuestName()); + } + + if (liferayFacesContext.getLocale().getLanguage() == "en") { + addInfoMessage( + "Your Answer recevied successfully!", + "newanswer"); + + } else { + + addInfoMessage("پاسخ شما با موفقیت دریافت شد!", + "newanswer"); + } + } + + else { + + if (liferayFacesContext.getLocale().getLanguage() == "en") { + addInfoMessage( + "Your Answer recevied successfully and will be shown after verification!", + "newanswer"); + + } else { + + addInfoMessage( + "پاسخ شما با موفقیت دریافت شد و پس از تایید نمایش داده خواهد شد!", + "newanswer"); + } + } + insertComment = true; + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (PortalException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (Throwable e) { + if (liferayFacesContext.getLocale().getLanguage() == "en") { + addErrorMessage( + "Your comment is too long (maximum 8000 character)!", + "newanswer"); + + } else { + + addErrorMessage( + "پاسخ شما طولانی است (حداکثر طول پاسخ 8000 کاراکتر)!", + "newanswer"); + } + } + + // onCreateAnswer simulation code + /* + * if (1 == 1) { + * dbSimulator.createAnswer(comment.getParent(), comment); + * insertComment = true; } + */ + + if (insertComment) { + // comment.setId(newDatabaseComment.getCommentId()); + // comment.getParent().getAnswers().add(0, comment); + // addNode(comment, findByComment(comment.getParent())); + + } + } else { + if (currentLocale == "en") { + addErrorMessage( + "The security challenge has not sloved correctly!", + "newanswer"); + + } else { + + addErrorMessage("چالش امنیتی به درستی حل نشده است!", + "newanswer"); + } + } + + } else { + + if (currentLocale == "en") { + addErrorMessage("The answer text is empty!", "newanswer"); + + } else { + + addErrorMessage("متن پاسخ خالی است!", "newanswer"); + } + } + } else { + if (currentLocale == "en") { + addErrorMessage("The email address is not valid!", "newanswer"); + + } else { + + addErrorMessage("آدرس ایمیل به درستی وارد نشده است!", + "newanswer"); + } + } + } + + public void saveNewCommentDraft() { + try { + Title currentTitle = TitleLocalServiceUtil.getTitle(titleId); + currentTitle.setNewCommentDraft(new_comment_editor_text); + TitleLocalServiceUtil.updateTitle(currentTitle); + + if (currentLocale == "en") { + addInfoMessage("Your draft is saved successfully!", "newanswer"); + + } else { + + addInfoMessage("پیش نویس شما با موفقیت ذخیره شد!", "newcomment"); + } + + } catch (PortalException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + public void saveAnswerCommentDraft() { + try { + Title currentTitle = TitleLocalServiceUtil.getTitle(titleId); + currentTitle.setAnswerCommentDraft(answer_comment_editor_text); + TitleLocalServiceUtil.updateTitle(currentTitle); + + if (currentLocale == "en") { + addInfoMessage("Your draft has been saved successfully!", + "newanswer"); + + } else { + + addInfoMessage("پیش نویس شما با موفقیت ذخیره شد!", "newanswer"); + } + + } catch (PortalException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + public void pageChange(Long page) { + FacesContext ctx = FacesContext.getCurrentInstance(); + + ValueExpression valueExpression = this + .getValueExpression("currentPage"); + + if (valueExpression != null) { + valueExpression.setValue(ctx.getELContext(), page); + } + + // onPageChange simulation code + if (1 == 1) { + loadRootComments(); + } + + this.reversedTree = null; + initTree(); + } + + public void onUserType() { + Map<String, String> params = FacesContext.getCurrentInstance() + .getExternalContext().getRequestParameterMap(); + String answerID = params.get("currentAnswerComment"); + + } + + public void fetchNewAnswers() { + log("fetchNewAnswers"); + + Map<String, String> params = FacesContext.getCurrentInstance() + .getExternalContext().getRequestParameterMap(); + String answerID = params.get("currentAnswerComment"); + + this.findCommentByID(Long.parseLong(answerID)).setAnswers(null); + loadAnswerComments(this.findCommentByID(Long.parseLong(answerID))); + + // onFetchNewAnswers simulation code + /* + * if (1 == 1) { + * this.findCommentByID(Long.parseLong(answerID)).setAnswers( + * dbSimulator.getAnswers(this.findCommentByID(Long + * .parseLong(answerID)))); } + */ + this.reversedTree = null; + initTree(); + } + + public String getCurrentUserAvatarUrl() { + return currentUserAvatarUrl; + } + + public void setCurrentUserAvatarUrl(String currentUserAvatarUrl) { + this.currentUserAvatarUrl = currentUserAvatarUrl; + } + + public String getCurrentUserUsername() { + return currentUserUsername; + } + + public void setCurrentUserUsername(String currentUserUsername) { + this.currentUserUsername = currentUserUsername; + } + + public String getNew_comment_editor_text() { + return new_comment_editor_text; + } + + public void setNew_comment_editor_text(String new_comment_editor_text) { + this.new_comment_editor_text = new_comment_editor_text; + } + + public List<Comment> getComments() { + return comments; + } + + public void setComments(List<Comment> comments) { + this.comments = comments; + } + + public TreeNode getTree() { + initTree(); + return this.reversedTree; + } + + public void setTree(TreeNode tree) { + this.reversedTree = tree; + } + + public Boolean getCanEditAll() { + return canEditAll; + } + + public void setCanEditAll(Boolean canEditAll) { + this.canEditAll = canEditAll; + } + + public Boolean getCanDeleteAll() { + return canDeleteAll; + } + + public void setCanDeleteAll(Boolean canDeleteAll) { + this.canDeleteAll = canDeleteAll; + } + + public long getCommentCount() { + return commentCount; + } + + public void setCommentCount(long commentCount) { + this.commentCount = commentCount; + } + + public long getCommentsPerPage() { + return commentsPerPage; + } + + public void setCommentsPerPage(long commentsPerPage) { + this.commentsPerPage = commentsPerPage; + } + + public long getCurrentPage() { + return currentPage; + } + + public void setCurrentPage(long currentPage) { + this.currentPage = currentPage; + } + + public Long getLastPage() { + return (long) Math.ceil((double) this.getCommentCount() + / (double) this.getCommentsPerPage()); + } + + public String getEdit_comment_editor_text() { + return edit_comment_editor_text; + } + + public void setEdit_comment_editor_text(String edit_comment_editor_text) { + this.edit_comment_editor_text = edit_comment_editor_text; + } + + public String getAnswer_comment_editor_text() { + return answer_comment_editor_text; + } + + public void setAnswer_comment_editor_text(String answer_comment_editor_text) { + this.answer_comment_editor_text = answer_comment_editor_text; + } + + public Boolean getEnableLiveFeatures() { + return enableLiveFeatures; + } + + public void setEnableLiveFeatures(Boolean enableLiveFeatures) { + this.enableLiveFeatures = enableLiveFeatures; + } + + public String getContextID() { + return contextID; + } + + public void setContextID(String contextID) { + this.contextID = contextID; + } + + public String getMessageBundleAsJSON() { + return mapToJSON(this.getCustomMessageBundle()); + } + + public ResourceBundle getCustomMessageBundle() { + return ResourceBundle.getBundle(RESOURCE_BUNDLE, FacesContext + .getCurrentInstance().getViewRoot().getLocale()); + } + + public String getDiscussionTitle() { + return discussionTitle; + } + + public void setDiscussionTitle(String discussionTitle) { + this.discussionTitle = discussionTitle; + } + + public String getGuestName() { + return guestName; + } + + public void setGuestName(String guestName) { + this.guestName = guestName; + } + + public String getCurrentLocale() { + return currentLocale; + } + + public void setCurrentLocale(String currentLocale) { + this.currentLocale = currentLocale; + } + + public String getGuestEmailAddress() { + return guestEmailAddress; + } + + public void setGuestEmailAddress(String guestEmailAddress) { + this.guestEmailAddress = guestEmailAddress; + } + + public boolean isGuestEmailNotification() { + return guestEmailNotification; + } + + public void setGuestEmailNotification(boolean guestEmailNotification) { + this.guestEmailNotification = guestEmailNotification; + } + + public boolean isAdministratorFeatures() { + return administratorFeatures; + } + + public void setAdministratorFeatures(boolean administratorFeatures) { + this.administratorFeatures = administratorFeatures; + } + + public long getTitleId() { + return titleId; + } + + public void setTitleId(long titleId) { + this.titleId = titleId; + } + +} diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/ConditionalPrettyTimeConveter.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/ConditionalPrettyTimeConveter.java new file mode 100644 index 0000000..af5bd56 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/ConditionalPrettyTimeConveter.java @@ -0,0 +1,39 @@ +package ir.ac.iut.sccportal.guestdiscussion.bean; + +import java.text.SimpleDateFormat; +import java.util.Date; + +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.convert.Converter; +import javax.faces.convert.ConverterException; +import javax.faces.convert.FacesConverter; + +@FacesConverter("ir.ac.iut.sccportal.guestdiscussion.ConditionalPrettyTimeConveter") +public class ConditionalPrettyTimeConveter implements Converter { + private static Converter prettyTimeConverter = null; + + static { + try { + prettyTimeConverter = FacesContext.getCurrentInstance().getApplication().createConverter("org.ocpsoft.PrettyTimeConverter"); + } catch (Exception e) { + // Nothing to do here + } + } + + @Override + public String getAsString(FacesContext arg0, UIComponent arg1, Object arg2) { + if (prettyTimeConverter != null) { + return prettyTimeConverter.getAsString(arg0, arg1, arg2); + } else { + // Fallback to simple method + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm yyyy"); + return sdf.format((Date) arg2); + } + } + + @Override + public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2) { + throw new ConverterException("Does not yet support converting String to Date"); + } +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/ConfigB.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/ConfigB.java new file mode 100644 index 0000000..b76cc14 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/ConfigB.java @@ -0,0 +1,363 @@ +package ir.ac.iut.sccportal.guestdiscussion.bean; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import ir.ac.iut.sccportal.guestdiscussion.model.Comment; +import ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle; +import ir.ac.iut.sccportal.guestdiscussion.model.Title; +import ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalServiceUtil; +import ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalServiceUtil; +import ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil; + +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; +import javax.faces.bean.ViewScoped; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.mail.internet.AddressException; +import javax.mail.internet.InternetAddress; + +import org.primefaces.component.panel.Panel; +import org.primefaces.event.RowEditEvent; + +import com.liferay.faces.portal.context.LiferayFacesContext; +import com.liferay.mail.service.MailServiceUtil; +import com.liferay.portal.NoSuchUserException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.mail.MailMessage; +import com.liferay.portal.kernel.util.PrefsPropsUtil; +import com.liferay.portal.kernel.util.PropsKeys; + +@ManagedBean(name = "configB") +@ViewScoped +public class ConfigB { + + private String newTitleText; + private List<Title> titleList; + private Title selectedTitle; + + List<Comment> unVerifiedCommentList; + private Comment selectedComment; + + private String portletId; + private String currentLocale; + private String portalEmailAddress; + + @PostConstruct + public void init() { + + try { + Map<String, String[]> serverPortletPreferencesMap; + serverPortletPreferencesMap = PrefsPropsUtil.getPreferences() + .getMap(); + portalEmailAddress = serverPortletPreferencesMap + .get(PropsKeys.MAIL_SESSION_MAIL_SMTP_USER)[0]; + } catch (SystemException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + + LiferayFacesContext liferayFacesContext = LiferayFacesContext + .getInstance(); + currentLocale = liferayFacesContext.getLocale().getLanguage(); + portletId = liferayFacesContext.getPortletInstanceId(); + try { + titleList = new ArrayList<Title>( + TitleLocalServiceUtil + .getTitlesByCompanyId(liferayFacesContext + .getCompanyId())); + + PortletTitle portletTitle = PortletTitleLocalServiceUtil + .fetchPortletTitle(portletId); + if (portletTitle != null) { + for (int i = 0; i < titleList.size(); i++) { + if (titleList.get(i).getTitleId() == portletTitle + .getTitleId()) { + selectedTitle = titleList.get(i); + break; + } + } + + unVerifiedCommentList = new ArrayList<Comment>( + CommentLocalServiceUtil + .getCommentsByTitleId(portletTitle.getTitleId())); + } + + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + public void addNewTitle() { + + LiferayFacesContext liferayFacesContext = LiferayFacesContext + .getInstance(); + try { + TitleLocalServiceUtil.addTitle(liferayFacesContext + .getScopeGroupId(), liferayFacesContext.getCompanyId(), + liferayFacesContext.getUserId(), liferayFacesContext + .getUser().getFullName(), newTitleText); + + titleList = new ArrayList<Title>( + TitleLocalServiceUtil + .getTitlesByCompanyId(liferayFacesContext + .getCompanyId())); + + PortletTitle portletTitle = PortletTitleLocalServiceUtil + .fetchPortletTitle(portletId); + + if (portletTitle != null) { + for (int i = 0; i < titleList.size(); i++) { + if (titleList.get(i).getTitleId() == portletTitle + .getTitleId()) { + selectedTitle = titleList.get(i); + break; + } + } + } + + } catch (NoSuchUserException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + newTitleText = ""; + + } + + public void selectTitle() { + + LiferayFacesContext liferayFacesContext = LiferayFacesContext + .getInstance(); + + /* + * PortletTitle portletTitle = PortletTitleLocalServiceUtil + * .createPortletTitle(portletId); + * portletTitle.setTitleId(Long.parseLong(selectedTitle)); + */ + + try { + PortletTitle portletTitle = PortletTitleLocalServiceUtil + .fetchPortletTitle(portletId); + if (portletTitle != null) { + portletTitle.setTitleId(selectedTitle.getTitleId()); + PortletTitleLocalServiceUtil.updatePortletTitle(portletTitle); + } else { + portletTitle = PortletTitleLocalServiceUtil + .createPortletTitle(portletId); + portletTitle.setTitleId(selectedTitle.getTitleId()); + PortletTitleLocalServiceUtil.addPortletTitle(portletTitle); + } + + if (liferayFacesContext.getLocale().getLanguage() == "en") { + addInfoMessage("Title has been chosen successfully!", + "savebutton"); + + } else { + + addInfoMessage("موضوع با موفقیت انتخاب شد!", "savebutton"); + } + + unVerifiedCommentList = new ArrayList<Comment>( + CommentLocalServiceUtil.getCommentsByTitleId(selectedTitle + .getTitleId())); + + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + public void onRowEdit(RowEditEvent event) { + // FacesMessage msg = new FacesMessage("Place Edited", ((Place) + // event.getObject()).getName()); + // FacesContext.getCurrentInstance().addMessage(null, msg); + Title title = (Title) event.getObject(); + try { + TitleLocalServiceUtil.updateTitle(title); + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + public void onRowCancel(RowEditEvent event) { + // FacesMessage msg = new FacesMessage("Edit Cancelled", ((Place) + // event.getObject()).getName()); + // FacesContext.getCurrentInstance().addMessage(null, msg); + } + + public void deleteTitle() { + try { + CommentLocalServiceUtil.deleteCommentsByTitleId(selectedTitle + .getTitleId()); + PortletTitleLocalServiceUtil + .deletePortletTitleByTitleId(selectedTitle.getTitleId()); + TitleLocalServiceUtil.deleteTitle(selectedTitle); + titleList.remove(selectedTitle); + + PortletTitle portletTitle = PortletTitleLocalServiceUtil + .fetchPortletTitle(portletId); + + if (portletTitle != null) { + for (int i = 0; i < titleList.size(); i++) { + if (titleList.get(i).getTitleId() == portletTitle + .getTitleId()) { + selectedTitle = titleList.get(i); + break; + } + } + } + + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + public void verifyComment() { + if (selectedComment.getVerified() == false) { + selectedComment.setVerified(true); + if (selectedComment.getParentId() != -1) { + for (int i = 0; i < unVerifiedCommentList.size(); i++) { + if (unVerifiedCommentList.get(i).getCommentId() == selectedComment + .getParentId()) { + if (unVerifiedCommentList.get(i) + .getGuestEmailNotification() == true) { + sendMail(unVerifiedCommentList.get(i) + .getGuestEmailAddress(), + selectedComment.getGuestName()); + } + break; + } + } + } + } else { + selectedComment.setVerified(false); + } + try { + CommentLocalServiceUtil.updateComment(selectedComment); + selectedComment = null; + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + public void deleteComment() { + try { + CommentLocalServiceUtil.deleteComment(selectedComment); + unVerifiedCommentList.remove(selectedComment); + selectedComment = null; + } catch (SystemException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + public void addInfoMessage(String summary, String id) { + FacesContext.getCurrentInstance().addMessage(id, + new FacesMessage(FacesMessage.SEVERITY_INFO, null, summary)); + } + + public void sendMail(String ReceiverEmailAddress, String replierName) { + InternetAddress fromAddress = null; + InternetAddress toAddress = null; + + if (portalEmailAddress != null && portalEmailAddress != "") { + try { + fromAddress = new InternetAddress(portalEmailAddress); + toAddress = new InternetAddress(ReceiverEmailAddress); + MailMessage mailMessage = new MailMessage(); + mailMessage.setTo(toAddress); + mailMessage.setFrom(fromAddress); + + if (currentLocale == "en") { + mailMessage.setSubject("New reply from discussion \"" + + selectedTitle.getTitleText() + "\""); + mailMessage.setBody(replierName + + " has sent a new reply to your comment."); + } else { + mailMessage.setSubject("پاسخ جدید از بحث \"" + + selectedTitle.getTitleText() + "\""); + mailMessage.setBody(replierName + + " پاسخ جدیدی به پیام شما داده است."); + + } + + MailServiceUtil.sendEmail(mailMessage); + } catch (AddressException e) { + e.printStackTrace(); + } + } + } + + public String getNewTitleText() { + return newTitleText; + } + + public void setNewTitleText(String newTitleText) { + this.newTitleText = newTitleText; + } + + public List<Title> getTitleList() { + return titleList; + } + + public void setTitleList(List<Title> titleList) { + this.titleList = titleList; + } + + public Title getSelectedTitle() { + return selectedTitle; + } + + public void setSelectedTitle(Title selectedTitle) { + this.selectedTitle = selectedTitle; + } + + public String getPortletId() { + return portletId; + } + + public void setPortletId(String portletId) { + this.portletId = portletId; + } + + public String getCurrentLocale() { + return currentLocale; + } + + public void setCurrentLocale(String currentLocale) { + this.currentLocale = currentLocale; + } + + public List<Comment> getUnVerifiedCommentList() { + return unVerifiedCommentList; + } + + public void setUnVerifiedCommentList(List<Comment> unVerifiedCommentList) { + this.unVerifiedCommentList = unVerifiedCommentList; + } + + public Comment getSelectedComment() { + return selectedComment; + } + + public void setSelectedComment(Comment selectedComment) { + this.selectedComment = selectedComment; + } + +} diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/Pair.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/Pair.java new file mode 100644 index 0000000..79a7500 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/bean/Pair.java @@ -0,0 +1,20 @@ +package ir.ac.iut.sccportal.guestdiscussion.bean; + + +public class Pair<L,R> { + private L left; + private R right; + + public Pair(L left, R right) { + this.left = left; + this.right = right; + } + + public L getLeft() { + return this.left; + } + + public R getRight() { + return this.right; + } +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentBaseImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentBaseImpl.java new file mode 100644 index 0000000..c5d06d1 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentBaseImpl.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model.impl; + +import com.liferay.portal.kernel.exception.SystemException; + +import ir.ac.iut.sccportal.guestdiscussion.model.Comment; +import ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalServiceUtil; + +/** + * The extended model base implementation for the Comment service. Represents a row in the "GDP_Comment" database table, with each column mapped to a property of this class. + * + * <p> + * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link CommentImpl}. + * </p> + * + * @author Alireza + * @see CommentImpl + * @see ir.ac.iut.sccportal.guestdiscussion.model.Comment + * @generated + */ +public abstract class CommentBaseImpl extends CommentModelImpl + implements Comment { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a comment model instance should use the {@link Comment} interface instead. + */ + @Override + public void persist() throws SystemException { + if (this.isNew()) { + CommentLocalServiceUtil.addComment(this); + } + else { + CommentLocalServiceUtil.updateComment(this); + } + } +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentCacheModel.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentCacheModel.java new file mode 100644 index 0000000..e91990d --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentCacheModel.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model.impl; + +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.model.CacheModel; + +import ir.ac.iut.sccportal.guestdiscussion.model.Comment; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +import java.util.Date; + +/** + * The cache model class for representing Comment in entity cache. + * + * @author Alireza + * @see Comment + * @generated + */ +public class CommentCacheModel implements CacheModel<Comment>, Externalizable { + @Override + public String toString() { + StringBundler sb = new StringBundler(31); + + sb.append("{commentId="); + sb.append(commentId); + sb.append(", groupId="); + sb.append(groupId); + sb.append(", companyId="); + sb.append(companyId); + sb.append(", modifiedDate="); + sb.append(modifiedDate); + sb.append(", parentId="); + sb.append(parentId); + sb.append(", parentName="); + sb.append(parentName); + sb.append(", commentText="); + sb.append(commentText); + sb.append(", guestName="); + sb.append(guestName); + sb.append(", guestEmailAddress="); + sb.append(guestEmailAddress); + sb.append(", guestEmailNotification="); + sb.append(guestEmailNotification); + sb.append(", likeCount="); + sb.append(likeCount); + sb.append(", dislikeCount="); + sb.append(dislikeCount); + sb.append(", titleId="); + sb.append(titleId); + sb.append(", verified="); + sb.append(verified); + sb.append(", hasAnswer="); + sb.append(hasAnswer); + sb.append("}"); + + return sb.toString(); + } + + @Override + public Comment toEntityModel() { + CommentImpl commentImpl = new CommentImpl(); + + commentImpl.setCommentId(commentId); + commentImpl.setGroupId(groupId); + commentImpl.setCompanyId(companyId); + + if (modifiedDate == Long.MIN_VALUE) { + commentImpl.setModifiedDate(null); + } + else { + commentImpl.setModifiedDate(new Date(modifiedDate)); + } + + commentImpl.setParentId(parentId); + + if (parentName == null) { + commentImpl.setParentName(StringPool.BLANK); + } + else { + commentImpl.setParentName(parentName); + } + + if (commentText == null) { + commentImpl.setCommentText(StringPool.BLANK); + } + else { + commentImpl.setCommentText(commentText); + } + + if (guestName == null) { + commentImpl.setGuestName(StringPool.BLANK); + } + else { + commentImpl.setGuestName(guestName); + } + + if (guestEmailAddress == null) { + commentImpl.setGuestEmailAddress(StringPool.BLANK); + } + else { + commentImpl.setGuestEmailAddress(guestEmailAddress); + } + + commentImpl.setGuestEmailNotification(guestEmailNotification); + commentImpl.setLikeCount(likeCount); + commentImpl.setDislikeCount(dislikeCount); + commentImpl.setTitleId(titleId); + commentImpl.setVerified(verified); + commentImpl.setHasAnswer(hasAnswer); + + commentImpl.resetOriginalValues(); + + return commentImpl; + } + + @Override + public void readExternal(ObjectInput objectInput) throws IOException { + commentId = objectInput.readLong(); + groupId = objectInput.readLong(); + companyId = objectInput.readLong(); + modifiedDate = objectInput.readLong(); + parentId = objectInput.readLong(); + parentName = objectInput.readUTF(); + commentText = objectInput.readUTF(); + guestName = objectInput.readUTF(); + guestEmailAddress = objectInput.readUTF(); + guestEmailNotification = objectInput.readBoolean(); + likeCount = objectInput.readLong(); + dislikeCount = objectInput.readLong(); + titleId = objectInput.readLong(); + verified = objectInput.readBoolean(); + hasAnswer = objectInput.readBoolean(); + } + + @Override + public void writeExternal(ObjectOutput objectOutput) + throws IOException { + objectOutput.writeLong(commentId); + objectOutput.writeLong(groupId); + objectOutput.writeLong(companyId); + objectOutput.writeLong(modifiedDate); + objectOutput.writeLong(parentId); + + if (parentName == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(parentName); + } + + if (commentText == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(commentText); + } + + if (guestName == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(guestName); + } + + if (guestEmailAddress == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(guestEmailAddress); + } + + objectOutput.writeBoolean(guestEmailNotification); + objectOutput.writeLong(likeCount); + objectOutput.writeLong(dislikeCount); + objectOutput.writeLong(titleId); + objectOutput.writeBoolean(verified); + objectOutput.writeBoolean(hasAnswer); + } + + public long commentId; + public long groupId; + public long companyId; + public long modifiedDate; + public long parentId; + public String parentName; + public String commentText; + public String guestName; + public String guestEmailAddress; + public boolean guestEmailNotification; + public long likeCount; + public long dislikeCount; + public long titleId; + public boolean verified; + public boolean hasAnswer; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentImpl.java new file mode 100644 index 0000000..43a0dde --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentImpl.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model.impl; + +/** + * The extended model implementation for the Comment service. Represents a row in the "GDP_Comment" database table, with each column mapped to a property of this class. + * + * <p> + * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link ir.ac.iut.sccportal.guestdiscussion.model.Comment} interface. + * </p> + * + * @author Alireza + */ +public class CommentImpl extends CommentBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a comment model instance should use the {@link ir.ac.iut.sccportal.guestdiscussion.model.Comment} interface instead. + */ + public CommentImpl() { + } +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentModelImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentModelImpl.java new file mode 100644 index 0000000..5955f8c --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/CommentModelImpl.java @@ -0,0 +1,876 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model.impl; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.json.JSON; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.model.impl.BaseModelImpl; +import com.liferay.portal.service.ServiceContext; + +import com.liferay.portlet.expando.model.ExpandoBridge; +import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil; + +import ir.ac.iut.sccportal.guestdiscussion.model.Comment; +import ir.ac.iut.sccportal.guestdiscussion.model.CommentModel; +import ir.ac.iut.sccportal.guestdiscussion.model.CommentSoap; + +import java.io.Serializable; + +import java.sql.Types; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * The base model implementation for the Comment service. Represents a row in the "GDP_Comment" database table, with each column mapped to a property of this class. + * + * <p> + * This implementation and its corresponding interface {@link ir.ac.iut.sccportal.guestdiscussion.model.CommentModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link CommentImpl}. + * </p> + * + * @author Alireza + * @see CommentImpl + * @see ir.ac.iut.sccportal.guestdiscussion.model.Comment + * @see ir.ac.iut.sccportal.guestdiscussion.model.CommentModel + * @generated + */ +@JSON(strict = true) +public class CommentModelImpl extends BaseModelImpl<Comment> + implements CommentModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a comment model instance should use the {@link ir.ac.iut.sccportal.guestdiscussion.model.Comment} interface instead. + */ + public static final String TABLE_NAME = "GDP_Comment"; + public static final Object[][] TABLE_COLUMNS = { + { "commentId", Types.BIGINT }, + { "groupId", Types.BIGINT }, + { "companyId", Types.BIGINT }, + { "modifiedDate", Types.TIMESTAMP }, + { "parentId", Types.BIGINT }, + { "parentName", Types.VARCHAR }, + { "commentText", Types.VARCHAR }, + { "guestName", Types.VARCHAR }, + { "guestEmailAddress", Types.VARCHAR }, + { "guestEmailNotification", Types.BOOLEAN }, + { "likeCount", Types.BIGINT }, + { "dislikeCount", Types.BIGINT }, + { "titleId", Types.BIGINT }, + { "verified", Types.BOOLEAN }, + { "hasAnswer", Types.BOOLEAN } + }; + public static final String TABLE_SQL_CREATE = "create table GDP_Comment (commentId LONG not null primary key IDENTITY,groupId LONG,companyId LONG,modifiedDate DATE null,parentId LONG,parentName VARCHAR(75) null,commentText TEXT null,guestName VARCHAR(75) null,guestEmailAddress VARCHAR(75) null,guestEmailNotification BOOLEAN,likeCount LONG,dislikeCount LONG,titleId LONG,verified BOOLEAN,hasAnswer BOOLEAN)"; + public static final String TABLE_SQL_DROP = "drop table GDP_Comment"; + public static final String ORDER_BY_JPQL = " ORDER BY comment.commentId DESC"; + public static final String ORDER_BY_SQL = " ORDER BY GDP_Comment.commentId DESC"; + public static final String DATA_SOURCE = "liferayDataSource"; + public static final String SESSION_FACTORY = "liferaySessionFactory"; + public static final String TX_MANAGER = "liferayTransactionManager"; + public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( + "value.object.entity.cache.enabled.ir.ac.iut.sccportal.guestdiscussion.model.Comment"), + true); + public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( + "value.object.finder.cache.enabled.ir.ac.iut.sccportal.guestdiscussion.model.Comment"), + true); + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( + "value.object.column.bitmask.enabled.ir.ac.iut.sccportal.guestdiscussion.model.Comment"), + true); + public static long PARENTID_COLUMN_BITMASK = 1L; + public static long TITLEID_COLUMN_BITMASK = 2L; + public static long VERIFIED_COLUMN_BITMASK = 4L; + public static long COMMENTID_COLUMN_BITMASK = 8L; + + /** + * Converts the soap model instance into a normal model instance. + * + * @param soapModel the soap model instance to convert + * @return the normal model instance + */ + public static Comment toModel(CommentSoap soapModel) { + if (soapModel == null) { + return null; + } + + Comment model = new CommentImpl(); + + model.setCommentId(soapModel.getCommentId()); + model.setGroupId(soapModel.getGroupId()); + model.setCompanyId(soapModel.getCompanyId()); + model.setModifiedDate(soapModel.getModifiedDate()); + model.setParentId(soapModel.getParentId()); + model.setParentName(soapModel.getParentName()); + model.setCommentText(soapModel.getCommentText()); + model.setGuestName(soapModel.getGuestName()); + model.setGuestEmailAddress(soapModel.getGuestEmailAddress()); + model.setGuestEmailNotification(soapModel.getGuestEmailNotification()); + model.setLikeCount(soapModel.getLikeCount()); + model.setDislikeCount(soapModel.getDislikeCount()); + model.setTitleId(soapModel.getTitleId()); + model.setVerified(soapModel.getVerified()); + model.setHasAnswer(soapModel.getHasAnswer()); + + return model; + } + + /** + * Converts the soap model instances into normal model instances. + * + * @param soapModels the soap model instances to convert + * @return the normal model instances + */ + public static List<Comment> toModels(CommentSoap[] soapModels) { + if (soapModels == null) { + return null; + } + + List<Comment> models = new ArrayList<Comment>(soapModels.length); + + for (CommentSoap soapModel : soapModels) { + models.add(toModel(soapModel)); + } + + return models; + } + + public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get( + "lock.expiration.time.ir.ac.iut.sccportal.guestdiscussion.model.Comment")); + + public CommentModelImpl() { + } + + @Override + public long getPrimaryKey() { + return _commentId; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setCommentId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _commentId; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Class<?> getModelClass() { + return Comment.class; + } + + @Override + public String getModelClassName() { + return Comment.class.getName(); + } + + @Override + public Map<String, Object> getModelAttributes() { + Map<String, Object> attributes = new HashMap<String, Object>(); + + attributes.put("commentId", getCommentId()); + attributes.put("groupId", getGroupId()); + attributes.put("companyId", getCompanyId()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("parentId", getParentId()); + attributes.put("parentName", getParentName()); + attributes.put("commentText", getCommentText()); + attributes.put("guestName", getGuestName()); + attributes.put("guestEmailAddress", getGuestEmailAddress()); + attributes.put("guestEmailNotification", getGuestEmailNotification()); + attributes.put("likeCount", getLikeCount()); + attributes.put("dislikeCount", getDislikeCount()); + attributes.put("titleId", getTitleId()); + attributes.put("verified", getVerified()); + attributes.put("hasAnswer", getHasAnswer()); + + return attributes; + } + + @Override + public void setModelAttributes(Map<String, Object> attributes) { + Long commentId = (Long)attributes.get("commentId"); + + if (commentId != null) { + setCommentId(commentId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Date modifiedDate = (Date)attributes.get("modifiedDate"); + + if (modifiedDate != null) { + setModifiedDate(modifiedDate); + } + + Long parentId = (Long)attributes.get("parentId"); + + if (parentId != null) { + setParentId(parentId); + } + + String parentName = (String)attributes.get("parentName"); + + if (parentName != null) { + setParentName(parentName); + } + + String commentText = (String)attributes.get("commentText"); + + if (commentText != null) { + setCommentText(commentText); + } + + String guestName = (String)attributes.get("guestName"); + + if (guestName != null) { + setGuestName(guestName); + } + + String guestEmailAddress = (String)attributes.get("guestEmailAddress"); + + if (guestEmailAddress != null) { + setGuestEmailAddress(guestEmailAddress); + } + + Boolean guestEmailNotification = (Boolean)attributes.get( + "guestEmailNotification"); + + if (guestEmailNotification != null) { + setGuestEmailNotification(guestEmailNotification); + } + + Long likeCount = (Long)attributes.get("likeCount"); + + if (likeCount != null) { + setLikeCount(likeCount); + } + + Long dislikeCount = (Long)attributes.get("dislikeCount"); + + if (dislikeCount != null) { + setDislikeCount(dislikeCount); + } + + Long titleId = (Long)attributes.get("titleId"); + + if (titleId != null) { + setTitleId(titleId); + } + + Boolean verified = (Boolean)attributes.get("verified"); + + if (verified != null) { + setVerified(verified); + } + + Boolean hasAnswer = (Boolean)attributes.get("hasAnswer"); + + if (hasAnswer != null) { + setHasAnswer(hasAnswer); + } + } + + @JSON + @Override + public long getCommentId() { + return _commentId; + } + + @Override + public void setCommentId(long commentId) { + _columnBitmask = -1L; + + _commentId = commentId; + } + + @JSON + @Override + public long getGroupId() { + return _groupId; + } + + @Override + public void setGroupId(long groupId) { + _groupId = groupId; + } + + @JSON + @Override + public long getCompanyId() { + return _companyId; + } + + @Override + public void setCompanyId(long companyId) { + _companyId = companyId; + } + + @JSON + @Override + public Date getModifiedDate() { + return _modifiedDate; + } + + @Override + public void setModifiedDate(Date modifiedDate) { + _modifiedDate = modifiedDate; + } + + @JSON + @Override + public long getParentId() { + return _parentId; + } + + @Override + public void setParentId(long parentId) { + _columnBitmask |= PARENTID_COLUMN_BITMASK; + + if (!_setOriginalParentId) { + _setOriginalParentId = true; + + _originalParentId = _parentId; + } + + _parentId = parentId; + } + + public long getOriginalParentId() { + return _originalParentId; + } + + @JSON + @Override + public String getParentName() { + if (_parentName == null) { + return StringPool.BLANK; + } + else { + return _parentName; + } + } + + @Override + public void setParentName(String parentName) { + _parentName = parentName; + } + + @JSON + @Override + public String getCommentText() { + if (_commentText == null) { + return StringPool.BLANK; + } + else { + return _commentText; + } + } + + @Override + public void setCommentText(String commentText) { + _commentText = commentText; + } + + @JSON + @Override + public String getGuestName() { + if (_guestName == null) { + return StringPool.BLANK; + } + else { + return _guestName; + } + } + + @Override + public void setGuestName(String guestName) { + _guestName = guestName; + } + + @JSON + @Override + public String getGuestEmailAddress() { + if (_guestEmailAddress == null) { + return StringPool.BLANK; + } + else { + return _guestEmailAddress; + } + } + + @Override + public void setGuestEmailAddress(String guestEmailAddress) { + _guestEmailAddress = guestEmailAddress; + } + + @JSON + @Override + public boolean getGuestEmailNotification() { + return _guestEmailNotification; + } + + @Override + public boolean isGuestEmailNotification() { + return _guestEmailNotification; + } + + @Override + public void setGuestEmailNotification(boolean guestEmailNotification) { + _guestEmailNotification = guestEmailNotification; + } + + @JSON + @Override + public long getLikeCount() { + return _likeCount; + } + + @Override + public void setLikeCount(long likeCount) { + _likeCount = likeCount; + } + + @JSON + @Override + public long getDislikeCount() { + return _dislikeCount; + } + + @Override + public void setDislikeCount(long dislikeCount) { + _dislikeCount = dislikeCount; + } + + @JSON + @Override + public long getTitleId() { + return _titleId; + } + + @Override + public void setTitleId(long titleId) { + _columnBitmask |= TITLEID_COLUMN_BITMASK; + + if (!_setOriginalTitleId) { + _setOriginalTitleId = true; + + _originalTitleId = _titleId; + } + + _titleId = titleId; + } + + public long getOriginalTitleId() { + return _originalTitleId; + } + + @JSON + @Override + public boolean getVerified() { + return _verified; + } + + @Override + public boolean isVerified() { + return _verified; + } + + @Override + public void setVerified(boolean verified) { + _columnBitmask |= VERIFIED_COLUMN_BITMASK; + + if (!_setOriginalVerified) { + _setOriginalVerified = true; + + _originalVerified = _verified; + } + + _verified = verified; + } + + public boolean getOriginalVerified() { + return _originalVerified; + } + + @JSON + @Override + public boolean getHasAnswer() { + return _hasAnswer; + } + + @Override + public boolean isHasAnswer() { + return _hasAnswer; + } + + @Override + public void setHasAnswer(boolean hasAnswer) { + _hasAnswer = hasAnswer; + } + + public long getColumnBitmask() { + return _columnBitmask; + } + + @Override + public ExpandoBridge getExpandoBridge() { + return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), + Comment.class.getName(), getPrimaryKey()); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + ExpandoBridge expandoBridge = getExpandoBridge(); + + expandoBridge.setAttributes(serviceContext); + } + + @Override + public Comment toEscapedModel() { + if (_escapedModel == null) { + _escapedModel = (Comment)ProxyUtil.newProxyInstance(_classLoader, + _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); + } + + return _escapedModel; + } + + @Override + public Object clone() { + CommentImpl commentImpl = new CommentImpl(); + + commentImpl.setCommentId(getCommentId()); + commentImpl.setGroupId(getGroupId()); + commentImpl.setCompanyId(getCompanyId()); + commentImpl.setModifiedDate(getModifiedDate()); + commentImpl.setParentId(getParentId()); + commentImpl.setParentName(getParentName()); + commentImpl.setCommentText(getCommentText()); + commentImpl.setGuestName(getGuestName()); + commentImpl.setGuestEmailAddress(getGuestEmailAddress()); + commentImpl.setGuestEmailNotification(getGuestEmailNotification()); + commentImpl.setLikeCount(getLikeCount()); + commentImpl.setDislikeCount(getDislikeCount()); + commentImpl.setTitleId(getTitleId()); + commentImpl.setVerified(getVerified()); + commentImpl.setHasAnswer(getHasAnswer()); + + commentImpl.resetOriginalValues(); + + return commentImpl; + } + + @Override + public int compareTo(Comment comment) { + int value = 0; + + if (getCommentId() < comment.getCommentId()) { + value = -1; + } + else if (getCommentId() > comment.getCommentId()) { + value = 1; + } + else { + value = 0; + } + + value = value * -1; + + if (value != 0) { + return value; + } + + return 0; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof Comment)) { + return false; + } + + Comment comment = (Comment)obj; + + long primaryKey = comment.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public void resetOriginalValues() { + CommentModelImpl commentModelImpl = this; + + commentModelImpl._originalParentId = commentModelImpl._parentId; + + commentModelImpl._setOriginalParentId = false; + + commentModelImpl._originalTitleId = commentModelImpl._titleId; + + commentModelImpl._setOriginalTitleId = false; + + commentModelImpl._originalVerified = commentModelImpl._verified; + + commentModelImpl._setOriginalVerified = false; + + commentModelImpl._columnBitmask = 0; + } + + @Override + public CacheModel<Comment> toCacheModel() { + CommentCacheModel commentCacheModel = new CommentCacheModel(); + + commentCacheModel.commentId = getCommentId(); + + commentCacheModel.groupId = getGroupId(); + + commentCacheModel.companyId = getCompanyId(); + + Date modifiedDate = getModifiedDate(); + + if (modifiedDate != null) { + commentCacheModel.modifiedDate = modifiedDate.getTime(); + } + else { + commentCacheModel.modifiedDate = Long.MIN_VALUE; + } + + commentCacheModel.parentId = getParentId(); + + commentCacheModel.parentName = getParentName(); + + String parentName = commentCacheModel.parentName; + + if ((parentName != null) && (parentName.length() == 0)) { + commentCacheModel.parentName = null; + } + + commentCacheModel.commentText = getCommentText(); + + String commentText = commentCacheModel.commentText; + + if ((commentText != null) && (commentText.length() == 0)) { + commentCacheModel.commentText = null; + } + + commentCacheModel.guestName = getGuestName(); + + String guestName = commentCacheModel.guestName; + + if ((guestName != null) && (guestName.length() == 0)) { + commentCacheModel.guestName = null; + } + + commentCacheModel.guestEmailAddress = getGuestEmailAddress(); + + String guestEmailAddress = commentCacheModel.guestEmailAddress; + + if ((guestEmailAddress != null) && (guestEmailAddress.length() == 0)) { + commentCacheModel.guestEmailAddress = null; + } + + commentCacheModel.guestEmailNotification = getGuestEmailNotification(); + + commentCacheModel.likeCount = getLikeCount(); + + commentCacheModel.dislikeCount = getDislikeCount(); + + commentCacheModel.titleId = getTitleId(); + + commentCacheModel.verified = getVerified(); + + commentCacheModel.hasAnswer = getHasAnswer(); + + return commentCacheModel; + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(31); + + sb.append("{commentId="); + sb.append(getCommentId()); + sb.append(", groupId="); + sb.append(getGroupId()); + sb.append(", companyId="); + sb.append(getCompanyId()); + sb.append(", modifiedDate="); + sb.append(getModifiedDate()); + sb.append(", parentId="); + sb.append(getParentId()); + sb.append(", parentName="); + sb.append(getParentName()); + sb.append(", commentText="); + sb.append(getCommentText()); + sb.append(", guestName="); + sb.append(getGuestName()); + sb.append(", guestEmailAddress="); + sb.append(getGuestEmailAddress()); + sb.append(", guestEmailNotification="); + sb.append(getGuestEmailNotification()); + sb.append(", likeCount="); + sb.append(getLikeCount()); + sb.append(", dislikeCount="); + sb.append(getDislikeCount()); + sb.append(", titleId="); + sb.append(getTitleId()); + sb.append(", verified="); + sb.append(getVerified()); + sb.append(", hasAnswer="); + sb.append(getHasAnswer()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(49); + + sb.append("<model><model-name>"); + sb.append("ir.ac.iut.sccportal.guestdiscussion.model.Comment"); + sb.append("</model-name>"); + + sb.append( + "<column><column-name>commentId</column-name><column-value><![CDATA["); + sb.append(getCommentId()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>groupId</column-name><column-value><![CDATA["); + sb.append(getGroupId()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>companyId</column-name><column-value><![CDATA["); + sb.append(getCompanyId()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>modifiedDate</column-name><column-value><![CDATA["); + sb.append(getModifiedDate()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>parentId</column-name><column-value><![CDATA["); + sb.append(getParentId()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>parentName</column-name><column-value><![CDATA["); + sb.append(getParentName()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>commentText</column-name><column-value><![CDATA["); + sb.append(getCommentText()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>guestName</column-name><column-value><![CDATA["); + sb.append(getGuestName()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>guestEmailAddress</column-name><column-value><![CDATA["); + sb.append(getGuestEmailAddress()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>guestEmailNotification</column-name><column-value><![CDATA["); + sb.append(getGuestEmailNotification()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>likeCount</column-name><column-value><![CDATA["); + sb.append(getLikeCount()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>dislikeCount</column-name><column-value><![CDATA["); + sb.append(getDislikeCount()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>titleId</column-name><column-value><![CDATA["); + sb.append(getTitleId()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>verified</column-name><column-value><![CDATA["); + sb.append(getVerified()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>hasAnswer</column-name><column-value><![CDATA["); + sb.append(getHasAnswer()); + sb.append("]]></column-value></column>"); + + sb.append("</model>"); + + return sb.toString(); + } + + private static ClassLoader _classLoader = Comment.class.getClassLoader(); + private static Class<?>[] _escapedModelInterfaces = new Class[] { + Comment.class + }; + private long _commentId; + private long _groupId; + private long _companyId; + private Date _modifiedDate; + private long _parentId; + private long _originalParentId; + private boolean _setOriginalParentId; + private String _parentName; + private String _commentText; + private String _guestName; + private String _guestEmailAddress; + private boolean _guestEmailNotification; + private long _likeCount; + private long _dislikeCount; + private long _titleId; + private long _originalTitleId; + private boolean _setOriginalTitleId; + private boolean _verified; + private boolean _originalVerified; + private boolean _setOriginalVerified; + private boolean _hasAnswer; + private long _columnBitmask; + private Comment _escapedModel; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleBaseImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleBaseImpl.java new file mode 100644 index 0000000..84aae23 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleBaseImpl.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model.impl; + +import com.liferay.portal.kernel.exception.SystemException; + +import ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle; +import ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalServiceUtil; + +/** + * The extended model base implementation for the PortletTitle service. Represents a row in the "GDP_PortletTitle" database table, with each column mapped to a property of this class. + * + * <p> + * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link PortletTitleImpl}. + * </p> + * + * @author Alireza + * @see PortletTitleImpl + * @see ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle + * @generated + */ +public abstract class PortletTitleBaseImpl extends PortletTitleModelImpl + implements PortletTitle { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a portlet title model instance should use the {@link PortletTitle} interface instead. + */ + @Override + public void persist() throws SystemException { + if (this.isNew()) { + PortletTitleLocalServiceUtil.addPortletTitle(this); + } + else { + PortletTitleLocalServiceUtil.updatePortletTitle(this); + } + } +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleCacheModel.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleCacheModel.java new file mode 100644 index 0000000..a2aa879 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleCacheModel.java @@ -0,0 +1,89 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model.impl; + +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.model.CacheModel; + +import ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +/** + * The cache model class for representing PortletTitle in entity cache. + * + * @author Alireza + * @see PortletTitle + * @generated + */ +public class PortletTitleCacheModel implements CacheModel<PortletTitle>, + Externalizable { + @Override + public String toString() { + StringBundler sb = new StringBundler(5); + + sb.append("{portletId="); + sb.append(portletId); + sb.append(", titleId="); + sb.append(titleId); + sb.append("}"); + + return sb.toString(); + } + + @Override + public PortletTitle toEntityModel() { + PortletTitleImpl portletTitleImpl = new PortletTitleImpl(); + + if (portletId == null) { + portletTitleImpl.setPortletId(StringPool.BLANK); + } + else { + portletTitleImpl.setPortletId(portletId); + } + + portletTitleImpl.setTitleId(titleId); + + portletTitleImpl.resetOriginalValues(); + + return portletTitleImpl; + } + + @Override + public void readExternal(ObjectInput objectInput) throws IOException { + portletId = objectInput.readUTF(); + titleId = objectInput.readLong(); + } + + @Override + public void writeExternal(ObjectOutput objectOutput) + throws IOException { + if (portletId == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(portletId); + } + + objectOutput.writeLong(titleId); + } + + public String portletId; + public long titleId; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleImpl.java new file mode 100644 index 0000000..dd73fe1 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleImpl.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model.impl; + +/** + * The extended model implementation for the PortletTitle service. Represents a row in the "GDP_PortletTitle" database table, with each column mapped to a property of this class. + * + * <p> + * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle} interface. + * </p> + * + * @author Alireza + */ +public class PortletTitleImpl extends PortletTitleBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a portlet title model instance should use the {@link ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle} interface instead. + */ + public PortletTitleImpl() { + } +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleModelImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleModelImpl.java new file mode 100644 index 0000000..6a3bee9 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/PortletTitleModelImpl.java @@ -0,0 +1,356 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model.impl; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.json.JSON; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.model.impl.BaseModelImpl; + +import ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle; +import ir.ac.iut.sccportal.guestdiscussion.model.PortletTitleModel; +import ir.ac.iut.sccportal.guestdiscussion.model.PortletTitleSoap; + +import java.io.Serializable; + +import java.sql.Types; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * The base model implementation for the PortletTitle service. Represents a row in the "GDP_PortletTitle" database table, with each column mapped to a property of this class. + * + * <p> + * This implementation and its corresponding interface {@link ir.ac.iut.sccportal.guestdiscussion.model.PortletTitleModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link PortletTitleImpl}. + * </p> + * + * @author Alireza + * @see PortletTitleImpl + * @see ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle + * @see ir.ac.iut.sccportal.guestdiscussion.model.PortletTitleModel + * @generated + */ +@JSON(strict = true) +public class PortletTitleModelImpl extends BaseModelImpl<PortletTitle> + implements PortletTitleModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a portlet title model instance should use the {@link ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle} interface instead. + */ + public static final String TABLE_NAME = "GDP_PortletTitle"; + public static final Object[][] TABLE_COLUMNS = { + { "portletId", Types.VARCHAR }, + { "titleId", Types.BIGINT } + }; + public static final String TABLE_SQL_CREATE = "create table GDP_PortletTitle (portletId VARCHAR(75) not null primary key,titleId LONG)"; + public static final String TABLE_SQL_DROP = "drop table GDP_PortletTitle"; + public static final String ORDER_BY_JPQL = " ORDER BY portletTitle.portletId ASC"; + public static final String ORDER_BY_SQL = " ORDER BY GDP_PortletTitle.portletId ASC"; + public static final String DATA_SOURCE = "liferayDataSource"; + public static final String SESSION_FACTORY = "liferaySessionFactory"; + public static final String TX_MANAGER = "liferayTransactionManager"; + public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( + "value.object.entity.cache.enabled.ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle"), + true); + public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( + "value.object.finder.cache.enabled.ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle"), + true); + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( + "value.object.column.bitmask.enabled.ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle"), + true); + public static long TITLEID_COLUMN_BITMASK = 1L; + public static long PORTLETID_COLUMN_BITMASK = 2L; + + /** + * Converts the soap model instance into a normal model instance. + * + * @param soapModel the soap model instance to convert + * @return the normal model instance + */ + public static PortletTitle toModel(PortletTitleSoap soapModel) { + if (soapModel == null) { + return null; + } + + PortletTitle model = new PortletTitleImpl(); + + model.setPortletId(soapModel.getPortletId()); + model.setTitleId(soapModel.getTitleId()); + + return model; + } + + /** + * Converts the soap model instances into normal model instances. + * + * @param soapModels the soap model instances to convert + * @return the normal model instances + */ + public static List<PortletTitle> toModels(PortletTitleSoap[] soapModels) { + if (soapModels == null) { + return null; + } + + List<PortletTitle> models = new ArrayList<PortletTitle>(soapModels.length); + + for (PortletTitleSoap soapModel : soapModels) { + models.add(toModel(soapModel)); + } + + return models; + } + + public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get( + "lock.expiration.time.ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle")); + + public PortletTitleModelImpl() { + } + + @Override + public String getPrimaryKey() { + return _portletId; + } + + @Override + public void setPrimaryKey(String primaryKey) { + setPortletId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _portletId; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey((String)primaryKeyObj); + } + + @Override + public Class<?> getModelClass() { + return PortletTitle.class; + } + + @Override + public String getModelClassName() { + return PortletTitle.class.getName(); + } + + @Override + public Map<String, Object> getModelAttributes() { + Map<String, Object> attributes = new HashMap<String, Object>(); + + attributes.put("portletId", getPortletId()); + attributes.put("titleId", getTitleId()); + + return attributes; + } + + @Override + public void setModelAttributes(Map<String, Object> attributes) { + String portletId = (String)attributes.get("portletId"); + + if (portletId != null) { + setPortletId(portletId); + } + + Long titleId = (Long)attributes.get("titleId"); + + if (titleId != null) { + setTitleId(titleId); + } + } + + @JSON + @Override + public String getPortletId() { + if (_portletId == null) { + return StringPool.BLANK; + } + else { + return _portletId; + } + } + + @Override + public void setPortletId(String portletId) { + _portletId = portletId; + } + + @JSON + @Override + public long getTitleId() { + return _titleId; + } + + @Override + public void setTitleId(long titleId) { + _columnBitmask |= TITLEID_COLUMN_BITMASK; + + if (!_setOriginalTitleId) { + _setOriginalTitleId = true; + + _originalTitleId = _titleId; + } + + _titleId = titleId; + } + + public long getOriginalTitleId() { + return _originalTitleId; + } + + public long getColumnBitmask() { + return _columnBitmask; + } + + @Override + public PortletTitle toEscapedModel() { + if (_escapedModel == null) { + _escapedModel = (PortletTitle)ProxyUtil.newProxyInstance(_classLoader, + _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); + } + + return _escapedModel; + } + + @Override + public Object clone() { + PortletTitleImpl portletTitleImpl = new PortletTitleImpl(); + + portletTitleImpl.setPortletId(getPortletId()); + portletTitleImpl.setTitleId(getTitleId()); + + portletTitleImpl.resetOriginalValues(); + + return portletTitleImpl; + } + + @Override + public int compareTo(PortletTitle portletTitle) { + String primaryKey = portletTitle.getPrimaryKey(); + + return getPrimaryKey().compareTo(primaryKey); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof PortletTitle)) { + return false; + } + + PortletTitle portletTitle = (PortletTitle)obj; + + String primaryKey = portletTitle.getPrimaryKey(); + + if (getPrimaryKey().equals(primaryKey)) { + return true; + } + else { + return false; + } + } + + @Override + public int hashCode() { + return getPrimaryKey().hashCode(); + } + + @Override + public void resetOriginalValues() { + PortletTitleModelImpl portletTitleModelImpl = this; + + portletTitleModelImpl._originalTitleId = portletTitleModelImpl._titleId; + + portletTitleModelImpl._setOriginalTitleId = false; + + portletTitleModelImpl._columnBitmask = 0; + } + + @Override + public CacheModel<PortletTitle> toCacheModel() { + PortletTitleCacheModel portletTitleCacheModel = new PortletTitleCacheModel(); + + portletTitleCacheModel.portletId = getPortletId(); + + String portletId = portletTitleCacheModel.portletId; + + if ((portletId != null) && (portletId.length() == 0)) { + portletTitleCacheModel.portletId = null; + } + + portletTitleCacheModel.titleId = getTitleId(); + + return portletTitleCacheModel; + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(5); + + sb.append("{portletId="); + sb.append(getPortletId()); + sb.append(", titleId="); + sb.append(getTitleId()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(10); + + sb.append("<model><model-name>"); + sb.append("ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle"); + sb.append("</model-name>"); + + sb.append( + "<column><column-name>portletId</column-name><column-value><![CDATA["); + sb.append(getPortletId()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>titleId</column-name><column-value><![CDATA["); + sb.append(getTitleId()); + sb.append("]]></column-value></column>"); + + sb.append("</model>"); + + return sb.toString(); + } + + private static ClassLoader _classLoader = PortletTitle.class.getClassLoader(); + private static Class<?>[] _escapedModelInterfaces = new Class[] { + PortletTitle.class + }; + private String _portletId; + private long _titleId; + private long _originalTitleId; + private boolean _setOriginalTitleId; + private long _columnBitmask; + private PortletTitle _escapedModel; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleBaseImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleBaseImpl.java new file mode 100644 index 0000000..eaa2fdb --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleBaseImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model.impl; + +import com.liferay.portal.kernel.exception.SystemException; + +import ir.ac.iut.sccportal.guestdiscussion.model.Title; +import ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil; + +/** + * The extended model base implementation for the Title service. Represents a row in the "GDP_Title" database table, with each column mapped to a property of this class. + * + * <p> + * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link TitleImpl}. + * </p> + * + * @author Alireza + * @see TitleImpl + * @see ir.ac.iut.sccportal.guestdiscussion.model.Title + * @generated + */ +public abstract class TitleBaseImpl extends TitleModelImpl implements Title { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a title model instance should use the {@link Title} interface instead. + */ + @Override + public void persist() throws SystemException { + if (this.isNew()) { + TitleLocalServiceUtil.addTitle(this); + } + else { + TitleLocalServiceUtil.updateTitle(this); + } + } +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleCacheModel.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleCacheModel.java new file mode 100644 index 0000000..26631a9 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleCacheModel.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model.impl; + +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.model.CacheModel; + +import ir.ac.iut.sccportal.guestdiscussion.model.Title; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +import java.util.Date; + +/** + * The cache model class for representing Title in entity cache. + * + * @author Alireza + * @see Title + * @generated + */ +public class TitleCacheModel implements CacheModel<Title>, Externalizable { + @Override + public String toString() { + StringBundler sb = new StringBundler(19); + + sb.append("{titleId="); + sb.append(titleId); + sb.append(", groupId="); + sb.append(groupId); + sb.append(", companyId="); + sb.append(companyId); + sb.append(", userId="); + sb.append(userId); + sb.append(", userName="); + sb.append(userName); + sb.append(", createDate="); + sb.append(createDate); + sb.append(", titleText="); + sb.append(titleText); + sb.append(", newCommentDraft="); + sb.append(newCommentDraft); + sb.append(", answerCommentDraft="); + sb.append(answerCommentDraft); + sb.append("}"); + + return sb.toString(); + } + + @Override + public Title toEntityModel() { + TitleImpl titleImpl = new TitleImpl(); + + titleImpl.setTitleId(titleId); + titleImpl.setGroupId(groupId); + titleImpl.setCompanyId(companyId); + titleImpl.setUserId(userId); + + if (userName == null) { + titleImpl.setUserName(StringPool.BLANK); + } + else { + titleImpl.setUserName(userName); + } + + if (createDate == Long.MIN_VALUE) { + titleImpl.setCreateDate(null); + } + else { + titleImpl.setCreateDate(new Date(createDate)); + } + + if (titleText == null) { + titleImpl.setTitleText(StringPool.BLANK); + } + else { + titleImpl.setTitleText(titleText); + } + + if (newCommentDraft == null) { + titleImpl.setNewCommentDraft(StringPool.BLANK); + } + else { + titleImpl.setNewCommentDraft(newCommentDraft); + } + + if (answerCommentDraft == null) { + titleImpl.setAnswerCommentDraft(StringPool.BLANK); + } + else { + titleImpl.setAnswerCommentDraft(answerCommentDraft); + } + + titleImpl.resetOriginalValues(); + + return titleImpl; + } + + @Override + public void readExternal(ObjectInput objectInput) throws IOException { + titleId = objectInput.readLong(); + groupId = objectInput.readLong(); + companyId = objectInput.readLong(); + userId = objectInput.readLong(); + userName = objectInput.readUTF(); + createDate = objectInput.readLong(); + titleText = objectInput.readUTF(); + newCommentDraft = objectInput.readUTF(); + answerCommentDraft = objectInput.readUTF(); + } + + @Override + public void writeExternal(ObjectOutput objectOutput) + throws IOException { + objectOutput.writeLong(titleId); + objectOutput.writeLong(groupId); + objectOutput.writeLong(companyId); + objectOutput.writeLong(userId); + + if (userName == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(userName); + } + + objectOutput.writeLong(createDate); + + if (titleText == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(titleText); + } + + if (newCommentDraft == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(newCommentDraft); + } + + if (answerCommentDraft == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(answerCommentDraft); + } + } + + public long titleId; + public long groupId; + public long companyId; + public long userId; + public String userName; + public long createDate; + public String titleText; + public String newCommentDraft; + public String answerCommentDraft; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleImpl.java new file mode 100644 index 0000000..d5ba8dd --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleImpl.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model.impl; + +/** + * The extended model implementation for the Title service. Represents a row in the "GDP_Title" database table, with each column mapped to a property of this class. + * + * <p> + * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link ir.ac.iut.sccportal.guestdiscussion.model.Title} interface. + * </p> + * + * @author Alireza + */ +public class TitleImpl extends TitleBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a title model instance should use the {@link ir.ac.iut.sccportal.guestdiscussion.model.Title} interface instead. + */ + public TitleImpl() { + } +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleModelImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleModelImpl.java new file mode 100644 index 0000000..980e5ab --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/model/impl/TitleModelImpl.java @@ -0,0 +1,652 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.model.impl; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.json.JSON; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.model.impl.BaseModelImpl; +import com.liferay.portal.service.ServiceContext; +import com.liferay.portal.util.PortalUtil; + +import com.liferay.portlet.expando.model.ExpandoBridge; +import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil; + +import ir.ac.iut.sccportal.guestdiscussion.model.Title; +import ir.ac.iut.sccportal.guestdiscussion.model.TitleModel; +import ir.ac.iut.sccportal.guestdiscussion.model.TitleSoap; + +import java.io.Serializable; + +import java.sql.Types; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * The base model implementation for the Title service. Represents a row in the "GDP_Title" database table, with each column mapped to a property of this class. + * + * <p> + * This implementation and its corresponding interface {@link ir.ac.iut.sccportal.guestdiscussion.model.TitleModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link TitleImpl}. + * </p> + * + * @author Alireza + * @see TitleImpl + * @see ir.ac.iut.sccportal.guestdiscussion.model.Title + * @see ir.ac.iut.sccportal.guestdiscussion.model.TitleModel + * @generated + */ +@JSON(strict = true) +public class TitleModelImpl extends BaseModelImpl<Title> implements TitleModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a title model instance should use the {@link ir.ac.iut.sccportal.guestdiscussion.model.Title} interface instead. + */ + public static final String TABLE_NAME = "GDP_Title"; + public static final Object[][] TABLE_COLUMNS = { + { "titleId", Types.BIGINT }, + { "groupId", Types.BIGINT }, + { "companyId", Types.BIGINT }, + { "userId", Types.BIGINT }, + { "userName", Types.VARCHAR }, + { "createDate", Types.TIMESTAMP }, + { "titleText", Types.VARCHAR }, + { "newCommentDraft", Types.VARCHAR }, + { "answerCommentDraft", Types.VARCHAR } + }; + public static final String TABLE_SQL_CREATE = "create table GDP_Title (titleId LONG not null primary key IDENTITY,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,titleText VARCHAR(1000) null,newCommentDraft TEXT null,answerCommentDraft TEXT null)"; + public static final String TABLE_SQL_DROP = "drop table GDP_Title"; + public static final String ORDER_BY_JPQL = " ORDER BY title.titleId DESC"; + public static final String ORDER_BY_SQL = " ORDER BY GDP_Title.titleId DESC"; + public static final String DATA_SOURCE = "liferayDataSource"; + public static final String SESSION_FACTORY = "liferaySessionFactory"; + public static final String TX_MANAGER = "liferayTransactionManager"; + public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( + "value.object.entity.cache.enabled.ir.ac.iut.sccportal.guestdiscussion.model.Title"), + true); + public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( + "value.object.finder.cache.enabled.ir.ac.iut.sccportal.guestdiscussion.model.Title"), + true); + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( + "value.object.column.bitmask.enabled.ir.ac.iut.sccportal.guestdiscussion.model.Title"), + true); + public static long COMPANYID_COLUMN_BITMASK = 1L; + public static long TITLEID_COLUMN_BITMASK = 2L; + + /** + * Converts the soap model instance into a normal model instance. + * + * @param soapModel the soap model instance to convert + * @return the normal model instance + */ + public static Title toModel(TitleSoap soapModel) { + if (soapModel == null) { + return null; + } + + Title model = new TitleImpl(); + + model.setTitleId(soapModel.getTitleId()); + model.setGroupId(soapModel.getGroupId()); + model.setCompanyId(soapModel.getCompanyId()); + model.setUserId(soapModel.getUserId()); + model.setUserName(soapModel.getUserName()); + model.setCreateDate(soapModel.getCreateDate()); + model.setTitleText(soapModel.getTitleText()); + model.setNewCommentDraft(soapModel.getNewCommentDraft()); + model.setAnswerCommentDraft(soapModel.getAnswerCommentDraft()); + + return model; + } + + /** + * Converts the soap model instances into normal model instances. + * + * @param soapModels the soap model instances to convert + * @return the normal model instances + */ + public static List<Title> toModels(TitleSoap[] soapModels) { + if (soapModels == null) { + return null; + } + + List<Title> models = new ArrayList<Title>(soapModels.length); + + for (TitleSoap soapModel : soapModels) { + models.add(toModel(soapModel)); + } + + return models; + } + + public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get( + "lock.expiration.time.ir.ac.iut.sccportal.guestdiscussion.model.Title")); + + public TitleModelImpl() { + } + + @Override + public long getPrimaryKey() { + return _titleId; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setTitleId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _titleId; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Class<?> getModelClass() { + return Title.class; + } + + @Override + public String getModelClassName() { + return Title.class.getName(); + } + + @Override + public Map<String, Object> getModelAttributes() { + Map<String, Object> attributes = new HashMap<String, Object>(); + + attributes.put("titleId", getTitleId()); + attributes.put("groupId", getGroupId()); + attributes.put("companyId", getCompanyId()); + attributes.put("userId", getUserId()); + attributes.put("userName", getUserName()); + attributes.put("createDate", getCreateDate()); + attributes.put("titleText", getTitleText()); + attributes.put("newCommentDraft", getNewCommentDraft()); + attributes.put("answerCommentDraft", getAnswerCommentDraft()); + + return attributes; + } + + @Override + public void setModelAttributes(Map<String, Object> attributes) { + Long titleId = (Long)attributes.get("titleId"); + + if (titleId != null) { + setTitleId(titleId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String userName = (String)attributes.get("userName"); + + if (userName != null) { + setUserName(userName); + } + + Date createDate = (Date)attributes.get("createDate"); + + if (createDate != null) { + setCreateDate(createDate); + } + + String titleText = (String)attributes.get("titleText"); + + if (titleText != null) { + setTitleText(titleText); + } + + String newCommentDraft = (String)attributes.get("newCommentDraft"); + + if (newCommentDraft != null) { + setNewCommentDraft(newCommentDraft); + } + + String answerCommentDraft = (String)attributes.get("answerCommentDraft"); + + if (answerCommentDraft != null) { + setAnswerCommentDraft(answerCommentDraft); + } + } + + @JSON + @Override + public long getTitleId() { + return _titleId; + } + + @Override + public void setTitleId(long titleId) { + _columnBitmask = -1L; + + _titleId = titleId; + } + + @JSON + @Override + public long getGroupId() { + return _groupId; + } + + @Override + public void setGroupId(long groupId) { + _groupId = groupId; + } + + @JSON + @Override + public long getCompanyId() { + return _companyId; + } + + @Override + public void setCompanyId(long companyId) { + _columnBitmask |= COMPANYID_COLUMN_BITMASK; + + if (!_setOriginalCompanyId) { + _setOriginalCompanyId = true; + + _originalCompanyId = _companyId; + } + + _companyId = companyId; + } + + public long getOriginalCompanyId() { + return _originalCompanyId; + } + + @JSON + @Override + public long getUserId() { + return _userId; + } + + @Override + public void setUserId(long userId) { + _userId = userId; + } + + @Override + public String getUserUuid() throws SystemException { + return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid); + } + + @Override + public void setUserUuid(String userUuid) { + _userUuid = userUuid; + } + + @JSON + @Override + public String getUserName() { + if (_userName == null) { + return StringPool.BLANK; + } + else { + return _userName; + } + } + + @Override + public void setUserName(String userName) { + _userName = userName; + } + + @JSON + @Override + public Date getCreateDate() { + return _createDate; + } + + @Override + public void setCreateDate(Date createDate) { + _createDate = createDate; + } + + @JSON + @Override + public String getTitleText() { + if (_titleText == null) { + return StringPool.BLANK; + } + else { + return _titleText; + } + } + + @Override + public void setTitleText(String titleText) { + _titleText = titleText; + } + + @JSON + @Override + public String getNewCommentDraft() { + if (_newCommentDraft == null) { + return StringPool.BLANK; + } + else { + return _newCommentDraft; + } + } + + @Override + public void setNewCommentDraft(String newCommentDraft) { + _newCommentDraft = newCommentDraft; + } + + @JSON + @Override + public String getAnswerCommentDraft() { + if (_answerCommentDraft == null) { + return StringPool.BLANK; + } + else { + return _answerCommentDraft; + } + } + + @Override + public void setAnswerCommentDraft(String answerCommentDraft) { + _answerCommentDraft = answerCommentDraft; + } + + public long getColumnBitmask() { + return _columnBitmask; + } + + @Override + public ExpandoBridge getExpandoBridge() { + return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), + Title.class.getName(), getPrimaryKey()); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + ExpandoBridge expandoBridge = getExpandoBridge(); + + expandoBridge.setAttributes(serviceContext); + } + + @Override + public Title toEscapedModel() { + if (_escapedModel == null) { + _escapedModel = (Title)ProxyUtil.newProxyInstance(_classLoader, + _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); + } + + return _escapedModel; + } + + @Override + public Object clone() { + TitleImpl titleImpl = new TitleImpl(); + + titleImpl.setTitleId(getTitleId()); + titleImpl.setGroupId(getGroupId()); + titleImpl.setCompanyId(getCompanyId()); + titleImpl.setUserId(getUserId()); + titleImpl.setUserName(getUserName()); + titleImpl.setCreateDate(getCreateDate()); + titleImpl.setTitleText(getTitleText()); + titleImpl.setNewCommentDraft(getNewCommentDraft()); + titleImpl.setAnswerCommentDraft(getAnswerCommentDraft()); + + titleImpl.resetOriginalValues(); + + return titleImpl; + } + + @Override + public int compareTo(Title title) { + int value = 0; + + if (getTitleId() < title.getTitleId()) { + value = -1; + } + else if (getTitleId() > title.getTitleId()) { + value = 1; + } + else { + value = 0; + } + + value = value * -1; + + if (value != 0) { + return value; + } + + return 0; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof Title)) { + return false; + } + + Title title = (Title)obj; + + long primaryKey = title.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public void resetOriginalValues() { + TitleModelImpl titleModelImpl = this; + + titleModelImpl._originalCompanyId = titleModelImpl._companyId; + + titleModelImpl._setOriginalCompanyId = false; + + titleModelImpl._columnBitmask = 0; + } + + @Override + public CacheModel<Title> toCacheModel() { + TitleCacheModel titleCacheModel = new TitleCacheModel(); + + titleCacheModel.titleId = getTitleId(); + + titleCacheModel.groupId = getGroupId(); + + titleCacheModel.companyId = getCompanyId(); + + titleCacheModel.userId = getUserId(); + + titleCacheModel.userName = getUserName(); + + String userName = titleCacheModel.userName; + + if ((userName != null) && (userName.length() == 0)) { + titleCacheModel.userName = null; + } + + Date createDate = getCreateDate(); + + if (createDate != null) { + titleCacheModel.createDate = createDate.getTime(); + } + else { + titleCacheModel.createDate = Long.MIN_VALUE; + } + + titleCacheModel.titleText = getTitleText(); + + String titleText = titleCacheModel.titleText; + + if ((titleText != null) && (titleText.length() == 0)) { + titleCacheModel.titleText = null; + } + + titleCacheModel.newCommentDraft = getNewCommentDraft(); + + String newCommentDraft = titleCacheModel.newCommentDraft; + + if ((newCommentDraft != null) && (newCommentDraft.length() == 0)) { + titleCacheModel.newCommentDraft = null; + } + + titleCacheModel.answerCommentDraft = getAnswerCommentDraft(); + + String answerCommentDraft = titleCacheModel.answerCommentDraft; + + if ((answerCommentDraft != null) && (answerCommentDraft.length() == 0)) { + titleCacheModel.answerCommentDraft = null; + } + + return titleCacheModel; + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(19); + + sb.append("{titleId="); + sb.append(getTitleId()); + sb.append(", groupId="); + sb.append(getGroupId()); + sb.append(", companyId="); + sb.append(getCompanyId()); + sb.append(", userId="); + sb.append(getUserId()); + sb.append(", userName="); + sb.append(getUserName()); + sb.append(", createDate="); + sb.append(getCreateDate()); + sb.append(", titleText="); + sb.append(getTitleText()); + sb.append(", newCommentDraft="); + sb.append(getNewCommentDraft()); + sb.append(", answerCommentDraft="); + sb.append(getAnswerCommentDraft()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(31); + + sb.append("<model><model-name>"); + sb.append("ir.ac.iut.sccportal.guestdiscussion.model.Title"); + sb.append("</model-name>"); + + sb.append( + "<column><column-name>titleId</column-name><column-value><![CDATA["); + sb.append(getTitleId()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>groupId</column-name><column-value><![CDATA["); + sb.append(getGroupId()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>companyId</column-name><column-value><![CDATA["); + sb.append(getCompanyId()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>userId</column-name><column-value><![CDATA["); + sb.append(getUserId()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>userName</column-name><column-value><![CDATA["); + sb.append(getUserName()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>createDate</column-name><column-value><![CDATA["); + sb.append(getCreateDate()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>titleText</column-name><column-value><![CDATA["); + sb.append(getTitleText()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>newCommentDraft</column-name><column-value><![CDATA["); + sb.append(getNewCommentDraft()); + sb.append("]]></column-value></column>"); + sb.append( + "<column><column-name>answerCommentDraft</column-name><column-value><![CDATA["); + sb.append(getAnswerCommentDraft()); + sb.append("]]></column-value></column>"); + + sb.append("</model>"); + + return sb.toString(); + } + + private static ClassLoader _classLoader = Title.class.getClassLoader(); + private static Class<?>[] _escapedModelInterfaces = new Class[] { Title.class }; + private long _titleId; + private long _groupId; + private long _companyId; + private long _originalCompanyId; + private boolean _setOriginalCompanyId; + private long _userId; + private String _userUuid; + private String _userName; + private Date _createDate; + private String _titleText; + private String _newCommentDraft; + private String _answerCommentDraft; + private long _columnBitmask; + private Title _escapedModel; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentLocalServiceBaseImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentLocalServiceBaseImpl.java new file mode 100644 index 0000000..97f4c4b --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentLocalServiceBaseImpl.java @@ -0,0 +1,654 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.base; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.bean.IdentifiableBean; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.model.PersistedModel; +import com.liferay.portal.service.BaseLocalServiceImpl; +import com.liferay.portal.service.PersistedModelLocalServiceRegistryUtil; +import com.liferay.portal.service.persistence.UserPersistence; + +import ir.ac.iut.sccportal.guestdiscussion.model.Comment; +import ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.CommentPersistence; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.PortletTitlePersistence; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.TitlePersistence; + +import java.io.Serializable; + +import java.util.List; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the comment local service. + * + * <p> + * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentLocalServiceImpl}. + * </p> + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentLocalServiceImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalServiceUtil + * @generated + */ +public abstract class CommentLocalServiceBaseImpl extends BaseLocalServiceImpl + implements CommentLocalService, IdentifiableBean { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalServiceUtil} to access the comment local service. + */ + + /** + * Adds the comment to the database. Also notifies the appropriate model listeners. + * + * @param comment the comment + * @return the comment that was added + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public Comment addComment(Comment comment) throws SystemException { + comment.setNew(true); + + return commentPersistence.update(comment); + } + + /** + * Creates a new comment with the primary key. Does not add the comment to the database. + * + * @param commentId the primary key for the new comment + * @return the new comment + */ + @Override + public Comment createComment(long commentId) { + return commentPersistence.create(commentId); + } + + /** + * Deletes the comment with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param commentId the primary key of the comment + * @return the comment that was removed + * @throws PortalException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.DELETE) + @Override + public Comment deleteComment(long commentId) + throws PortalException, SystemException { + return commentPersistence.remove(commentId); + } + + /** + * Deletes the comment from the database. Also notifies the appropriate model listeners. + * + * @param comment the comment + * @return the comment that was removed + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.DELETE) + @Override + public Comment deleteComment(Comment comment) throws SystemException { + return commentPersistence.remove(comment); + } + + @Override + public DynamicQuery dynamicQuery() { + Class<?> clazz = getClass(); + + return DynamicQueryFactoryUtil.forClass(Comment.class, + clazz.getClassLoader()); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public List dynamicQuery(DynamicQuery dynamicQuery) + throws SystemException { + return commentPersistence.findWithDynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end) + throws SystemException { + return commentPersistence.findWithDynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, + OrderByComparator orderByComparator) throws SystemException { + return commentPersistence.findWithDynamicQuery(dynamicQuery, start, + end, orderByComparator); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery) + throws SystemException { + return commentPersistence.countWithDynamicQuery(dynamicQuery); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection) throws SystemException { + return commentPersistence.countWithDynamicQuery(dynamicQuery, projection); + } + + @Override + public Comment fetchComment(long commentId) throws SystemException { + return commentPersistence.fetchByPrimaryKey(commentId); + } + + /** + * Returns the comment with the primary key. + * + * @param commentId the primary key of the comment + * @return the comment + * @throws PortalException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment getComment(long commentId) + throws PortalException, SystemException { + return commentPersistence.findByPrimaryKey(commentId); + } + + @Override + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException, SystemException { + return commentPersistence.findByPrimaryKey(primaryKeyObj); + } + + /** + * Returns a range of all the comments. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of comments + * @throws SystemException if a system exception occurred + */ + @Override + public List<Comment> getComments(int start, int end) + throws SystemException { + return commentPersistence.findAll(start, end); + } + + /** + * Returns the number of comments. + * + * @return the number of comments + * @throws SystemException if a system exception occurred + */ + @Override + public int getCommentsCount() throws SystemException { + return commentPersistence.countAll(); + } + + /** + * Updates the comment in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param comment the comment + * @return the comment that was updated + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public Comment updateComment(Comment comment) throws SystemException { + return commentPersistence.update(comment); + } + + /** + * Returns the comment local service. + * + * @return the comment local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService getCommentLocalService() { + return commentLocalService; + } + + /** + * Sets the comment local service. + * + * @param commentLocalService the comment local service + */ + public void setCommentLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService) { + this.commentLocalService = commentLocalService; + } + + /** + * Returns the comment remote service. + * + * @return the comment remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.CommentService getCommentService() { + return commentService; + } + + /** + * Sets the comment remote service. + * + * @param commentService the comment remote service + */ + public void setCommentService( + ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService) { + this.commentService = commentService; + } + + /** + * Returns the comment persistence. + * + * @return the comment persistence + */ + public CommentPersistence getCommentPersistence() { + return commentPersistence; + } + + /** + * Sets the comment persistence. + * + * @param commentPersistence the comment persistence + */ + public void setCommentPersistence(CommentPersistence commentPersistence) { + this.commentPersistence = commentPersistence; + } + + /** + * Returns the portlet title local service. + * + * @return the portlet title local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService getPortletTitleLocalService() { + return portletTitleLocalService; + } + + /** + * Sets the portlet title local service. + * + * @param portletTitleLocalService the portlet title local service + */ + public void setPortletTitleLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService) { + this.portletTitleLocalService = portletTitleLocalService; + } + + /** + * Returns the portlet title remote service. + * + * @return the portlet title remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService getPortletTitleService() { + return portletTitleService; + } + + /** + * Sets the portlet title remote service. + * + * @param portletTitleService the portlet title remote service + */ + public void setPortletTitleService( + ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService) { + this.portletTitleService = portletTitleService; + } + + /** + * Returns the portlet title persistence. + * + * @return the portlet title persistence + */ + public PortletTitlePersistence getPortletTitlePersistence() { + return portletTitlePersistence; + } + + /** + * Sets the portlet title persistence. + * + * @param portletTitlePersistence the portlet title persistence + */ + public void setPortletTitlePersistence( + PortletTitlePersistence portletTitlePersistence) { + this.portletTitlePersistence = portletTitlePersistence; + } + + /** + * Returns the title local service. + * + * @return the title local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService getTitleLocalService() { + return titleLocalService; + } + + /** + * Sets the title local service. + * + * @param titleLocalService the title local service + */ + public void setTitleLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService) { + this.titleLocalService = titleLocalService; + } + + /** + * Returns the title remote service. + * + * @return the title remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.TitleService getTitleService() { + return titleService; + } + + /** + * Sets the title remote service. + * + * @param titleService the title remote service + */ + public void setTitleService( + ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService) { + this.titleService = titleService; + } + + /** + * Returns the title persistence. + * + * @return the title persistence + */ + public TitlePersistence getTitlePersistence() { + return titlePersistence; + } + + /** + * Sets the title persistence. + * + * @param titlePersistence the title persistence + */ + public void setTitlePersistence(TitlePersistence titlePersistence) { + this.titlePersistence = titlePersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user remote service. + * + * @return the user remote service + */ + public com.liferay.portal.service.UserService getUserService() { + return userService; + } + + /** + * Sets the user remote service. + * + * @param userService the user remote service + */ + public void setUserService( + com.liferay.portal.service.UserService userService) { + this.userService = userService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + Class<?> clazz = getClass(); + + _classLoader = clazz.getClassLoader(); + + PersistedModelLocalServiceRegistryUtil.register("ir.ac.iut.sccportal.guestdiscussion.model.Comment", + commentLocalService); + } + + public void destroy() { + PersistedModelLocalServiceRegistryUtil.unregister( + "ir.ac.iut.sccportal.guestdiscussion.model.Comment"); + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public String getBeanIdentifier() { + return _beanIdentifier; + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(String beanIdentifier) { + _beanIdentifier = beanIdentifier; + } + + @Override + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + Thread currentThread = Thread.currentThread(); + + ClassLoader contextClassLoader = currentThread.getContextClassLoader(); + + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(_classLoader); + } + + try { + return _clpInvoker.invokeMethod(name, parameterTypes, arguments); + } + finally { + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(contextClassLoader); + } + } + } + + protected Class<?> getModelClass() { + return Comment.class; + } + + protected String getModelClassName() { + return Comment.class.getName(); + } + + /** + * Performs an SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) throws SystemException { + try { + DataSource dataSource = commentPersistence.getDataSource(); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql, new int[0]); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService; + @BeanReference(type = CommentPersistence.class) + protected CommentPersistence commentPersistence; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService; + @BeanReference(type = PortletTitlePersistence.class) + protected PortletTitlePersistence portletTitlePersistence; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService; + @BeanReference(type = TitlePersistence.class) + protected TitlePersistence titlePersistence; + @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) + protected com.liferay.counter.service.CounterLocalService counterLocalService; + @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class) + protected com.liferay.portal.service.ResourceLocalService resourceLocalService; + @BeanReference(type = com.liferay.portal.service.UserLocalService.class) + protected com.liferay.portal.service.UserLocalService userLocalService; + @BeanReference(type = com.liferay.portal.service.UserService.class) + protected com.liferay.portal.service.UserService userService; + @BeanReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + private String _beanIdentifier; + private ClassLoader _classLoader; + private CommentLocalServiceClpInvoker _clpInvoker = new CommentLocalServiceClpInvoker(); +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentLocalServiceClpInvoker.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentLocalServiceClpInvoker.java new file mode 100644 index 0000000..b0482b1 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentLocalServiceClpInvoker.java @@ -0,0 +1,332 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.base; + +import ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalServiceUtil; + +import java.util.Arrays; + +/** + * @author Alireza + * @generated + */ +public class CommentLocalServiceClpInvoker { + public CommentLocalServiceClpInvoker() { + _methodName0 = "addComment"; + + _methodParameterTypes0 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.Comment" + }; + + _methodName1 = "createComment"; + + _methodParameterTypes1 = new String[] { "long" }; + + _methodName2 = "deleteComment"; + + _methodParameterTypes2 = new String[] { "long" }; + + _methodName3 = "deleteComment"; + + _methodParameterTypes3 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.Comment" + }; + + _methodName4 = "dynamicQuery"; + + _methodParameterTypes4 = new String[] { }; + + _methodName5 = "dynamicQuery"; + + _methodParameterTypes5 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName6 = "dynamicQuery"; + + _methodParameterTypes6 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int" + }; + + _methodName7 = "dynamicQuery"; + + _methodParameterTypes7 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int", + "com.liferay.portal.kernel.util.OrderByComparator" + }; + + _methodName8 = "dynamicQueryCount"; + + _methodParameterTypes8 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName9 = "dynamicQueryCount"; + + _methodParameterTypes9 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", + "com.liferay.portal.kernel.dao.orm.Projection" + }; + + _methodName10 = "fetchComment"; + + _methodParameterTypes10 = new String[] { "long" }; + + _methodName11 = "getComment"; + + _methodParameterTypes11 = new String[] { "long" }; + + _methodName12 = "getPersistedModel"; + + _methodParameterTypes12 = new String[] { "java.io.Serializable" }; + + _methodName13 = "getComments"; + + _methodParameterTypes13 = new String[] { "int", "int" }; + + _methodName14 = "getCommentsCount"; + + _methodParameterTypes14 = new String[] { }; + + _methodName15 = "updateComment"; + + _methodParameterTypes15 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.Comment" + }; + + _methodName46 = "getBeanIdentifier"; + + _methodParameterTypes46 = new String[] { }; + + _methodName47 = "setBeanIdentifier"; + + _methodParameterTypes47 = new String[] { "java.lang.String" }; + + _methodName52 = "addComment"; + + _methodParameterTypes52 = new String[] { + "long", "long", "java.util.Date", "long", "java.lang.String", + "java.lang.String", "long", "long", "boolean", "boolean", + "java.lang.String", "java.lang.String", "boolean" + }; + + _methodName53 = "getCommentsByParentId_TitleId_Verified"; + + _methodParameterTypes53 = new String[] { "long", "long", "boolean" }; + + _methodName54 = "getCommentsByTitleId_Verified"; + + _methodParameterTypes54 = new String[] { "long", "boolean" }; + + _methodName55 = "getCommentsByTitleId"; + + _methodParameterTypes55 = new String[] { "long" }; + + _methodName56 = "deleteCommentsByTitleId"; + + _methodParameterTypes56 = new String[] { "long" }; + } + + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + if (_methodName0.equals(name) && + Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { + return CommentLocalServiceUtil.addComment((ir.ac.iut.sccportal.guestdiscussion.model.Comment)arguments[0]); + } + + if (_methodName1.equals(name) && + Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { + return CommentLocalServiceUtil.createComment(((Long)arguments[0]).longValue()); + } + + if (_methodName2.equals(name) && + Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { + return CommentLocalServiceUtil.deleteComment(((Long)arguments[0]).longValue()); + } + + if (_methodName3.equals(name) && + Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { + return CommentLocalServiceUtil.deleteComment((ir.ac.iut.sccportal.guestdiscussion.model.Comment)arguments[0]); + } + + if (_methodName4.equals(name) && + Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { + return CommentLocalServiceUtil.dynamicQuery(); + } + + if (_methodName5.equals(name) && + Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { + return CommentLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); + } + + if (_methodName6.equals(name) && + Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { + return CommentLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], + ((Integer)arguments[1]).intValue(), + ((Integer)arguments[2]).intValue()); + } + + if (_methodName7.equals(name) && + Arrays.deepEquals(_methodParameterTypes7, parameterTypes)) { + return CommentLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], + ((Integer)arguments[1]).intValue(), + ((Integer)arguments[2]).intValue(), + (com.liferay.portal.kernel.util.OrderByComparator)arguments[3]); + } + + if (_methodName8.equals(name) && + Arrays.deepEquals(_methodParameterTypes8, parameterTypes)) { + return CommentLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); + } + + if (_methodName9.equals(name) && + Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { + return CommentLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], + (com.liferay.portal.kernel.dao.orm.Projection)arguments[1]); + } + + if (_methodName10.equals(name) && + Arrays.deepEquals(_methodParameterTypes10, parameterTypes)) { + return CommentLocalServiceUtil.fetchComment(((Long)arguments[0]).longValue()); + } + + if (_methodName11.equals(name) && + Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { + return CommentLocalServiceUtil.getComment(((Long)arguments[0]).longValue()); + } + + if (_methodName12.equals(name) && + Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { + return CommentLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); + } + + if (_methodName13.equals(name) && + Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { + return CommentLocalServiceUtil.getComments(((Integer)arguments[0]).intValue(), + ((Integer)arguments[1]).intValue()); + } + + if (_methodName14.equals(name) && + Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { + return CommentLocalServiceUtil.getCommentsCount(); + } + + if (_methodName15.equals(name) && + Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { + return CommentLocalServiceUtil.updateComment((ir.ac.iut.sccportal.guestdiscussion.model.Comment)arguments[0]); + } + + if (_methodName46.equals(name) && + Arrays.deepEquals(_methodParameterTypes46, parameterTypes)) { + return CommentLocalServiceUtil.getBeanIdentifier(); + } + + if (_methodName47.equals(name) && + Arrays.deepEquals(_methodParameterTypes47, parameterTypes)) { + CommentLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); + + return null; + } + + if (_methodName52.equals(name) && + Arrays.deepEquals(_methodParameterTypes52, parameterTypes)) { + return CommentLocalServiceUtil.addComment(((Long)arguments[0]).longValue(), + ((Long)arguments[1]).longValue(), (java.util.Date)arguments[2], + ((Long)arguments[3]).longValue(), + (java.lang.String)arguments[4], (java.lang.String)arguments[5], + ((Long)arguments[6]).longValue(), + ((Long)arguments[7]).longValue(), + ((Boolean)arguments[8]).booleanValue(), + ((Boolean)arguments[9]).booleanValue(), + (java.lang.String)arguments[10], + (java.lang.String)arguments[11], + ((Boolean)arguments[12]).booleanValue()); + } + + if (_methodName53.equals(name) && + Arrays.deepEquals(_methodParameterTypes53, parameterTypes)) { + return CommentLocalServiceUtil.getCommentsByParentId_TitleId_Verified(((Long)arguments[0]).longValue(), + ((Long)arguments[1]).longValue(), + ((Boolean)arguments[2]).booleanValue()); + } + + if (_methodName54.equals(name) && + Arrays.deepEquals(_methodParameterTypes54, parameterTypes)) { + return CommentLocalServiceUtil.getCommentsByTitleId_Verified(((Long)arguments[0]).longValue(), + ((Boolean)arguments[1]).booleanValue()); + } + + if (_methodName55.equals(name) && + Arrays.deepEquals(_methodParameterTypes55, parameterTypes)) { + return CommentLocalServiceUtil.getCommentsByTitleId(((Long)arguments[0]).longValue()); + } + + if (_methodName56.equals(name) && + Arrays.deepEquals(_methodParameterTypes56, parameterTypes)) { + CommentLocalServiceUtil.deleteCommentsByTitleId(((Long)arguments[0]).longValue()); + + return null; + } + + throw new UnsupportedOperationException(); + } + + private String _methodName0; + private String[] _methodParameterTypes0; + private String _methodName1; + private String[] _methodParameterTypes1; + private String _methodName2; + private String[] _methodParameterTypes2; + private String _methodName3; + private String[] _methodParameterTypes3; + private String _methodName4; + private String[] _methodParameterTypes4; + private String _methodName5; + private String[] _methodParameterTypes5; + private String _methodName6; + private String[] _methodParameterTypes6; + private String _methodName7; + private String[] _methodParameterTypes7; + private String _methodName8; + private String[] _methodParameterTypes8; + private String _methodName9; + private String[] _methodParameterTypes9; + private String _methodName10; + private String[] _methodParameterTypes10; + private String _methodName11; + private String[] _methodParameterTypes11; + private String _methodName12; + private String[] _methodParameterTypes12; + private String _methodName13; + private String[] _methodParameterTypes13; + private String _methodName14; + private String[] _methodParameterTypes14; + private String _methodName15; + private String[] _methodParameterTypes15; + private String _methodName46; + private String[] _methodParameterTypes46; + private String _methodName47; + private String[] _methodParameterTypes47; + private String _methodName52; + private String[] _methodParameterTypes52; + private String _methodName53; + private String[] _methodParameterTypes53; + private String _methodName54; + private String[] _methodParameterTypes54; + private String _methodName55; + private String[] _methodParameterTypes55; + private String _methodName56; + private String[] _methodParameterTypes56; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentServiceBaseImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentServiceBaseImpl.java new file mode 100644 index 0000000..822da99 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentServiceBaseImpl.java @@ -0,0 +1,424 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.base; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.bean.IdentifiableBean; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.service.BaseServiceImpl; +import com.liferay.portal.service.persistence.UserPersistence; + +import ir.ac.iut.sccportal.guestdiscussion.model.Comment; +import ir.ac.iut.sccportal.guestdiscussion.service.CommentService; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.CommentPersistence; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.PortletTitlePersistence; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.TitlePersistence; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the comment remote service. + * + * <p> + * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentServiceImpl}. + * </p> + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.CommentServiceImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.CommentServiceUtil + * @generated + */ +public abstract class CommentServiceBaseImpl extends BaseServiceImpl + implements CommentService, IdentifiableBean { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.CommentServiceUtil} to access the comment remote service. + */ + + /** + * Returns the comment local service. + * + * @return the comment local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService getCommentLocalService() { + return commentLocalService; + } + + /** + * Sets the comment local service. + * + * @param commentLocalService the comment local service + */ + public void setCommentLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService) { + this.commentLocalService = commentLocalService; + } + + /** + * Returns the comment remote service. + * + * @return the comment remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.CommentService getCommentService() { + return commentService; + } + + /** + * Sets the comment remote service. + * + * @param commentService the comment remote service + */ + public void setCommentService( + ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService) { + this.commentService = commentService; + } + + /** + * Returns the comment persistence. + * + * @return the comment persistence + */ + public CommentPersistence getCommentPersistence() { + return commentPersistence; + } + + /** + * Sets the comment persistence. + * + * @param commentPersistence the comment persistence + */ + public void setCommentPersistence(CommentPersistence commentPersistence) { + this.commentPersistence = commentPersistence; + } + + /** + * Returns the portlet title local service. + * + * @return the portlet title local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService getPortletTitleLocalService() { + return portletTitleLocalService; + } + + /** + * Sets the portlet title local service. + * + * @param portletTitleLocalService the portlet title local service + */ + public void setPortletTitleLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService) { + this.portletTitleLocalService = portletTitleLocalService; + } + + /** + * Returns the portlet title remote service. + * + * @return the portlet title remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService getPortletTitleService() { + return portletTitleService; + } + + /** + * Sets the portlet title remote service. + * + * @param portletTitleService the portlet title remote service + */ + public void setPortletTitleService( + ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService) { + this.portletTitleService = portletTitleService; + } + + /** + * Returns the portlet title persistence. + * + * @return the portlet title persistence + */ + public PortletTitlePersistence getPortletTitlePersistence() { + return portletTitlePersistence; + } + + /** + * Sets the portlet title persistence. + * + * @param portletTitlePersistence the portlet title persistence + */ + public void setPortletTitlePersistence( + PortletTitlePersistence portletTitlePersistence) { + this.portletTitlePersistence = portletTitlePersistence; + } + + /** + * Returns the title local service. + * + * @return the title local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService getTitleLocalService() { + return titleLocalService; + } + + /** + * Sets the title local service. + * + * @param titleLocalService the title local service + */ + public void setTitleLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService) { + this.titleLocalService = titleLocalService; + } + + /** + * Returns the title remote service. + * + * @return the title remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.TitleService getTitleService() { + return titleService; + } + + /** + * Sets the title remote service. + * + * @param titleService the title remote service + */ + public void setTitleService( + ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService) { + this.titleService = titleService; + } + + /** + * Returns the title persistence. + * + * @return the title persistence + */ + public TitlePersistence getTitlePersistence() { + return titlePersistence; + } + + /** + * Sets the title persistence. + * + * @param titlePersistence the title persistence + */ + public void setTitlePersistence(TitlePersistence titlePersistence) { + this.titlePersistence = titlePersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user remote service. + * + * @return the user remote service + */ + public com.liferay.portal.service.UserService getUserService() { + return userService; + } + + /** + * Sets the user remote service. + * + * @param userService the user remote service + */ + public void setUserService( + com.liferay.portal.service.UserService userService) { + this.userService = userService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + Class<?> clazz = getClass(); + + _classLoader = clazz.getClassLoader(); + } + + public void destroy() { + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public String getBeanIdentifier() { + return _beanIdentifier; + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(String beanIdentifier) { + _beanIdentifier = beanIdentifier; + } + + @Override + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + Thread currentThread = Thread.currentThread(); + + ClassLoader contextClassLoader = currentThread.getContextClassLoader(); + + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(_classLoader); + } + + try { + return _clpInvoker.invokeMethod(name, parameterTypes, arguments); + } + finally { + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(contextClassLoader); + } + } + } + + protected Class<?> getModelClass() { + return Comment.class; + } + + protected String getModelClassName() { + return Comment.class.getName(); + } + + /** + * Performs an SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) throws SystemException { + try { + DataSource dataSource = commentPersistence.getDataSource(); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql, new int[0]); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService; + @BeanReference(type = CommentPersistence.class) + protected CommentPersistence commentPersistence; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService; + @BeanReference(type = PortletTitlePersistence.class) + protected PortletTitlePersistence portletTitlePersistence; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService; + @BeanReference(type = TitlePersistence.class) + protected TitlePersistence titlePersistence; + @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) + protected com.liferay.counter.service.CounterLocalService counterLocalService; + @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class) + protected com.liferay.portal.service.ResourceLocalService resourceLocalService; + @BeanReference(type = com.liferay.portal.service.UserLocalService.class) + protected com.liferay.portal.service.UserLocalService userLocalService; + @BeanReference(type = com.liferay.portal.service.UserService.class) + protected com.liferay.portal.service.UserService userService; + @BeanReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + private String _beanIdentifier; + private ClassLoader _classLoader; + private CommentServiceClpInvoker _clpInvoker = new CommentServiceClpInvoker(); +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentServiceClpInvoker.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentServiceClpInvoker.java new file mode 100644 index 0000000..22e7658 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/CommentServiceClpInvoker.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.base; + +import ir.ac.iut.sccportal.guestdiscussion.service.CommentServiceUtil; + +import java.util.Arrays; + +/** + * @author Alireza + * @generated + */ +public class CommentServiceClpInvoker { + public CommentServiceClpInvoker() { + _methodName30 = "getBeanIdentifier"; + + _methodParameterTypes30 = new String[] { }; + + _methodName31 = "setBeanIdentifier"; + + _methodParameterTypes31 = new String[] { "java.lang.String" }; + } + + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + if (_methodName30.equals(name) && + Arrays.deepEquals(_methodParameterTypes30, parameterTypes)) { + return CommentServiceUtil.getBeanIdentifier(); + } + + if (_methodName31.equals(name) && + Arrays.deepEquals(_methodParameterTypes31, parameterTypes)) { + CommentServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); + + return null; + } + + throw new UnsupportedOperationException(); + } + + private String _methodName30; + private String[] _methodParameterTypes30; + private String _methodName31; + private String[] _methodParameterTypes31; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleLocalServiceBaseImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleLocalServiceBaseImpl.java new file mode 100644 index 0000000..88503aa --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleLocalServiceBaseImpl.java @@ -0,0 +1,661 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.base; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.bean.IdentifiableBean; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.model.PersistedModel; +import com.liferay.portal.service.BaseLocalServiceImpl; +import com.liferay.portal.service.PersistedModelLocalServiceRegistryUtil; +import com.liferay.portal.service.persistence.UserPersistence; + +import ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle; +import ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.CommentPersistence; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.PortletTitlePersistence; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.TitlePersistence; + +import java.io.Serializable; + +import java.util.List; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the portlet title local service. + * + * <p> + * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleLocalServiceImpl}. + * </p> + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleLocalServiceImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalServiceUtil + * @generated + */ +public abstract class PortletTitleLocalServiceBaseImpl + extends BaseLocalServiceImpl implements PortletTitleLocalService, + IdentifiableBean { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalServiceUtil} to access the portlet title local service. + */ + + /** + * Adds the portlet title to the database. Also notifies the appropriate model listeners. + * + * @param portletTitle the portlet title + * @return the portlet title that was added + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public PortletTitle addPortletTitle(PortletTitle portletTitle) + throws SystemException { + portletTitle.setNew(true); + + return portletTitlePersistence.update(portletTitle); + } + + /** + * Creates a new portlet title with the primary key. Does not add the portlet title to the database. + * + * @param portletId the primary key for the new portlet title + * @return the new portlet title + */ + @Override + public PortletTitle createPortletTitle(String portletId) { + return portletTitlePersistence.create(portletId); + } + + /** + * Deletes the portlet title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param portletId the primary key of the portlet title + * @return the portlet title that was removed + * @throws PortalException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.DELETE) + @Override + public PortletTitle deletePortletTitle(String portletId) + throws PortalException, SystemException { + return portletTitlePersistence.remove(portletId); + } + + /** + * Deletes the portlet title from the database. Also notifies the appropriate model listeners. + * + * @param portletTitle the portlet title + * @return the portlet title that was removed + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.DELETE) + @Override + public PortletTitle deletePortletTitle(PortletTitle portletTitle) + throws SystemException { + return portletTitlePersistence.remove(portletTitle); + } + + @Override + public DynamicQuery dynamicQuery() { + Class<?> clazz = getClass(); + + return DynamicQueryFactoryUtil.forClass(PortletTitle.class, + clazz.getClassLoader()); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public List dynamicQuery(DynamicQuery dynamicQuery) + throws SystemException { + return portletTitlePersistence.findWithDynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end) + throws SystemException { + return portletTitlePersistence.findWithDynamicQuery(dynamicQuery, + start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, + OrderByComparator orderByComparator) throws SystemException { + return portletTitlePersistence.findWithDynamicQuery(dynamicQuery, + start, end, orderByComparator); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery) + throws SystemException { + return portletTitlePersistence.countWithDynamicQuery(dynamicQuery); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection) throws SystemException { + return portletTitlePersistence.countWithDynamicQuery(dynamicQuery, + projection); + } + + @Override + public PortletTitle fetchPortletTitle(String portletId) + throws SystemException { + return portletTitlePersistence.fetchByPrimaryKey(portletId); + } + + /** + * Returns the portlet title with the primary key. + * + * @param portletId the primary key of the portlet title + * @return the portlet title + * @throws PortalException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public PortletTitle getPortletTitle(String portletId) + throws PortalException, SystemException { + return portletTitlePersistence.findByPrimaryKey(portletId); + } + + @Override + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException, SystemException { + return portletTitlePersistence.findByPrimaryKey(primaryKeyObj); + } + + /** + * Returns a range of all the portlet titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @return the range of portlet titles + * @throws SystemException if a system exception occurred + */ + @Override + public List<PortletTitle> getPortletTitles(int start, int end) + throws SystemException { + return portletTitlePersistence.findAll(start, end); + } + + /** + * Returns the number of portlet titles. + * + * @return the number of portlet titles + * @throws SystemException if a system exception occurred + */ + @Override + public int getPortletTitlesCount() throws SystemException { + return portletTitlePersistence.countAll(); + } + + /** + * Updates the portlet title in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param portletTitle the portlet title + * @return the portlet title that was updated + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public PortletTitle updatePortletTitle(PortletTitle portletTitle) + throws SystemException { + return portletTitlePersistence.update(portletTitle); + } + + /** + * Returns the comment local service. + * + * @return the comment local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService getCommentLocalService() { + return commentLocalService; + } + + /** + * Sets the comment local service. + * + * @param commentLocalService the comment local service + */ + public void setCommentLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService) { + this.commentLocalService = commentLocalService; + } + + /** + * Returns the comment remote service. + * + * @return the comment remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.CommentService getCommentService() { + return commentService; + } + + /** + * Sets the comment remote service. + * + * @param commentService the comment remote service + */ + public void setCommentService( + ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService) { + this.commentService = commentService; + } + + /** + * Returns the comment persistence. + * + * @return the comment persistence + */ + public CommentPersistence getCommentPersistence() { + return commentPersistence; + } + + /** + * Sets the comment persistence. + * + * @param commentPersistence the comment persistence + */ + public void setCommentPersistence(CommentPersistence commentPersistence) { + this.commentPersistence = commentPersistence; + } + + /** + * Returns the portlet title local service. + * + * @return the portlet title local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService getPortletTitleLocalService() { + return portletTitleLocalService; + } + + /** + * Sets the portlet title local service. + * + * @param portletTitleLocalService the portlet title local service + */ + public void setPortletTitleLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService) { + this.portletTitleLocalService = portletTitleLocalService; + } + + /** + * Returns the portlet title remote service. + * + * @return the portlet title remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService getPortletTitleService() { + return portletTitleService; + } + + /** + * Sets the portlet title remote service. + * + * @param portletTitleService the portlet title remote service + */ + public void setPortletTitleService( + ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService) { + this.portletTitleService = portletTitleService; + } + + /** + * Returns the portlet title persistence. + * + * @return the portlet title persistence + */ + public PortletTitlePersistence getPortletTitlePersistence() { + return portletTitlePersistence; + } + + /** + * Sets the portlet title persistence. + * + * @param portletTitlePersistence the portlet title persistence + */ + public void setPortletTitlePersistence( + PortletTitlePersistence portletTitlePersistence) { + this.portletTitlePersistence = portletTitlePersistence; + } + + /** + * Returns the title local service. + * + * @return the title local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService getTitleLocalService() { + return titleLocalService; + } + + /** + * Sets the title local service. + * + * @param titleLocalService the title local service + */ + public void setTitleLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService) { + this.titleLocalService = titleLocalService; + } + + /** + * Returns the title remote service. + * + * @return the title remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.TitleService getTitleService() { + return titleService; + } + + /** + * Sets the title remote service. + * + * @param titleService the title remote service + */ + public void setTitleService( + ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService) { + this.titleService = titleService; + } + + /** + * Returns the title persistence. + * + * @return the title persistence + */ + public TitlePersistence getTitlePersistence() { + return titlePersistence; + } + + /** + * Sets the title persistence. + * + * @param titlePersistence the title persistence + */ + public void setTitlePersistence(TitlePersistence titlePersistence) { + this.titlePersistence = titlePersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user remote service. + * + * @return the user remote service + */ + public com.liferay.portal.service.UserService getUserService() { + return userService; + } + + /** + * Sets the user remote service. + * + * @param userService the user remote service + */ + public void setUserService( + com.liferay.portal.service.UserService userService) { + this.userService = userService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + Class<?> clazz = getClass(); + + _classLoader = clazz.getClassLoader(); + + PersistedModelLocalServiceRegistryUtil.register("ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle", + portletTitleLocalService); + } + + public void destroy() { + PersistedModelLocalServiceRegistryUtil.unregister( + "ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle"); + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public String getBeanIdentifier() { + return _beanIdentifier; + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(String beanIdentifier) { + _beanIdentifier = beanIdentifier; + } + + @Override + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + Thread currentThread = Thread.currentThread(); + + ClassLoader contextClassLoader = currentThread.getContextClassLoader(); + + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(_classLoader); + } + + try { + return _clpInvoker.invokeMethod(name, parameterTypes, arguments); + } + finally { + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(contextClassLoader); + } + } + } + + protected Class<?> getModelClass() { + return PortletTitle.class; + } + + protected String getModelClassName() { + return PortletTitle.class.getName(); + } + + /** + * Performs an SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) throws SystemException { + try { + DataSource dataSource = portletTitlePersistence.getDataSource(); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql, new int[0]); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService; + @BeanReference(type = CommentPersistence.class) + protected CommentPersistence commentPersistence; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService; + @BeanReference(type = PortletTitlePersistence.class) + protected PortletTitlePersistence portletTitlePersistence; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService; + @BeanReference(type = TitlePersistence.class) + protected TitlePersistence titlePersistence; + @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) + protected com.liferay.counter.service.CounterLocalService counterLocalService; + @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class) + protected com.liferay.portal.service.ResourceLocalService resourceLocalService; + @BeanReference(type = com.liferay.portal.service.UserLocalService.class) + protected com.liferay.portal.service.UserLocalService userLocalService; + @BeanReference(type = com.liferay.portal.service.UserService.class) + protected com.liferay.portal.service.UserService userService; + @BeanReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + private String _beanIdentifier; + private ClassLoader _classLoader; + private PortletTitleLocalServiceClpInvoker _clpInvoker = new PortletTitleLocalServiceClpInvoker(); +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleLocalServiceClpInvoker.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleLocalServiceClpInvoker.java new file mode 100644 index 0000000..01f90b6 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleLocalServiceClpInvoker.java @@ -0,0 +1,271 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.base; + +import ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalServiceUtil; + +import java.util.Arrays; + +/** + * @author Alireza + * @generated + */ +public class PortletTitleLocalServiceClpInvoker { + public PortletTitleLocalServiceClpInvoker() { + _methodName0 = "addPortletTitle"; + + _methodParameterTypes0 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle" + }; + + _methodName1 = "createPortletTitle"; + + _methodParameterTypes1 = new String[] { "java.lang.String" }; + + _methodName2 = "deletePortletTitle"; + + _methodParameterTypes2 = new String[] { "java.lang.String" }; + + _methodName3 = "deletePortletTitle"; + + _methodParameterTypes3 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle" + }; + + _methodName4 = "dynamicQuery"; + + _methodParameterTypes4 = new String[] { }; + + _methodName5 = "dynamicQuery"; + + _methodParameterTypes5 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName6 = "dynamicQuery"; + + _methodParameterTypes6 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int" + }; + + _methodName7 = "dynamicQuery"; + + _methodParameterTypes7 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int", + "com.liferay.portal.kernel.util.OrderByComparator" + }; + + _methodName8 = "dynamicQueryCount"; + + _methodParameterTypes8 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName9 = "dynamicQueryCount"; + + _methodParameterTypes9 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", + "com.liferay.portal.kernel.dao.orm.Projection" + }; + + _methodName10 = "fetchPortletTitle"; + + _methodParameterTypes10 = new String[] { "java.lang.String" }; + + _methodName11 = "getPortletTitle"; + + _methodParameterTypes11 = new String[] { "java.lang.String" }; + + _methodName12 = "getPersistedModel"; + + _methodParameterTypes12 = new String[] { "java.io.Serializable" }; + + _methodName13 = "getPortletTitles"; + + _methodParameterTypes13 = new String[] { "int", "int" }; + + _methodName14 = "getPortletTitlesCount"; + + _methodParameterTypes14 = new String[] { }; + + _methodName15 = "updatePortletTitle"; + + _methodParameterTypes15 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle" + }; + + _methodName46 = "getBeanIdentifier"; + + _methodParameterTypes46 = new String[] { }; + + _methodName47 = "setBeanIdentifier"; + + _methodParameterTypes47 = new String[] { "java.lang.String" }; + + _methodName52 = "deletePortletTitleByTitleId"; + + _methodParameterTypes52 = new String[] { "long" }; + } + + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + if (_methodName0.equals(name) && + Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { + return PortletTitleLocalServiceUtil.addPortletTitle((ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle)arguments[0]); + } + + if (_methodName1.equals(name) && + Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { + return PortletTitleLocalServiceUtil.createPortletTitle((java.lang.String)arguments[0]); + } + + if (_methodName2.equals(name) && + Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { + return PortletTitleLocalServiceUtil.deletePortletTitle((java.lang.String)arguments[0]); + } + + if (_methodName3.equals(name) && + Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { + return PortletTitleLocalServiceUtil.deletePortletTitle((ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle)arguments[0]); + } + + if (_methodName4.equals(name) && + Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { + return PortletTitleLocalServiceUtil.dynamicQuery(); + } + + if (_methodName5.equals(name) && + Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { + return PortletTitleLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); + } + + if (_methodName6.equals(name) && + Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { + return PortletTitleLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], + ((Integer)arguments[1]).intValue(), + ((Integer)arguments[2]).intValue()); + } + + if (_methodName7.equals(name) && + Arrays.deepEquals(_methodParameterTypes7, parameterTypes)) { + return PortletTitleLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], + ((Integer)arguments[1]).intValue(), + ((Integer)arguments[2]).intValue(), + (com.liferay.portal.kernel.util.OrderByComparator)arguments[3]); + } + + if (_methodName8.equals(name) && + Arrays.deepEquals(_methodParameterTypes8, parameterTypes)) { + return PortletTitleLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); + } + + if (_methodName9.equals(name) && + Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { + return PortletTitleLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], + (com.liferay.portal.kernel.dao.orm.Projection)arguments[1]); + } + + if (_methodName10.equals(name) && + Arrays.deepEquals(_methodParameterTypes10, parameterTypes)) { + return PortletTitleLocalServiceUtil.fetchPortletTitle((java.lang.String)arguments[0]); + } + + if (_methodName11.equals(name) && + Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { + return PortletTitleLocalServiceUtil.getPortletTitle((java.lang.String)arguments[0]); + } + + if (_methodName12.equals(name) && + Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { + return PortletTitleLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); + } + + if (_methodName13.equals(name) && + Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { + return PortletTitleLocalServiceUtil.getPortletTitles(((Integer)arguments[0]).intValue(), + ((Integer)arguments[1]).intValue()); + } + + if (_methodName14.equals(name) && + Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { + return PortletTitleLocalServiceUtil.getPortletTitlesCount(); + } + + if (_methodName15.equals(name) && + Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { + return PortletTitleLocalServiceUtil.updatePortletTitle((ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle)arguments[0]); + } + + if (_methodName46.equals(name) && + Arrays.deepEquals(_methodParameterTypes46, parameterTypes)) { + return PortletTitleLocalServiceUtil.getBeanIdentifier(); + } + + if (_methodName47.equals(name) && + Arrays.deepEquals(_methodParameterTypes47, parameterTypes)) { + PortletTitleLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); + + return null; + } + + if (_methodName52.equals(name) && + Arrays.deepEquals(_methodParameterTypes52, parameterTypes)) { + PortletTitleLocalServiceUtil.deletePortletTitleByTitleId(((Long)arguments[0]).longValue()); + + return null; + } + + throw new UnsupportedOperationException(); + } + + private String _methodName0; + private String[] _methodParameterTypes0; + private String _methodName1; + private String[] _methodParameterTypes1; + private String _methodName2; + private String[] _methodParameterTypes2; + private String _methodName3; + private String[] _methodParameterTypes3; + private String _methodName4; + private String[] _methodParameterTypes4; + private String _methodName5; + private String[] _methodParameterTypes5; + private String _methodName6; + private String[] _methodParameterTypes6; + private String _methodName7; + private String[] _methodParameterTypes7; + private String _methodName8; + private String[] _methodParameterTypes8; + private String _methodName9; + private String[] _methodParameterTypes9; + private String _methodName10; + private String[] _methodParameterTypes10; + private String _methodName11; + private String[] _methodParameterTypes11; + private String _methodName12; + private String[] _methodParameterTypes12; + private String _methodName13; + private String[] _methodParameterTypes13; + private String _methodName14; + private String[] _methodParameterTypes14; + private String _methodName15; + private String[] _methodParameterTypes15; + private String _methodName46; + private String[] _methodParameterTypes46; + private String _methodName47; + private String[] _methodParameterTypes47; + private String _methodName52; + private String[] _methodParameterTypes52; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceBaseImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceBaseImpl.java new file mode 100644 index 0000000..e018905 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceBaseImpl.java @@ -0,0 +1,424 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.base; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.bean.IdentifiableBean; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.service.BaseServiceImpl; +import com.liferay.portal.service.persistence.UserPersistence; + +import ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle; +import ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.CommentPersistence; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.PortletTitlePersistence; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.TitlePersistence; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the portlet title remote service. + * + * <p> + * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleServiceImpl}. + * </p> + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleServiceImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil + * @generated + */ +public abstract class PortletTitleServiceBaseImpl extends BaseServiceImpl + implements PortletTitleService, IdentifiableBean { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil} to access the portlet title remote service. + */ + + /** + * Returns the comment local service. + * + * @return the comment local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService getCommentLocalService() { + return commentLocalService; + } + + /** + * Sets the comment local service. + * + * @param commentLocalService the comment local service + */ + public void setCommentLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService) { + this.commentLocalService = commentLocalService; + } + + /** + * Returns the comment remote service. + * + * @return the comment remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.CommentService getCommentService() { + return commentService; + } + + /** + * Sets the comment remote service. + * + * @param commentService the comment remote service + */ + public void setCommentService( + ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService) { + this.commentService = commentService; + } + + /** + * Returns the comment persistence. + * + * @return the comment persistence + */ + public CommentPersistence getCommentPersistence() { + return commentPersistence; + } + + /** + * Sets the comment persistence. + * + * @param commentPersistence the comment persistence + */ + public void setCommentPersistence(CommentPersistence commentPersistence) { + this.commentPersistence = commentPersistence; + } + + /** + * Returns the portlet title local service. + * + * @return the portlet title local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService getPortletTitleLocalService() { + return portletTitleLocalService; + } + + /** + * Sets the portlet title local service. + * + * @param portletTitleLocalService the portlet title local service + */ + public void setPortletTitleLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService) { + this.portletTitleLocalService = portletTitleLocalService; + } + + /** + * Returns the portlet title remote service. + * + * @return the portlet title remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService getPortletTitleService() { + return portletTitleService; + } + + /** + * Sets the portlet title remote service. + * + * @param portletTitleService the portlet title remote service + */ + public void setPortletTitleService( + ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService) { + this.portletTitleService = portletTitleService; + } + + /** + * Returns the portlet title persistence. + * + * @return the portlet title persistence + */ + public PortletTitlePersistence getPortletTitlePersistence() { + return portletTitlePersistence; + } + + /** + * Sets the portlet title persistence. + * + * @param portletTitlePersistence the portlet title persistence + */ + public void setPortletTitlePersistence( + PortletTitlePersistence portletTitlePersistence) { + this.portletTitlePersistence = portletTitlePersistence; + } + + /** + * Returns the title local service. + * + * @return the title local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService getTitleLocalService() { + return titleLocalService; + } + + /** + * Sets the title local service. + * + * @param titleLocalService the title local service + */ + public void setTitleLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService) { + this.titleLocalService = titleLocalService; + } + + /** + * Returns the title remote service. + * + * @return the title remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.TitleService getTitleService() { + return titleService; + } + + /** + * Sets the title remote service. + * + * @param titleService the title remote service + */ + public void setTitleService( + ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService) { + this.titleService = titleService; + } + + /** + * Returns the title persistence. + * + * @return the title persistence + */ + public TitlePersistence getTitlePersistence() { + return titlePersistence; + } + + /** + * Sets the title persistence. + * + * @param titlePersistence the title persistence + */ + public void setTitlePersistence(TitlePersistence titlePersistence) { + this.titlePersistence = titlePersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user remote service. + * + * @return the user remote service + */ + public com.liferay.portal.service.UserService getUserService() { + return userService; + } + + /** + * Sets the user remote service. + * + * @param userService the user remote service + */ + public void setUserService( + com.liferay.portal.service.UserService userService) { + this.userService = userService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + Class<?> clazz = getClass(); + + _classLoader = clazz.getClassLoader(); + } + + public void destroy() { + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public String getBeanIdentifier() { + return _beanIdentifier; + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(String beanIdentifier) { + _beanIdentifier = beanIdentifier; + } + + @Override + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + Thread currentThread = Thread.currentThread(); + + ClassLoader contextClassLoader = currentThread.getContextClassLoader(); + + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(_classLoader); + } + + try { + return _clpInvoker.invokeMethod(name, parameterTypes, arguments); + } + finally { + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(contextClassLoader); + } + } + } + + protected Class<?> getModelClass() { + return PortletTitle.class; + } + + protected String getModelClassName() { + return PortletTitle.class.getName(); + } + + /** + * Performs an SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) throws SystemException { + try { + DataSource dataSource = portletTitlePersistence.getDataSource(); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql, new int[0]); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService; + @BeanReference(type = CommentPersistence.class) + protected CommentPersistence commentPersistence; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService; + @BeanReference(type = PortletTitlePersistence.class) + protected PortletTitlePersistence portletTitlePersistence; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService; + @BeanReference(type = TitlePersistence.class) + protected TitlePersistence titlePersistence; + @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) + protected com.liferay.counter.service.CounterLocalService counterLocalService; + @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class) + protected com.liferay.portal.service.ResourceLocalService resourceLocalService; + @BeanReference(type = com.liferay.portal.service.UserLocalService.class) + protected com.liferay.portal.service.UserLocalService userLocalService; + @BeanReference(type = com.liferay.portal.service.UserService.class) + protected com.liferay.portal.service.UserService userService; + @BeanReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + private String _beanIdentifier; + private ClassLoader _classLoader; + private PortletTitleServiceClpInvoker _clpInvoker = new PortletTitleServiceClpInvoker(); +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceClpInvoker.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceClpInvoker.java new file mode 100644 index 0000000..0aff9ce --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceClpInvoker.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.base; + +import ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil; + +import java.util.Arrays; + +/** + * @author Alireza + * @generated + */ +public class PortletTitleServiceClpInvoker { + public PortletTitleServiceClpInvoker() { + _methodName30 = "getBeanIdentifier"; + + _methodParameterTypes30 = new String[] { }; + + _methodName31 = "setBeanIdentifier"; + + _methodParameterTypes31 = new String[] { "java.lang.String" }; + } + + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + if (_methodName30.equals(name) && + Arrays.deepEquals(_methodParameterTypes30, parameterTypes)) { + return PortletTitleServiceUtil.getBeanIdentifier(); + } + + if (_methodName31.equals(name) && + Arrays.deepEquals(_methodParameterTypes31, parameterTypes)) { + PortletTitleServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); + + return null; + } + + throw new UnsupportedOperationException(); + } + + private String _methodName30; + private String[] _methodParameterTypes30; + private String _methodName31; + private String[] _methodParameterTypes31; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceBaseImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceBaseImpl.java new file mode 100644 index 0000000..d3e6cf8 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceBaseImpl.java @@ -0,0 +1,652 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.base; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.bean.IdentifiableBean; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.model.PersistedModel; +import com.liferay.portal.service.BaseLocalServiceImpl; +import com.liferay.portal.service.PersistedModelLocalServiceRegistryUtil; +import com.liferay.portal.service.persistence.UserPersistence; + +import ir.ac.iut.sccportal.guestdiscussion.model.Title; +import ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.CommentPersistence; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.PortletTitlePersistence; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.TitlePersistence; + +import java.io.Serializable; + +import java.util.List; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the title local service. + * + * <p> + * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleLocalServiceImpl}. + * </p> + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleLocalServiceImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil + * @generated + */ +public abstract class TitleLocalServiceBaseImpl extends BaseLocalServiceImpl + implements TitleLocalService, IdentifiableBean { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil} to access the title local service. + */ + + /** + * Adds the title to the database. Also notifies the appropriate model listeners. + * + * @param title the title + * @return the title that was added + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public Title addTitle(Title title) throws SystemException { + title.setNew(true); + + return titlePersistence.update(title); + } + + /** + * Creates a new title with the primary key. Does not add the title to the database. + * + * @param titleId the primary key for the new title + * @return the new title + */ + @Override + public Title createTitle(long titleId) { + return titlePersistence.create(titleId); + } + + /** + * Deletes the title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param titleId the primary key of the title + * @return the title that was removed + * @throws PortalException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.DELETE) + @Override + public Title deleteTitle(long titleId) + throws PortalException, SystemException { + return titlePersistence.remove(titleId); + } + + /** + * Deletes the title from the database. Also notifies the appropriate model listeners. + * + * @param title the title + * @return the title that was removed + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.DELETE) + @Override + public Title deleteTitle(Title title) throws SystemException { + return titlePersistence.remove(title); + } + + @Override + public DynamicQuery dynamicQuery() { + Class<?> clazz = getClass(); + + return DynamicQueryFactoryUtil.forClass(Title.class, + clazz.getClassLoader()); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public List dynamicQuery(DynamicQuery dynamicQuery) + throws SystemException { + return titlePersistence.findWithDynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end) + throws SystemException { + return titlePersistence.findWithDynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, + OrderByComparator orderByComparator) throws SystemException { + return titlePersistence.findWithDynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery) + throws SystemException { + return titlePersistence.countWithDynamicQuery(dynamicQuery); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection) throws SystemException { + return titlePersistence.countWithDynamicQuery(dynamicQuery, projection); + } + + @Override + public Title fetchTitle(long titleId) throws SystemException { + return titlePersistence.fetchByPrimaryKey(titleId); + } + + /** + * Returns the title with the primary key. + * + * @param titleId the primary key of the title + * @return the title + * @throws PortalException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Title getTitle(long titleId) throws PortalException, SystemException { + return titlePersistence.findByPrimaryKey(titleId); + } + + @Override + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException, SystemException { + return titlePersistence.findByPrimaryKey(primaryKeyObj); + } + + /** + * Returns a range of all the titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @return the range of titles + * @throws SystemException if a system exception occurred + */ + @Override + public List<Title> getTitles(int start, int end) throws SystemException { + return titlePersistence.findAll(start, end); + } + + /** + * Returns the number of titles. + * + * @return the number of titles + * @throws SystemException if a system exception occurred + */ + @Override + public int getTitlesCount() throws SystemException { + return titlePersistence.countAll(); + } + + /** + * Updates the title in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param title the title + * @return the title that was updated + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public Title updateTitle(Title title) throws SystemException { + return titlePersistence.update(title); + } + + /** + * Returns the comment local service. + * + * @return the comment local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService getCommentLocalService() { + return commentLocalService; + } + + /** + * Sets the comment local service. + * + * @param commentLocalService the comment local service + */ + public void setCommentLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService) { + this.commentLocalService = commentLocalService; + } + + /** + * Returns the comment remote service. + * + * @return the comment remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.CommentService getCommentService() { + return commentService; + } + + /** + * Sets the comment remote service. + * + * @param commentService the comment remote service + */ + public void setCommentService( + ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService) { + this.commentService = commentService; + } + + /** + * Returns the comment persistence. + * + * @return the comment persistence + */ + public CommentPersistence getCommentPersistence() { + return commentPersistence; + } + + /** + * Sets the comment persistence. + * + * @param commentPersistence the comment persistence + */ + public void setCommentPersistence(CommentPersistence commentPersistence) { + this.commentPersistence = commentPersistence; + } + + /** + * Returns the portlet title local service. + * + * @return the portlet title local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService getPortletTitleLocalService() { + return portletTitleLocalService; + } + + /** + * Sets the portlet title local service. + * + * @param portletTitleLocalService the portlet title local service + */ + public void setPortletTitleLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService) { + this.portletTitleLocalService = portletTitleLocalService; + } + + /** + * Returns the portlet title remote service. + * + * @return the portlet title remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService getPortletTitleService() { + return portletTitleService; + } + + /** + * Sets the portlet title remote service. + * + * @param portletTitleService the portlet title remote service + */ + public void setPortletTitleService( + ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService) { + this.portletTitleService = portletTitleService; + } + + /** + * Returns the portlet title persistence. + * + * @return the portlet title persistence + */ + public PortletTitlePersistence getPortletTitlePersistence() { + return portletTitlePersistence; + } + + /** + * Sets the portlet title persistence. + * + * @param portletTitlePersistence the portlet title persistence + */ + public void setPortletTitlePersistence( + PortletTitlePersistence portletTitlePersistence) { + this.portletTitlePersistence = portletTitlePersistence; + } + + /** + * Returns the title local service. + * + * @return the title local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService getTitleLocalService() { + return titleLocalService; + } + + /** + * Sets the title local service. + * + * @param titleLocalService the title local service + */ + public void setTitleLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService) { + this.titleLocalService = titleLocalService; + } + + /** + * Returns the title remote service. + * + * @return the title remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.TitleService getTitleService() { + return titleService; + } + + /** + * Sets the title remote service. + * + * @param titleService the title remote service + */ + public void setTitleService( + ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService) { + this.titleService = titleService; + } + + /** + * Returns the title persistence. + * + * @return the title persistence + */ + public TitlePersistence getTitlePersistence() { + return titlePersistence; + } + + /** + * Sets the title persistence. + * + * @param titlePersistence the title persistence + */ + public void setTitlePersistence(TitlePersistence titlePersistence) { + this.titlePersistence = titlePersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user remote service. + * + * @return the user remote service + */ + public com.liferay.portal.service.UserService getUserService() { + return userService; + } + + /** + * Sets the user remote service. + * + * @param userService the user remote service + */ + public void setUserService( + com.liferay.portal.service.UserService userService) { + this.userService = userService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + Class<?> clazz = getClass(); + + _classLoader = clazz.getClassLoader(); + + PersistedModelLocalServiceRegistryUtil.register("ir.ac.iut.sccportal.guestdiscussion.model.Title", + titleLocalService); + } + + public void destroy() { + PersistedModelLocalServiceRegistryUtil.unregister( + "ir.ac.iut.sccportal.guestdiscussion.model.Title"); + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public String getBeanIdentifier() { + return _beanIdentifier; + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(String beanIdentifier) { + _beanIdentifier = beanIdentifier; + } + + @Override + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + Thread currentThread = Thread.currentThread(); + + ClassLoader contextClassLoader = currentThread.getContextClassLoader(); + + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(_classLoader); + } + + try { + return _clpInvoker.invokeMethod(name, parameterTypes, arguments); + } + finally { + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(contextClassLoader); + } + } + } + + protected Class<?> getModelClass() { + return Title.class; + } + + protected String getModelClassName() { + return Title.class.getName(); + } + + /** + * Performs an SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) throws SystemException { + try { + DataSource dataSource = titlePersistence.getDataSource(); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql, new int[0]); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService; + @BeanReference(type = CommentPersistence.class) + protected CommentPersistence commentPersistence; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService; + @BeanReference(type = PortletTitlePersistence.class) + protected PortletTitlePersistence portletTitlePersistence; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService; + @BeanReference(type = TitlePersistence.class) + protected TitlePersistence titlePersistence; + @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) + protected com.liferay.counter.service.CounterLocalService counterLocalService; + @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class) + protected com.liferay.portal.service.ResourceLocalService resourceLocalService; + @BeanReference(type = com.liferay.portal.service.UserLocalService.class) + protected com.liferay.portal.service.UserLocalService userLocalService; + @BeanReference(type = com.liferay.portal.service.UserService.class) + protected com.liferay.portal.service.UserService userService; + @BeanReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + private String _beanIdentifier; + private ClassLoader _classLoader; + private TitleLocalServiceClpInvoker _clpInvoker = new TitleLocalServiceClpInvoker(); +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceClpInvoker.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceClpInvoker.java new file mode 100644 index 0000000..ba6035f --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceClpInvoker.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.base; + +import ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil; + +import java.util.Arrays; + +/** + * @author Alireza + * @generated + */ +public class TitleLocalServiceClpInvoker { + public TitleLocalServiceClpInvoker() { + _methodName0 = "addTitle"; + + _methodParameterTypes0 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.Title" + }; + + _methodName1 = "createTitle"; + + _methodParameterTypes1 = new String[] { "long" }; + + _methodName2 = "deleteTitle"; + + _methodParameterTypes2 = new String[] { "long" }; + + _methodName3 = "deleteTitle"; + + _methodParameterTypes3 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.Title" + }; + + _methodName4 = "dynamicQuery"; + + _methodParameterTypes4 = new String[] { }; + + _methodName5 = "dynamicQuery"; + + _methodParameterTypes5 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName6 = "dynamicQuery"; + + _methodParameterTypes6 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int" + }; + + _methodName7 = "dynamicQuery"; + + _methodParameterTypes7 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int", + "com.liferay.portal.kernel.util.OrderByComparator" + }; + + _methodName8 = "dynamicQueryCount"; + + _methodParameterTypes8 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName9 = "dynamicQueryCount"; + + _methodParameterTypes9 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", + "com.liferay.portal.kernel.dao.orm.Projection" + }; + + _methodName10 = "fetchTitle"; + + _methodParameterTypes10 = new String[] { "long" }; + + _methodName11 = "getTitle"; + + _methodParameterTypes11 = new String[] { "long" }; + + _methodName12 = "getPersistedModel"; + + _methodParameterTypes12 = new String[] { "java.io.Serializable" }; + + _methodName13 = "getTitles"; + + _methodParameterTypes13 = new String[] { "int", "int" }; + + _methodName14 = "getTitlesCount"; + + _methodParameterTypes14 = new String[] { }; + + _methodName15 = "updateTitle"; + + _methodParameterTypes15 = new String[] { + "ir.ac.iut.sccportal.guestdiscussion.model.Title" + }; + + _methodName46 = "getBeanIdentifier"; + + _methodParameterTypes46 = new String[] { }; + + _methodName47 = "setBeanIdentifier"; + + _methodParameterTypes47 = new String[] { "java.lang.String" }; + + _methodName52 = "addTitle"; + + _methodParameterTypes52 = new String[] { + "long", "long", "long", "java.lang.String", "java.lang.String" + }; + + _methodName53 = "getTitlesByCompanyId"; + + _methodParameterTypes53 = new String[] { "long" }; + } + + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + if (_methodName0.equals(name) && + Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { + return TitleLocalServiceUtil.addTitle((ir.ac.iut.sccportal.guestdiscussion.model.Title)arguments[0]); + } + + if (_methodName1.equals(name) && + Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { + return TitleLocalServiceUtil.createTitle(((Long)arguments[0]).longValue()); + } + + if (_methodName2.equals(name) && + Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { + return TitleLocalServiceUtil.deleteTitle(((Long)arguments[0]).longValue()); + } + + if (_methodName3.equals(name) && + Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { + return TitleLocalServiceUtil.deleteTitle((ir.ac.iut.sccportal.guestdiscussion.model.Title)arguments[0]); + } + + if (_methodName4.equals(name) && + Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { + return TitleLocalServiceUtil.dynamicQuery(); + } + + if (_methodName5.equals(name) && + Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { + return TitleLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); + } + + if (_methodName6.equals(name) && + Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { + return TitleLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], + ((Integer)arguments[1]).intValue(), + ((Integer)arguments[2]).intValue()); + } + + if (_methodName7.equals(name) && + Arrays.deepEquals(_methodParameterTypes7, parameterTypes)) { + return TitleLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], + ((Integer)arguments[1]).intValue(), + ((Integer)arguments[2]).intValue(), + (com.liferay.portal.kernel.util.OrderByComparator)arguments[3]); + } + + if (_methodName8.equals(name) && + Arrays.deepEquals(_methodParameterTypes8, parameterTypes)) { + return TitleLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); + } + + if (_methodName9.equals(name) && + Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { + return TitleLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], + (com.liferay.portal.kernel.dao.orm.Projection)arguments[1]); + } + + if (_methodName10.equals(name) && + Arrays.deepEquals(_methodParameterTypes10, parameterTypes)) { + return TitleLocalServiceUtil.fetchTitle(((Long)arguments[0]).longValue()); + } + + if (_methodName11.equals(name) && + Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { + return TitleLocalServiceUtil.getTitle(((Long)arguments[0]).longValue()); + } + + if (_methodName12.equals(name) && + Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { + return TitleLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); + } + + if (_methodName13.equals(name) && + Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { + return TitleLocalServiceUtil.getTitles(((Integer)arguments[0]).intValue(), + ((Integer)arguments[1]).intValue()); + } + + if (_methodName14.equals(name) && + Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { + return TitleLocalServiceUtil.getTitlesCount(); + } + + if (_methodName15.equals(name) && + Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { + return TitleLocalServiceUtil.updateTitle((ir.ac.iut.sccportal.guestdiscussion.model.Title)arguments[0]); + } + + if (_methodName46.equals(name) && + Arrays.deepEquals(_methodParameterTypes46, parameterTypes)) { + return TitleLocalServiceUtil.getBeanIdentifier(); + } + + if (_methodName47.equals(name) && + Arrays.deepEquals(_methodParameterTypes47, parameterTypes)) { + TitleLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); + + return null; + } + + if (_methodName52.equals(name) && + Arrays.deepEquals(_methodParameterTypes52, parameterTypes)) { + return TitleLocalServiceUtil.addTitle(((Long)arguments[0]).longValue(), + ((Long)arguments[1]).longValue(), + ((Long)arguments[2]).longValue(), + (java.lang.String)arguments[3], (java.lang.String)arguments[4]); + } + + if (_methodName53.equals(name) && + Arrays.deepEquals(_methodParameterTypes53, parameterTypes)) { + return TitleLocalServiceUtil.getTitlesByCompanyId(((Long)arguments[0]).longValue()); + } + + throw new UnsupportedOperationException(); + } + + private String _methodName0; + private String[] _methodParameterTypes0; + private String _methodName1; + private String[] _methodParameterTypes1; + private String _methodName2; + private String[] _methodParameterTypes2; + private String _methodName3; + private String[] _methodParameterTypes3; + private String _methodName4; + private String[] _methodParameterTypes4; + private String _methodName5; + private String[] _methodParameterTypes5; + private String _methodName6; + private String[] _methodParameterTypes6; + private String _methodName7; + private String[] _methodParameterTypes7; + private String _methodName8; + private String[] _methodParameterTypes8; + private String _methodName9; + private String[] _methodParameterTypes9; + private String _methodName10; + private String[] _methodParameterTypes10; + private String _methodName11; + private String[] _methodParameterTypes11; + private String _methodName12; + private String[] _methodParameterTypes12; + private String _methodName13; + private String[] _methodParameterTypes13; + private String _methodName14; + private String[] _methodParameterTypes14; + private String _methodName15; + private String[] _methodParameterTypes15; + private String _methodName46; + private String[] _methodParameterTypes46; + private String _methodName47; + private String[] _methodParameterTypes47; + private String _methodName52; + private String[] _methodParameterTypes52; + private String _methodName53; + private String[] _methodParameterTypes53; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceBaseImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceBaseImpl.java new file mode 100644 index 0000000..00eb149 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceBaseImpl.java @@ -0,0 +1,424 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.base; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.bean.IdentifiableBean; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.service.BaseServiceImpl; +import com.liferay.portal.service.persistence.UserPersistence; + +import ir.ac.iut.sccportal.guestdiscussion.model.Title; +import ir.ac.iut.sccportal.guestdiscussion.service.TitleService; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.CommentPersistence; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.PortletTitlePersistence; +import ir.ac.iut.sccportal.guestdiscussion.service.persistence.TitlePersistence; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the title remote service. + * + * <p> + * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleServiceImpl}. + * </p> + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleServiceImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil + * @generated + */ +public abstract class TitleServiceBaseImpl extends BaseServiceImpl + implements TitleService, IdentifiableBean { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil} to access the title remote service. + */ + + /** + * Returns the comment local service. + * + * @return the comment local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService getCommentLocalService() { + return commentLocalService; + } + + /** + * Sets the comment local service. + * + * @param commentLocalService the comment local service + */ + public void setCommentLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService) { + this.commentLocalService = commentLocalService; + } + + /** + * Returns the comment remote service. + * + * @return the comment remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.CommentService getCommentService() { + return commentService; + } + + /** + * Sets the comment remote service. + * + * @param commentService the comment remote service + */ + public void setCommentService( + ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService) { + this.commentService = commentService; + } + + /** + * Returns the comment persistence. + * + * @return the comment persistence + */ + public CommentPersistence getCommentPersistence() { + return commentPersistence; + } + + /** + * Sets the comment persistence. + * + * @param commentPersistence the comment persistence + */ + public void setCommentPersistence(CommentPersistence commentPersistence) { + this.commentPersistence = commentPersistence; + } + + /** + * Returns the portlet title local service. + * + * @return the portlet title local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService getPortletTitleLocalService() { + return portletTitleLocalService; + } + + /** + * Sets the portlet title local service. + * + * @param portletTitleLocalService the portlet title local service + */ + public void setPortletTitleLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService) { + this.portletTitleLocalService = portletTitleLocalService; + } + + /** + * Returns the portlet title remote service. + * + * @return the portlet title remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService getPortletTitleService() { + return portletTitleService; + } + + /** + * Sets the portlet title remote service. + * + * @param portletTitleService the portlet title remote service + */ + public void setPortletTitleService( + ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService) { + this.portletTitleService = portletTitleService; + } + + /** + * Returns the portlet title persistence. + * + * @return the portlet title persistence + */ + public PortletTitlePersistence getPortletTitlePersistence() { + return portletTitlePersistence; + } + + /** + * Sets the portlet title persistence. + * + * @param portletTitlePersistence the portlet title persistence + */ + public void setPortletTitlePersistence( + PortletTitlePersistence portletTitlePersistence) { + this.portletTitlePersistence = portletTitlePersistence; + } + + /** + * Returns the title local service. + * + * @return the title local service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService getTitleLocalService() { + return titleLocalService; + } + + /** + * Sets the title local service. + * + * @param titleLocalService the title local service + */ + public void setTitleLocalService( + ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService) { + this.titleLocalService = titleLocalService; + } + + /** + * Returns the title remote service. + * + * @return the title remote service + */ + public ir.ac.iut.sccportal.guestdiscussion.service.TitleService getTitleService() { + return titleService; + } + + /** + * Sets the title remote service. + * + * @param titleService the title remote service + */ + public void setTitleService( + ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService) { + this.titleService = titleService; + } + + /** + * Returns the title persistence. + * + * @return the title persistence + */ + public TitlePersistence getTitlePersistence() { + return titlePersistence; + } + + /** + * Sets the title persistence. + * + * @param titlePersistence the title persistence + */ + public void setTitlePersistence(TitlePersistence titlePersistence) { + this.titlePersistence = titlePersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user remote service. + * + * @return the user remote service + */ + public com.liferay.portal.service.UserService getUserService() { + return userService; + } + + /** + * Sets the user remote service. + * + * @param userService the user remote service + */ + public void setUserService( + com.liferay.portal.service.UserService userService) { + this.userService = userService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + Class<?> clazz = getClass(); + + _classLoader = clazz.getClassLoader(); + } + + public void destroy() { + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public String getBeanIdentifier() { + return _beanIdentifier; + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(String beanIdentifier) { + _beanIdentifier = beanIdentifier; + } + + @Override + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + Thread currentThread = Thread.currentThread(); + + ClassLoader contextClassLoader = currentThread.getContextClassLoader(); + + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(_classLoader); + } + + try { + return _clpInvoker.invokeMethod(name, parameterTypes, arguments); + } + finally { + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(contextClassLoader); + } + } + } + + protected Class<?> getModelClass() { + return Title.class; + } + + protected String getModelClassName() { + return Title.class.getName(); + } + + /** + * Performs an SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) throws SystemException { + try { + DataSource dataSource = titlePersistence.getDataSource(); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql, new int[0]); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService; + @BeanReference(type = CommentPersistence.class) + protected CommentPersistence commentPersistence; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService; + @BeanReference(type = PortletTitlePersistence.class) + protected PortletTitlePersistence portletTitlePersistence; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService; + @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleService.class) + protected ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService; + @BeanReference(type = TitlePersistence.class) + protected TitlePersistence titlePersistence; + @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) + protected com.liferay.counter.service.CounterLocalService counterLocalService; + @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class) + protected com.liferay.portal.service.ResourceLocalService resourceLocalService; + @BeanReference(type = com.liferay.portal.service.UserLocalService.class) + protected com.liferay.portal.service.UserLocalService userLocalService; + @BeanReference(type = com.liferay.portal.service.UserService.class) + protected com.liferay.portal.service.UserService userService; + @BeanReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + private String _beanIdentifier; + private ClassLoader _classLoader; + private TitleServiceClpInvoker _clpInvoker = new TitleServiceClpInvoker(); +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceClpInvoker.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceClpInvoker.java new file mode 100644 index 0000000..675b283 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceClpInvoker.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.base; + +import ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil; + +import java.util.Arrays; + +/** + * @author Alireza + * @generated + */ +public class TitleServiceClpInvoker { + public TitleServiceClpInvoker() { + _methodName30 = "getBeanIdentifier"; + + _methodParameterTypes30 = new String[] { }; + + _methodName31 = "setBeanIdentifier"; + + _methodParameterTypes31 = new String[] { "java.lang.String" }; + } + + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + if (_methodName30.equals(name) && + Arrays.deepEquals(_methodParameterTypes30, parameterTypes)) { + return TitleServiceUtil.getBeanIdentifier(); + } + + if (_methodName31.equals(name) && + Arrays.deepEquals(_methodParameterTypes31, parameterTypes)) { + TitleServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); + + return null; + } + + throw new UnsupportedOperationException(); + } + + private String _methodName30; + private String[] _methodParameterTypes30; + private String _methodName31; + private String[] _methodParameterTypes31; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/CommentServiceSoap.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/CommentServiceSoap.java new file mode 100644 index 0000000..0487ebb --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/CommentServiceSoap.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.http; + +/** + * Provides the SOAP utility for the + * {@link ir.ac.iut.sccportal.guestdiscussion.service.CommentServiceUtil} service utility. The + * static methods of this class calls the same methods of the service utility. + * However, the signatures are different because it is difficult for SOAP to + * support certain types. + * + * <p> + * ServiceBuilder follows certain rules in translating the methods. For example, + * if the method in the service utility returns a {@link java.util.List}, that + * is translated to an array of {@link ir.ac.iut.sccportal.guestdiscussion.model.CommentSoap}. + * If the method in the service utility returns a + * {@link ir.ac.iut.sccportal.guestdiscussion.model.Comment}, that is translated to a + * {@link ir.ac.iut.sccportal.guestdiscussion.model.CommentSoap}. Methods that SOAP cannot + * safely wire are skipped. + * </p> + * + * <p> + * The benefits of using the SOAP utility is that it is cross platform + * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and + * even Perl, to call the generated services. One drawback of SOAP is that it is + * slow because it needs to serialize all calls into a text format (XML). + * </p> + * + * <p> + * You can see a list of services at http://localhost:8080/api/axis. Set the + * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure + * security. + * </p> + * + * <p> + * The SOAP utility is only generated for remote services. + * </p> + * + * @author Alireza + * @see CommentServiceHttp + * @see ir.ac.iut.sccportal.guestdiscussion.model.CommentSoap + * @see ir.ac.iut.sccportal.guestdiscussion.service.CommentServiceUtil + * @generated + */ +public class CommentServiceSoap { +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/PortletTitleServiceSoap.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/PortletTitleServiceSoap.java new file mode 100644 index 0000000..1b7bfd1 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/PortletTitleServiceSoap.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.http; + +/** + * Provides the SOAP utility for the + * {@link ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil} service utility. The + * static methods of this class calls the same methods of the service utility. + * However, the signatures are different because it is difficult for SOAP to + * support certain types. + * + * <p> + * ServiceBuilder follows certain rules in translating the methods. For example, + * if the method in the service utility returns a {@link java.util.List}, that + * is translated to an array of {@link ir.ac.iut.sccportal.guestdiscussion.model.PortletTitleSoap}. + * If the method in the service utility returns a + * {@link ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle}, that is translated to a + * {@link ir.ac.iut.sccportal.guestdiscussion.model.PortletTitleSoap}. Methods that SOAP cannot + * safely wire are skipped. + * </p> + * + * <p> + * The benefits of using the SOAP utility is that it is cross platform + * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and + * even Perl, to call the generated services. One drawback of SOAP is that it is + * slow because it needs to serialize all calls into a text format (XML). + * </p> + * + * <p> + * You can see a list of services at http://localhost:8080/api/axis. Set the + * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure + * security. + * </p> + * + * <p> + * The SOAP utility is only generated for remote services. + * </p> + * + * @author Alireza + * @see PortletTitleServiceHttp + * @see ir.ac.iut.sccportal.guestdiscussion.model.PortletTitleSoap + * @see ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil + * @generated + */ +public class PortletTitleServiceSoap { +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/TitleServiceSoap.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/TitleServiceSoap.java new file mode 100644 index 0000000..632f593 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/TitleServiceSoap.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.http; + +/** + * Provides the SOAP utility for the + * {@link ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil} service utility. The + * static methods of this class calls the same methods of the service utility. + * However, the signatures are different because it is difficult for SOAP to + * support certain types. + * + * <p> + * ServiceBuilder follows certain rules in translating the methods. For example, + * if the method in the service utility returns a {@link java.util.List}, that + * is translated to an array of {@link ir.ac.iut.sccportal.guestdiscussion.model.TitleSoap}. + * If the method in the service utility returns a + * {@link ir.ac.iut.sccportal.guestdiscussion.model.Title}, that is translated to a + * {@link ir.ac.iut.sccportal.guestdiscussion.model.TitleSoap}. Methods that SOAP cannot + * safely wire are skipped. + * </p> + * + * <p> + * The benefits of using the SOAP utility is that it is cross platform + * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and + * even Perl, to call the generated services. One drawback of SOAP is that it is + * slow because it needs to serialize all calls into a text format (XML). + * </p> + * + * <p> + * You can see a list of services at http://localhost:8080/api/axis. Set the + * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure + * security. + * </p> + * + * <p> + * The SOAP utility is only generated for remote services. + * </p> + * + * @author Alireza + * @see TitleServiceHttp + * @see ir.ac.iut.sccportal.guestdiscussion.model.TitleSoap + * @see ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil + * @generated + */ +public class TitleServiceSoap { +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentLocalServiceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentLocalServiceImpl.java new file mode 100644 index 0000000..56d1dd7 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentLocalServiceImpl.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.impl; + +import java.util.Date; +import java.util.List; + +import com.liferay.portal.kernel.exception.SystemException; + +import ir.ac.iut.sccportal.guestdiscussion.model.Comment; +import ir.ac.iut.sccportal.guestdiscussion.service.base.CommentLocalServiceBaseImpl; + +/** + * The implementation of the comment local service. + * + * <p> + * All custom service methods should be put in this class. Whenever methods are + * added, rerun ServiceBuilder to copy their definitions into the + * {@link ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService} + * interface. + * + * <p> + * This is a local service. Methods of this service will not have security + * checks based on the propagated JAAS credentials because this service can only + * be accessed from within the same VM. + * </p> + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.CommentLocalServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalServiceUtil + */ +public class CommentLocalServiceImpl extends CommentLocalServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link + * ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalServiceUtil} to + * access the comment local service. + */ + + public Comment addComment(long groupId, long companyId, Date modifiedDate, + long parentId, String commentText, String guestName, + long likeCount, long titleId, boolean verified, boolean hasChild, String parentName, String guestEmailAddress, boolean guestEmailNotification) + throws SystemException { + + Comment comment = commentPersistence.create(0); + + comment.setGroupId(groupId); + comment.setCompanyId(companyId); + comment.setModifiedDate(modifiedDate); + comment.setParentId(parentId); + comment.setCommentText(commentText); + comment.setGuestName(guestName); + comment.setLikeCount(likeCount); + comment.setTitleId(titleId); + comment.setVerified(verified); + comment.setHasAnswer(hasChild); + comment.setParentName(parentName); + comment.setGuestEmailAddress(guestEmailAddress); + comment.setGuestEmailNotification(guestEmailNotification); + + return super.addComment(comment); + + } + + public List<Comment> getCommentsByParentId_TitleId_Verified (long parentId, long titleId, boolean verified) throws SystemException { + return commentPersistence.findByParentId_TitleId_Verified(parentId, titleId, verified); + } + + public List<Comment> getCommentsByTitleId_Verified (long titleId, boolean verified) throws SystemException { + return commentPersistence.findByTitleId_Virified(titleId, verified); + } + + public List<Comment> getCommentsByTitleId (long titleId) throws SystemException { + return commentPersistence.findByTitleId(titleId); + } + + public void deleteCommentsByTitleId (long titleId) throws SystemException { + commentPersistence.removeByTitleId(titleId); + } + +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentServiceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentServiceImpl.java new file mode 100644 index 0000000..feb779f --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentServiceImpl.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.impl; + +import ir.ac.iut.sccportal.guestdiscussion.service.base.CommentServiceBaseImpl; + +/** + * The implementation of the comment remote service. + * + * <p> + * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link ir.ac.iut.sccportal.guestdiscussion.service.CommentService} interface. + * + * <p> + * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely. + * </p> + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.CommentServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.CommentServiceUtil + */ +public class CommentServiceImpl extends CommentServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.CommentServiceUtil} to access the comment remote service. + */ +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleLocalServiceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleLocalServiceImpl.java new file mode 100644 index 0000000..c1fb42b --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleLocalServiceImpl.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.impl; + +import com.liferay.portal.kernel.exception.SystemException; + +import ir.ac.iut.sccportal.guestdiscussion.service.base.PortletTitleLocalServiceBaseImpl; + +/** + * The implementation of the portlet title local service. + * + * <p> + * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService} interface. + * + * <p> + * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. + * </p> + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.PortletTitleLocalServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalServiceUtil + */ +public class PortletTitleLocalServiceImpl + extends PortletTitleLocalServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalServiceUtil} to access the portlet title local service. + */ + + public void deletePortletTitleByTitleId (long titleId) throws SystemException { + portletTitlePersistence.removeByTitleId(titleId); + } +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleServiceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleServiceImpl.java new file mode 100644 index 0000000..ae493bb --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleServiceImpl.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.impl; + +import ir.ac.iut.sccportal.guestdiscussion.service.base.PortletTitleServiceBaseImpl; + +/** + * The implementation of the portlet title remote service. + * + * <p> + * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService} interface. + * + * <p> + * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely. + * </p> + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.PortletTitleServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil + */ +public class PortletTitleServiceImpl extends PortletTitleServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil} to access the portlet title remote service. + */ +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleLocalServiceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleLocalServiceImpl.java new file mode 100644 index 0000000..2497ea7 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleLocalServiceImpl.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.impl; + +import java.util.Date; +import java.util.List; + +import com.liferay.portal.NoSuchUserException; +import com.liferay.portal.kernel.exception.SystemException; + +import ir.ac.iut.sccportal.guestdiscussion.model.Title; +import ir.ac.iut.sccportal.guestdiscussion.service.base.TitleLocalServiceBaseImpl; + +/** + * The implementation of the title local service. + * + * <p> + * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService} interface. + * + * <p> + * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. + * </p> + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.TitleLocalServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil + */ +public class TitleLocalServiceImpl extends TitleLocalServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil} to access the title local service. + */ + + public Title addTitle(long groupId, long companyId, long userId, String userName, String titleText) throws SystemException, NoSuchUserException + { + Title title=titlePersistence.create(0); + title.setGroupId(groupId); + title.setCompanyId(companyId); + title.setUserId(userId); + title.setUserName(userName); + title.setCreateDate(new Date()); + title.setTitleText(titleText); + + return super.addTitle(title); + + } + + public List<Title> getTitlesByCompanyId (long companyId) throws SystemException { + return titlePersistence.findByCompanyId(companyId); + } + + +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleServiceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleServiceImpl.java new file mode 100644 index 0000000..d1c640a --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleServiceImpl.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.impl; + +import ir.ac.iut.sccportal.guestdiscussion.service.base.TitleServiceBaseImpl; + +/** + * The implementation of the title remote service. + * + * <p> + * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link ir.ac.iut.sccportal.guestdiscussion.service.TitleService} interface. + * + * <p> + * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely. + * </p> + * + * @author Alireza + * @see ir.ac.iut.sccportal.guestdiscussion.service.base.TitleServiceBaseImpl + * @see ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil + */ +public class TitleServiceImpl extends TitleServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil} to access the title remote service. + */ +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl.java new file mode 100644 index 0000000..d88dc95 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl.java @@ -0,0 +1,2341 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.persistence; + +import com.liferay.portal.kernel.cache.CacheRegistryUtil; +import com.liferay.portal.kernel.dao.orm.EntityCacheUtil; +import com.liferay.portal.kernel.dao.orm.FinderCacheUtil; +import com.liferay.portal.kernel.dao.orm.FinderPath; +import com.liferay.portal.kernel.dao.orm.Query; +import com.liferay.portal.kernel.dao.orm.QueryPos; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.dao.orm.Session; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.InstanceFactory; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.PropsKeys; +import com.liferay.portal.kernel.util.PropsUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.kernel.util.UnmodifiableList; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.model.ModelListener; +import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; + +import ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException; +import ir.ac.iut.sccportal.guestdiscussion.model.Comment; +import ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentImpl; +import ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * The persistence implementation for the comment service. + * + * <p> + * Caching information and settings can be found in <code>portal.properties</code> + * </p> + * + * @author Alireza + * @see CommentPersistence + * @see CommentUtil + * @generated + */ +public class CommentPersistenceImpl extends BasePersistenceImpl<Comment> + implements CommentPersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link CommentUtil} to access the comment persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. + */ + public static final String FINDER_CLASS_NAME_ENTITY = CommentImpl.class.getName(); + public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List1"; + public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List2"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentModelImpl.FINDER_CACHE_ENABLED, CommentImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentModelImpl.FINDER_CACHE_ENABLED, CommentImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_PARENTID_TITLEID_VERIFIED = + new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentModelImpl.FINDER_CACHE_ENABLED, CommentImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "findByParentId_TitleId_Verified", + new String[] { + Long.class.getName(), Long.class.getName(), + Boolean.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PARENTID_TITLEID_VERIFIED = + new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentModelImpl.FINDER_CACHE_ENABLED, CommentImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "findByParentId_TitleId_Verified", + new String[] { + Long.class.getName(), Long.class.getName(), + Boolean.class.getName() + }, + CommentModelImpl.PARENTID_COLUMN_BITMASK | + CommentModelImpl.TITLEID_COLUMN_BITMASK | + CommentModelImpl.VERIFIED_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_PARENTID_TITLEID_VERIFIED = + new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByParentId_TitleId_Verified", + new String[] { + Long.class.getName(), Long.class.getName(), + Boolean.class.getName() + }); + + /** + * Returns all the comments where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @return the matching comments + * @throws SystemException if a system exception occurred + */ + @Override + public List<Comment> findByParentId_TitleId_Verified(long parentId, + long titleId, boolean verified) throws SystemException { + return findByParentId_TitleId_Verified(parentId, titleId, verified, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the comments where parentId = ? and titleId = ? and verified = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of matching comments + * @throws SystemException if a system exception occurred + */ + @Override + public List<Comment> findByParentId_TitleId_Verified(long parentId, + long titleId, boolean verified, int start, int end) + throws SystemException { + return findByParentId_TitleId_Verified(parentId, titleId, verified, + start, end, null); + } + + /** + * Returns an ordered range of all the comments where parentId = ? and titleId = ? and verified = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching comments + * @throws SystemException if a system exception occurred + */ + @Override + public List<Comment> findByParentId_TitleId_Verified(long parentId, + long titleId, boolean verified, int start, int end, + OrderByComparator orderByComparator) throws SystemException { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PARENTID_TITLEID_VERIFIED; + finderArgs = new Object[] { parentId, titleId, verified }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_PARENTID_TITLEID_VERIFIED; + finderArgs = new Object[] { + parentId, titleId, verified, + + start, end, orderByComparator + }; + } + + List<Comment> list = (List<Comment>)FinderCacheUtil.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (Comment comment : list) { + if ((parentId != comment.getParentId()) || + (titleId != comment.getTitleId()) || + (verified != comment.getVerified())) { + list = null; + + break; + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_COMMENT_WHERE); + + query.append(_FINDER_COLUMN_PARENTID_TITLEID_VERIFIED_PARENTID_2); + + query.append(_FINDER_COLUMN_PARENTID_TITLEID_VERIFIED_TITLEID_2); + + query.append(_FINDER_COLUMN_PARENTID_TITLEID_VERIFIED_VERIFIED_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(CommentModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(parentId); + + qPos.add(titleId); + + qPos.add(verified); + + if (!pagination) { + list = (List<Comment>)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = new UnmodifiableList<Comment>(list); + } + else { + list = (List<Comment>)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + FinderCacheUtil.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment findByParentId_TitleId_Verified_First(long parentId, + long titleId, boolean verified, OrderByComparator orderByComparator) + throws NoSuchCommentException, SystemException { + Comment comment = fetchByParentId_TitleId_Verified_First(parentId, + titleId, verified, orderByComparator); + + if (comment != null) { + return comment; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("parentId="); + msg.append(parentId); + + msg.append(", titleId="); + msg.append(titleId); + + msg.append(", verified="); + msg.append(verified); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + throw new NoSuchCommentException(msg.toString()); + } + + /** + * Returns the first comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment fetchByParentId_TitleId_Verified_First(long parentId, + long titleId, boolean verified, OrderByComparator orderByComparator) + throws SystemException { + List<Comment> list = findByParentId_TitleId_Verified(parentId, titleId, + verified, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment findByParentId_TitleId_Verified_Last(long parentId, + long titleId, boolean verified, OrderByComparator orderByComparator) + throws NoSuchCommentException, SystemException { + Comment comment = fetchByParentId_TitleId_Verified_Last(parentId, + titleId, verified, orderByComparator); + + if (comment != null) { + return comment; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("parentId="); + msg.append(parentId); + + msg.append(", titleId="); + msg.append(titleId); + + msg.append(", verified="); + msg.append(verified); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + throw new NoSuchCommentException(msg.toString()); + } + + /** + * Returns the last comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment fetchByParentId_TitleId_Verified_Last(long parentId, + long titleId, boolean verified, OrderByComparator orderByComparator) + throws SystemException { + int count = countByParentId_TitleId_Verified(parentId, titleId, verified); + + if (count == 0) { + return null; + } + + List<Comment> list = findByParentId_TitleId_Verified(parentId, titleId, + verified, count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the comments before and after the current comment in the ordered set where parentId = ? and titleId = ? and verified = ?. + * + * @param commentId the primary key of the current comment + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment[] findByParentId_TitleId_Verified_PrevAndNext( + long commentId, long parentId, long titleId, boolean verified, + OrderByComparator orderByComparator) + throws NoSuchCommentException, SystemException { + Comment comment = findByPrimaryKey(commentId); + + Session session = null; + + try { + session = openSession(); + + Comment[] array = new CommentImpl[3]; + + array[0] = getByParentId_TitleId_Verified_PrevAndNext(session, + comment, parentId, titleId, verified, orderByComparator, + true); + + array[1] = comment; + + array[2] = getByParentId_TitleId_Verified_PrevAndNext(session, + comment, parentId, titleId, verified, orderByComparator, + false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected Comment getByParentId_TitleId_Verified_PrevAndNext( + Session session, Comment comment, long parentId, long titleId, + boolean verified, OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByFields().length * 6)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_COMMENT_WHERE); + + query.append(_FINDER_COLUMN_PARENTID_TITLEID_VERIFIED_PARENTID_2); + + query.append(_FINDER_COLUMN_PARENTID_TITLEID_VERIFIED_TITLEID_2); + + query.append(_FINDER_COLUMN_PARENTID_TITLEID_VERIFIED_VERIFIED_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(CommentModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(parentId); + + qPos.add(titleId); + + qPos.add(verified); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(comment); + + for (Object value : values) { + qPos.add(value); + } + } + + List<Comment> list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the comments where parentId = ? and titleId = ? and verified = ? from the database. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @throws SystemException if a system exception occurred + */ + @Override + public void removeByParentId_TitleId_Verified(long parentId, long titleId, + boolean verified) throws SystemException { + for (Comment comment : findByParentId_TitleId_Verified(parentId, + titleId, verified, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(comment); + } + } + + /** + * Returns the number of comments where parentId = ? and titleId = ? and verified = ?. + * + * @param parentId the parent ID + * @param titleId the title ID + * @param verified the verified + * @return the number of matching comments + * @throws SystemException if a system exception occurred + */ + @Override + public int countByParentId_TitleId_Verified(long parentId, long titleId, + boolean verified) throws SystemException { + FinderPath finderPath = FINDER_PATH_COUNT_BY_PARENTID_TITLEID_VERIFIED; + + Object[] finderArgs = new Object[] { parentId, titleId, verified }; + + Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, + this); + + if (count == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_COUNT_COMMENT_WHERE); + + query.append(_FINDER_COLUMN_PARENTID_TITLEID_VERIFIED_PARENTID_2); + + query.append(_FINDER_COLUMN_PARENTID_TITLEID_VERIFIED_TITLEID_2); + + query.append(_FINDER_COLUMN_PARENTID_TITLEID_VERIFIED_VERIFIED_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(parentId); + + qPos.add(titleId); + + qPos.add(verified); + + count = (Long)q.uniqueResult(); + + FinderCacheUtil.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_PARENTID_TITLEID_VERIFIED_PARENTID_2 = + "comment.parentId = ? AND "; + private static final String _FINDER_COLUMN_PARENTID_TITLEID_VERIFIED_TITLEID_2 = + "comment.titleId = ? AND "; + private static final String _FINDER_COLUMN_PARENTID_TITLEID_VERIFIED_VERIFIED_2 = + "comment.verified = ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_TITLEID_VIRIFIED = + new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentModelImpl.FINDER_CACHE_ENABLED, CommentImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByTitleId_Virified", + new String[] { + Long.class.getName(), Boolean.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID_VIRIFIED = + new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentModelImpl.FINDER_CACHE_ENABLED, CommentImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "findByTitleId_Virified", + new String[] { Long.class.getName(), Boolean.class.getName() }, + CommentModelImpl.TITLEID_COLUMN_BITMASK | + CommentModelImpl.VERIFIED_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_TITLEID_VIRIFIED = new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByTitleId_Virified", + new String[] { Long.class.getName(), Boolean.class.getName() }); + + /** + * Returns all the comments where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @return the matching comments + * @throws SystemException if a system exception occurred + */ + @Override + public List<Comment> findByTitleId_Virified(long titleId, boolean verified) + throws SystemException { + return findByTitleId_Virified(titleId, verified, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the comments where titleId = ? and verified = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param verified the verified + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of matching comments + * @throws SystemException if a system exception occurred + */ + @Override + public List<Comment> findByTitleId_Virified(long titleId, boolean verified, + int start, int end) throws SystemException { + return findByTitleId_Virified(titleId, verified, start, end, null); + } + + /** + * Returns an ordered range of all the comments where titleId = ? and verified = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param verified the verified + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching comments + * @throws SystemException if a system exception occurred + */ + @Override + public List<Comment> findByTitleId_Virified(long titleId, boolean verified, + int start, int end, OrderByComparator orderByComparator) + throws SystemException { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID_VIRIFIED; + finderArgs = new Object[] { titleId, verified }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_TITLEID_VIRIFIED; + finderArgs = new Object[] { + titleId, verified, + + start, end, orderByComparator + }; + } + + List<Comment> list = (List<Comment>)FinderCacheUtil.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (Comment comment : list) { + if ((titleId != comment.getTitleId()) || + (verified != comment.getVerified())) { + list = null; + + break; + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_COMMENT_WHERE); + + query.append(_FINDER_COLUMN_TITLEID_VIRIFIED_TITLEID_2); + + query.append(_FINDER_COLUMN_TITLEID_VIRIFIED_VERIFIED_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(CommentModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(titleId); + + qPos.add(verified); + + if (!pagination) { + list = (List<Comment>)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = new UnmodifiableList<Comment>(list); + } + else { + list = (List<Comment>)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + FinderCacheUtil.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first comment in the ordered set where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment findByTitleId_Virified_First(long titleId, boolean verified, + OrderByComparator orderByComparator) + throws NoSuchCommentException, SystemException { + Comment comment = fetchByTitleId_Virified_First(titleId, verified, + orderByComparator); + + if (comment != null) { + return comment; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("titleId="); + msg.append(titleId); + + msg.append(", verified="); + msg.append(verified); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + throw new NoSuchCommentException(msg.toString()); + } + + /** + * Returns the first comment in the ordered set where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment fetchByTitleId_Virified_First(long titleId, + boolean verified, OrderByComparator orderByComparator) + throws SystemException { + List<Comment> list = findByTitleId_Virified(titleId, verified, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last comment in the ordered set where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment findByTitleId_Virified_Last(long titleId, boolean verified, + OrderByComparator orderByComparator) + throws NoSuchCommentException, SystemException { + Comment comment = fetchByTitleId_Virified_Last(titleId, verified, + orderByComparator); + + if (comment != null) { + return comment; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("titleId="); + msg.append(titleId); + + msg.append(", verified="); + msg.append(verified); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + throw new NoSuchCommentException(msg.toString()); + } + + /** + * Returns the last comment in the ordered set where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment fetchByTitleId_Virified_Last(long titleId, boolean verified, + OrderByComparator orderByComparator) throws SystemException { + int count = countByTitleId_Virified(titleId, verified); + + if (count == 0) { + return null; + } + + List<Comment> list = findByTitleId_Virified(titleId, verified, + count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the comments before and after the current comment in the ordered set where titleId = ? and verified = ?. + * + * @param commentId the primary key of the current comment + * @param titleId the title ID + * @param verified the verified + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment[] findByTitleId_Virified_PrevAndNext(long commentId, + long titleId, boolean verified, OrderByComparator orderByComparator) + throws NoSuchCommentException, SystemException { + Comment comment = findByPrimaryKey(commentId); + + Session session = null; + + try { + session = openSession(); + + Comment[] array = new CommentImpl[3]; + + array[0] = getByTitleId_Virified_PrevAndNext(session, comment, + titleId, verified, orderByComparator, true); + + array[1] = comment; + + array[2] = getByTitleId_Virified_PrevAndNext(session, comment, + titleId, verified, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected Comment getByTitleId_Virified_PrevAndNext(Session session, + Comment comment, long titleId, boolean verified, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByFields().length * 6)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_COMMENT_WHERE); + + query.append(_FINDER_COLUMN_TITLEID_VIRIFIED_TITLEID_2); + + query.append(_FINDER_COLUMN_TITLEID_VIRIFIED_VERIFIED_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(CommentModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(titleId); + + qPos.add(verified); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(comment); + + for (Object value : values) { + qPos.add(value); + } + } + + List<Comment> list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the comments where titleId = ? and verified = ? from the database. + * + * @param titleId the title ID + * @param verified the verified + * @throws SystemException if a system exception occurred + */ + @Override + public void removeByTitleId_Virified(long titleId, boolean verified) + throws SystemException { + for (Comment comment : findByTitleId_Virified(titleId, verified, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(comment); + } + } + + /** + * Returns the number of comments where titleId = ? and verified = ?. + * + * @param titleId the title ID + * @param verified the verified + * @return the number of matching comments + * @throws SystemException if a system exception occurred + */ + @Override + public int countByTitleId_Virified(long titleId, boolean verified) + throws SystemException { + FinderPath finderPath = FINDER_PATH_COUNT_BY_TITLEID_VIRIFIED; + + Object[] finderArgs = new Object[] { titleId, verified }; + + Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, + this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_COMMENT_WHERE); + + query.append(_FINDER_COLUMN_TITLEID_VIRIFIED_TITLEID_2); + + query.append(_FINDER_COLUMN_TITLEID_VIRIFIED_VERIFIED_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(titleId); + + qPos.add(verified); + + count = (Long)q.uniqueResult(); + + FinderCacheUtil.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_TITLEID_VIRIFIED_TITLEID_2 = "comment.titleId = ? AND "; + private static final String _FINDER_COLUMN_TITLEID_VIRIFIED_VERIFIED_2 = "comment.verified = ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_TITLEID = new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentModelImpl.FINDER_CACHE_ENABLED, CommentImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByTitleId", + new String[] { + Long.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID = + new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentModelImpl.FINDER_CACHE_ENABLED, CommentImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByTitleId", + new String[] { Long.class.getName() }, + CommentModelImpl.TITLEID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_TITLEID = new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByTitleId", + new String[] { Long.class.getName() }); + + /** + * Returns all the comments where titleId = ?. + * + * @param titleId the title ID + * @return the matching comments + * @throws SystemException if a system exception occurred + */ + @Override + public List<Comment> findByTitleId(long titleId) throws SystemException { + return findByTitleId(titleId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the comments where titleId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of matching comments + * @throws SystemException if a system exception occurred + */ + @Override + public List<Comment> findByTitleId(long titleId, int start, int end) + throws SystemException { + return findByTitleId(titleId, start, end, null); + } + + /** + * Returns an ordered range of all the comments where titleId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching comments + * @throws SystemException if a system exception occurred + */ + @Override + public List<Comment> findByTitleId(long titleId, int start, int end, + OrderByComparator orderByComparator) throws SystemException { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID; + finderArgs = new Object[] { titleId }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_TITLEID; + finderArgs = new Object[] { titleId, start, end, orderByComparator }; + } + + List<Comment> list = (List<Comment>)FinderCacheUtil.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (Comment comment : list) { + if ((titleId != comment.getTitleId())) { + list = null; + + break; + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(3 + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_COMMENT_WHERE); + + query.append(_FINDER_COLUMN_TITLEID_TITLEID_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(CommentModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(titleId); + + if (!pagination) { + list = (List<Comment>)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = new UnmodifiableList<Comment>(list); + } + else { + list = (List<Comment>)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + FinderCacheUtil.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first comment in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment findByTitleId_First(long titleId, + OrderByComparator orderByComparator) + throws NoSuchCommentException, SystemException { + Comment comment = fetchByTitleId_First(titleId, orderByComparator); + + if (comment != null) { + return comment; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("titleId="); + msg.append(titleId); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + throw new NoSuchCommentException(msg.toString()); + } + + /** + * Returns the first comment in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment fetchByTitleId_First(long titleId, + OrderByComparator orderByComparator) throws SystemException { + List<Comment> list = findByTitleId(titleId, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last comment in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment findByTitleId_Last(long titleId, + OrderByComparator orderByComparator) + throws NoSuchCommentException, SystemException { + Comment comment = fetchByTitleId_Last(titleId, orderByComparator); + + if (comment != null) { + return comment; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("titleId="); + msg.append(titleId); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + throw new NoSuchCommentException(msg.toString()); + } + + /** + * Returns the last comment in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching comment, or <code>null</code> if a matching comment could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment fetchByTitleId_Last(long titleId, + OrderByComparator orderByComparator) throws SystemException { + int count = countByTitleId(titleId); + + if (count == 0) { + return null; + } + + List<Comment> list = findByTitleId(titleId, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the comments before and after the current comment in the ordered set where titleId = ?. + * + * @param commentId the primary key of the current comment + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment[] findByTitleId_PrevAndNext(long commentId, long titleId, + OrderByComparator orderByComparator) + throws NoSuchCommentException, SystemException { + Comment comment = findByPrimaryKey(commentId); + + Session session = null; + + try { + session = openSession(); + + Comment[] array = new CommentImpl[3]; + + array[0] = getByTitleId_PrevAndNext(session, comment, titleId, + orderByComparator, true); + + array[1] = comment; + + array[2] = getByTitleId_PrevAndNext(session, comment, titleId, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected Comment getByTitleId_PrevAndNext(Session session, + Comment comment, long titleId, OrderByComparator orderByComparator, + boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByFields().length * 6)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_COMMENT_WHERE); + + query.append(_FINDER_COLUMN_TITLEID_TITLEID_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(CommentModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(titleId); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(comment); + + for (Object value : values) { + qPos.add(value); + } + } + + List<Comment> list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the comments where titleId = ? from the database. + * + * @param titleId the title ID + * @throws SystemException if a system exception occurred + */ + @Override + public void removeByTitleId(long titleId) throws SystemException { + for (Comment comment : findByTitleId(titleId, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(comment); + } + } + + /** + * Returns the number of comments where titleId = ?. + * + * @param titleId the title ID + * @return the number of matching comments + * @throws SystemException if a system exception occurred + */ + @Override + public int countByTitleId(long titleId) throws SystemException { + FinderPath finderPath = FINDER_PATH_COUNT_BY_TITLEID; + + Object[] finderArgs = new Object[] { titleId }; + + Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, + this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_COMMENT_WHERE); + + query.append(_FINDER_COLUMN_TITLEID_TITLEID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(titleId); + + count = (Long)q.uniqueResult(); + + FinderCacheUtil.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_TITLEID_TITLEID_2 = "comment.titleId = ?"; + + public CommentPersistenceImpl() { + setModelClass(Comment.class); + } + + /** + * Caches the comment in the entity cache if it is enabled. + * + * @param comment the comment + */ + @Override + public void cacheResult(Comment comment) { + EntityCacheUtil.putResult(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentImpl.class, comment.getPrimaryKey(), comment); + + comment.resetOriginalValues(); + } + + /** + * Caches the comments in the entity cache if it is enabled. + * + * @param comments the comments + */ + @Override + public void cacheResult(List<Comment> comments) { + for (Comment comment : comments) { + if (EntityCacheUtil.getResult( + CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentImpl.class, comment.getPrimaryKey()) == null) { + cacheResult(comment); + } + else { + comment.resetOriginalValues(); + } + } + } + + /** + * Clears the cache for all comments. + * + * <p> + * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. + * </p> + */ + @Override + public void clearCache() { + if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { + CacheRegistryUtil.clear(CommentImpl.class.getName()); + } + + EntityCacheUtil.clearCache(CommentImpl.class.getName()); + + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + /** + * Clears the cache for the comment. + * + * <p> + * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. + * </p> + */ + @Override + public void clearCache(Comment comment) { + EntityCacheUtil.removeResult(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentImpl.class, comment.getPrimaryKey()); + + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + @Override + public void clearCache(List<Comment> comments) { + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + for (Comment comment : comments) { + EntityCacheUtil.removeResult(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentImpl.class, comment.getPrimaryKey()); + } + } + + /** + * Creates a new comment with the primary key. Does not add the comment to the database. + * + * @param commentId the primary key for the new comment + * @return the new comment + */ + @Override + public Comment create(long commentId) { + Comment comment = new CommentImpl(); + + comment.setNew(true); + comment.setPrimaryKey(commentId); + + return comment; + } + + /** + * Removes the comment with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param commentId the primary key of the comment + * @return the comment that was removed + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment remove(long commentId) + throws NoSuchCommentException, SystemException { + return remove((Serializable)commentId); + } + + /** + * Removes the comment with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param primaryKey the primary key of the comment + * @return the comment that was removed + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment remove(Serializable primaryKey) + throws NoSuchCommentException, SystemException { + Session session = null; + + try { + session = openSession(); + + Comment comment = (Comment)session.get(CommentImpl.class, primaryKey); + + if (comment == null) { + if (_log.isWarnEnabled()) { + _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchCommentException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return remove(comment); + } + catch (NoSuchCommentException nsee) { + throw nsee; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + @Override + protected Comment removeImpl(Comment comment) throws SystemException { + comment = toUnwrappedModel(comment); + + Session session = null; + + try { + session = openSession(); + + if (!session.contains(comment)) { + comment = (Comment)session.get(CommentImpl.class, + comment.getPrimaryKeyObj()); + } + + if (comment != null) { + session.delete(comment); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + if (comment != null) { + clearCache(comment); + } + + return comment; + } + + @Override + public Comment updateImpl( + ir.ac.iut.sccportal.guestdiscussion.model.Comment comment) + throws SystemException { + comment = toUnwrappedModel(comment); + + boolean isNew = comment.isNew(); + + CommentModelImpl commentModelImpl = (CommentModelImpl)comment; + + Session session = null; + + try { + session = openSession(); + + if (comment.isNew()) { + session.save(comment); + + comment.setNew(false); + } + else { + session.merge(comment); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + + if (isNew || !CommentModelImpl.COLUMN_BITMASK_ENABLED) { + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + else { + if ((commentModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PARENTID_TITLEID_VERIFIED.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + commentModelImpl.getOriginalParentId(), + commentModelImpl.getOriginalTitleId(), + commentModelImpl.getOriginalVerified() + }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PARENTID_TITLEID_VERIFIED, + args); + FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PARENTID_TITLEID_VERIFIED, + args); + + args = new Object[] { + commentModelImpl.getParentId(), + commentModelImpl.getTitleId(), + commentModelImpl.getVerified() + }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PARENTID_TITLEID_VERIFIED, + args); + FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PARENTID_TITLEID_VERIFIED, + args); + } + + if ((commentModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID_VIRIFIED.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + commentModelImpl.getOriginalTitleId(), + commentModelImpl.getOriginalVerified() + }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_TITLEID_VIRIFIED, + args); + FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID_VIRIFIED, + args); + + args = new Object[] { + commentModelImpl.getTitleId(), + commentModelImpl.getVerified() + }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_TITLEID_VIRIFIED, + args); + FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID_VIRIFIED, + args); + } + + if ((commentModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + commentModelImpl.getOriginalTitleId() + }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_TITLEID, args); + FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID, + args); + + args = new Object[] { commentModelImpl.getTitleId() }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_TITLEID, args); + FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID, + args); + } + } + + EntityCacheUtil.putResult(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentImpl.class, comment.getPrimaryKey(), comment); + + return comment; + } + + protected Comment toUnwrappedModel(Comment comment) { + if (comment instanceof CommentImpl) { + return comment; + } + + CommentImpl commentImpl = new CommentImpl(); + + commentImpl.setNew(comment.isNew()); + commentImpl.setPrimaryKey(comment.getPrimaryKey()); + + commentImpl.setCommentId(comment.getCommentId()); + commentImpl.setGroupId(comment.getGroupId()); + commentImpl.setCompanyId(comment.getCompanyId()); + commentImpl.setModifiedDate(comment.getModifiedDate()); + commentImpl.setParentId(comment.getParentId()); + commentImpl.setParentName(comment.getParentName()); + commentImpl.setCommentText(comment.getCommentText()); + commentImpl.setGuestName(comment.getGuestName()); + commentImpl.setGuestEmailAddress(comment.getGuestEmailAddress()); + commentImpl.setGuestEmailNotification(comment.isGuestEmailNotification()); + commentImpl.setLikeCount(comment.getLikeCount()); + commentImpl.setDislikeCount(comment.getDislikeCount()); + commentImpl.setTitleId(comment.getTitleId()); + commentImpl.setVerified(comment.isVerified()); + commentImpl.setHasAnswer(comment.isHasAnswer()); + + return commentImpl; + } + + /** + * Returns the comment with the primary key or throws a {@link com.liferay.portal.NoSuchModelException} if it could not be found. + * + * @param primaryKey the primary key of the comment + * @return the comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment findByPrimaryKey(Serializable primaryKey) + throws NoSuchCommentException, SystemException { + Comment comment = fetchByPrimaryKey(primaryKey); + + if (comment == null) { + if (_log.isWarnEnabled()) { + _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchCommentException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return comment; + } + + /** + * Returns the comment with the primary key or throws a {@link ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException} if it could not be found. + * + * @param commentId the primary key of the comment + * @return the comment + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment findByPrimaryKey(long commentId) + throws NoSuchCommentException, SystemException { + return findByPrimaryKey((Serializable)commentId); + } + + /** + * Returns the comment with the primary key or returns <code>null</code> if it could not be found. + * + * @param primaryKey the primary key of the comment + * @return the comment, or <code>null</code> if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment fetchByPrimaryKey(Serializable primaryKey) + throws SystemException { + Comment comment = (Comment)EntityCacheUtil.getResult(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentImpl.class, primaryKey); + + if (comment == _nullComment) { + return null; + } + + if (comment == null) { + Session session = null; + + try { + session = openSession(); + + comment = (Comment)session.get(CommentImpl.class, primaryKey); + + if (comment != null) { + cacheResult(comment); + } + else { + EntityCacheUtil.putResult(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentImpl.class, primaryKey, _nullComment); + } + } + catch (Exception e) { + EntityCacheUtil.removeResult(CommentModelImpl.ENTITY_CACHE_ENABLED, + CommentImpl.class, primaryKey); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return comment; + } + + /** + * Returns the comment with the primary key or returns <code>null</code> if it could not be found. + * + * @param commentId the primary key of the comment + * @return the comment, or <code>null</code> if a comment with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Comment fetchByPrimaryKey(long commentId) throws SystemException { + return fetchByPrimaryKey((Serializable)commentId); + } + + /** + * Returns all the comments. + * + * @return the comments + * @throws SystemException if a system exception occurred + */ + @Override + public List<Comment> findAll() throws SystemException { + return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the comments. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @return the range of comments + * @throws SystemException if a system exception occurred + */ + @Override + public List<Comment> findAll(int start, int end) throws SystemException { + return findAll(start, end, null); + } + + /** + * Returns an ordered range of all the comments. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of comments + * @param end the upper bound of the range of comments (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of comments + * @throws SystemException if a system exception occurred + */ + @Override + public List<Comment> findAll(int start, int end, + OrderByComparator orderByComparator) throws SystemException { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL; + finderArgs = FINDER_ARGS_EMPTY; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL; + finderArgs = new Object[] { start, end, orderByComparator }; + } + + List<Comment> list = (List<Comment>)FinderCacheUtil.getResult(finderPath, + finderArgs, this); + + if (list == null) { + StringBundler query = null; + String sql = null; + + if (orderByComparator != null) { + query = new StringBundler(2 + + (orderByComparator.getOrderByFields().length * 3)); + + query.append(_SQL_SELECT_COMMENT); + + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + + sql = query.toString(); + } + else { + sql = _SQL_SELECT_COMMENT; + + if (pagination) { + sql = sql.concat(CommentModelImpl.ORDER_BY_JPQL); + } + } + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + if (!pagination) { + list = (List<Comment>)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = new UnmodifiableList<Comment>(list); + } + else { + list = (List<Comment>)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + FinderCacheUtil.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Removes all the comments from the database. + * + * @throws SystemException if a system exception occurred + */ + @Override + public void removeAll() throws SystemException { + for (Comment comment : findAll()) { + remove(comment); + } + } + + /** + * Returns the number of comments. + * + * @return the number of comments + * @throws SystemException if a system exception occurred + */ + @Override + public int countAll() throws SystemException { + Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, this); + + if (count == null) { + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(_SQL_COUNT_COMMENT); + + count = (Long)q.uniqueResult(); + + FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, count); + } + catch (Exception e) { + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + /** + * Initializes the comment persistence. + */ + public void afterPropertiesSet() { + String[] listenerClassNames = StringUtil.split(GetterUtil.getString( + com.liferay.util.service.ServiceProps.get( + "value.object.listener.ir.ac.iut.sccportal.guestdiscussion.model.Comment"))); + + if (listenerClassNames.length > 0) { + try { + List<ModelListener<Comment>> listenersList = new ArrayList<ModelListener<Comment>>(); + + for (String listenerClassName : listenerClassNames) { + listenersList.add((ModelListener<Comment>)InstanceFactory.newInstance( + getClassLoader(), listenerClassName)); + } + + listeners = listenersList.toArray(new ModelListener[listenersList.size()]); + } + catch (Exception e) { + _log.error(e); + } + } + } + + public void destroy() { + EntityCacheUtil.removeCache(CommentImpl.class.getName()); + FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY); + FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + private static final String _SQL_SELECT_COMMENT = "SELECT comment FROM Comment comment"; + private static final String _SQL_SELECT_COMMENT_WHERE = "SELECT comment FROM Comment comment WHERE "; + private static final String _SQL_COUNT_COMMENT = "SELECT COUNT(comment) FROM Comment comment"; + private static final String _SQL_COUNT_COMMENT_WHERE = "SELECT COUNT(comment) FROM Comment comment WHERE "; + private static final String _ORDER_BY_ENTITY_ALIAS = "comment."; + private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No Comment exists with the primary key "; + private static final String _NO_SUCH_ENTITY_WITH_KEY = "No Comment exists with the key {"; + private static final boolean _HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE = GetterUtil.getBoolean(PropsUtil.get( + PropsKeys.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE)); + private static Log _log = LogFactoryUtil.getLog(CommentPersistenceImpl.class); + private static Comment _nullComment = new CommentImpl() { + @Override + public Object clone() { + return this; + } + + @Override + public CacheModel<Comment> toCacheModel() { + return _nullCommentCacheModel; + } + }; + + private static CacheModel<Comment> _nullCommentCacheModel = new CacheModel<Comment>() { + @Override + public Comment toEntityModel() { + return _nullComment; + } + }; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistenceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistenceImpl.java new file mode 100644 index 0000000..4a4dad2 --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/persistence/PortletTitlePersistenceImpl.java @@ -0,0 +1,1173 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.persistence; + +import com.liferay.portal.kernel.cache.CacheRegistryUtil; +import com.liferay.portal.kernel.dao.orm.EntityCacheUtil; +import com.liferay.portal.kernel.dao.orm.FinderCacheUtil; +import com.liferay.portal.kernel.dao.orm.FinderPath; +import com.liferay.portal.kernel.dao.orm.Query; +import com.liferay.portal.kernel.dao.orm.QueryPos; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.dao.orm.Session; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.InstanceFactory; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.PropsKeys; +import com.liferay.portal.kernel.util.PropsUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.kernel.util.UnmodifiableList; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.model.ModelListener; +import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; + +import ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException; +import ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle; +import ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleImpl; +import ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * The persistence implementation for the portlet title service. + * + * <p> + * Caching information and settings can be found in <code>portal.properties</code> + * </p> + * + * @author Alireza + * @see PortletTitlePersistence + * @see PortletTitleUtil + * @generated + */ +public class PortletTitlePersistenceImpl extends BasePersistenceImpl<PortletTitle> + implements PortletTitlePersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link PortletTitleUtil} to access the portlet title persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. + */ + public static final String FINDER_CLASS_NAME_ENTITY = PortletTitleImpl.class.getName(); + public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List1"; + public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List2"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(PortletTitleModelImpl.ENTITY_CACHE_ENABLED, + PortletTitleModelImpl.FINDER_CACHE_ENABLED, PortletTitleImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(PortletTitleModelImpl.ENTITY_CACHE_ENABLED, + PortletTitleModelImpl.FINDER_CACHE_ENABLED, PortletTitleImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(PortletTitleModelImpl.ENTITY_CACHE_ENABLED, + PortletTitleModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_TITLEID = new FinderPath(PortletTitleModelImpl.ENTITY_CACHE_ENABLED, + PortletTitleModelImpl.FINDER_CACHE_ENABLED, PortletTitleImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByTitleId", + new String[] { + Long.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID = + new FinderPath(PortletTitleModelImpl.ENTITY_CACHE_ENABLED, + PortletTitleModelImpl.FINDER_CACHE_ENABLED, PortletTitleImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByTitleId", + new String[] { Long.class.getName() }, + PortletTitleModelImpl.TITLEID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_TITLEID = new FinderPath(PortletTitleModelImpl.ENTITY_CACHE_ENABLED, + PortletTitleModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByTitleId", + new String[] { Long.class.getName() }); + + /** + * Returns all the portlet titles where titleId = ?. + * + * @param titleId the title ID + * @return the matching portlet titles + * @throws SystemException if a system exception occurred + */ + @Override + public List<PortletTitle> findByTitleId(long titleId) + throws SystemException { + return findByTitleId(titleId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the portlet titles where titleId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @return the range of matching portlet titles + * @throws SystemException if a system exception occurred + */ + @Override + public List<PortletTitle> findByTitleId(long titleId, int start, int end) + throws SystemException { + return findByTitleId(titleId, start, end, null); + } + + /** + * Returns an ordered range of all the portlet titles where titleId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param titleId the title ID + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching portlet titles + * @throws SystemException if a system exception occurred + */ + @Override + public List<PortletTitle> findByTitleId(long titleId, int start, int end, + OrderByComparator orderByComparator) throws SystemException { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID; + finderArgs = new Object[] { titleId }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_TITLEID; + finderArgs = new Object[] { titleId, start, end, orderByComparator }; + } + + List<PortletTitle> list = (List<PortletTitle>)FinderCacheUtil.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (PortletTitle portletTitle : list) { + if ((titleId != portletTitle.getTitleId())) { + list = null; + + break; + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(3 + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_PORTLETTITLE_WHERE); + + query.append(_FINDER_COLUMN_TITLEID_TITLEID_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(PortletTitleModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(titleId); + + if (!pagination) { + list = (List<PortletTitle>)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = new UnmodifiableList<PortletTitle>(list); + } + else { + list = (List<PortletTitle>)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + FinderCacheUtil.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first portlet title in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching portlet title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a matching portlet title could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public PortletTitle findByTitleId_First(long titleId, + OrderByComparator orderByComparator) + throws NoSuchPortletTitleException, SystemException { + PortletTitle portletTitle = fetchByTitleId_First(titleId, + orderByComparator); + + if (portletTitle != null) { + return portletTitle; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("titleId="); + msg.append(titleId); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + throw new NoSuchPortletTitleException(msg.toString()); + } + + /** + * Returns the first portlet title in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching portlet title, or <code>null</code> if a matching portlet title could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public PortletTitle fetchByTitleId_First(long titleId, + OrderByComparator orderByComparator) throws SystemException { + List<PortletTitle> list = findByTitleId(titleId, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last portlet title in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching portlet title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a matching portlet title could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public PortletTitle findByTitleId_Last(long titleId, + OrderByComparator orderByComparator) + throws NoSuchPortletTitleException, SystemException { + PortletTitle portletTitle = fetchByTitleId_Last(titleId, + orderByComparator); + + if (portletTitle != null) { + return portletTitle; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("titleId="); + msg.append(titleId); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + throw new NoSuchPortletTitleException(msg.toString()); + } + + /** + * Returns the last portlet title in the ordered set where titleId = ?. + * + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching portlet title, or <code>null</code> if a matching portlet title could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public PortletTitle fetchByTitleId_Last(long titleId, + OrderByComparator orderByComparator) throws SystemException { + int count = countByTitleId(titleId); + + if (count == 0) { + return null; + } + + List<PortletTitle> list = findByTitleId(titleId, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the portlet titles before and after the current portlet title in the ordered set where titleId = ?. + * + * @param portletId the primary key of the current portlet title + * @param titleId the title ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next portlet title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public PortletTitle[] findByTitleId_PrevAndNext(String portletId, + long titleId, OrderByComparator orderByComparator) + throws NoSuchPortletTitleException, SystemException { + PortletTitle portletTitle = findByPrimaryKey(portletId); + + Session session = null; + + try { + session = openSession(); + + PortletTitle[] array = new PortletTitleImpl[3]; + + array[0] = getByTitleId_PrevAndNext(session, portletTitle, titleId, + orderByComparator, true); + + array[1] = portletTitle; + + array[2] = getByTitleId_PrevAndNext(session, portletTitle, titleId, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected PortletTitle getByTitleId_PrevAndNext(Session session, + PortletTitle portletTitle, long titleId, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByFields().length * 6)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_PORTLETTITLE_WHERE); + + query.append(_FINDER_COLUMN_TITLEID_TITLEID_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(PortletTitleModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(titleId); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(portletTitle); + + for (Object value : values) { + qPos.add(value); + } + } + + List<PortletTitle> list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the portlet titles where titleId = ? from the database. + * + * @param titleId the title ID + * @throws SystemException if a system exception occurred + */ + @Override + public void removeByTitleId(long titleId) throws SystemException { + for (PortletTitle portletTitle : findByTitleId(titleId, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(portletTitle); + } + } + + /** + * Returns the number of portlet titles where titleId = ?. + * + * @param titleId the title ID + * @return the number of matching portlet titles + * @throws SystemException if a system exception occurred + */ + @Override + public int countByTitleId(long titleId) throws SystemException { + FinderPath finderPath = FINDER_PATH_COUNT_BY_TITLEID; + + Object[] finderArgs = new Object[] { titleId }; + + Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, + this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_PORTLETTITLE_WHERE); + + query.append(_FINDER_COLUMN_TITLEID_TITLEID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(titleId); + + count = (Long)q.uniqueResult(); + + FinderCacheUtil.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_TITLEID_TITLEID_2 = "portletTitle.titleId = ?"; + + public PortletTitlePersistenceImpl() { + setModelClass(PortletTitle.class); + } + + /** + * Caches the portlet title in the entity cache if it is enabled. + * + * @param portletTitle the portlet title + */ + @Override + public void cacheResult(PortletTitle portletTitle) { + EntityCacheUtil.putResult(PortletTitleModelImpl.ENTITY_CACHE_ENABLED, + PortletTitleImpl.class, portletTitle.getPrimaryKey(), portletTitle); + + portletTitle.resetOriginalValues(); + } + + /** + * Caches the portlet titles in the entity cache if it is enabled. + * + * @param portletTitles the portlet titles + */ + @Override + public void cacheResult(List<PortletTitle> portletTitles) { + for (PortletTitle portletTitle : portletTitles) { + if (EntityCacheUtil.getResult( + PortletTitleModelImpl.ENTITY_CACHE_ENABLED, + PortletTitleImpl.class, portletTitle.getPrimaryKey()) == null) { + cacheResult(portletTitle); + } + else { + portletTitle.resetOriginalValues(); + } + } + } + + /** + * Clears the cache for all portlet titles. + * + * <p> + * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. + * </p> + */ + @Override + public void clearCache() { + if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { + CacheRegistryUtil.clear(PortletTitleImpl.class.getName()); + } + + EntityCacheUtil.clearCache(PortletTitleImpl.class.getName()); + + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + /** + * Clears the cache for the portlet title. + * + * <p> + * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. + * </p> + */ + @Override + public void clearCache(PortletTitle portletTitle) { + EntityCacheUtil.removeResult(PortletTitleModelImpl.ENTITY_CACHE_ENABLED, + PortletTitleImpl.class, portletTitle.getPrimaryKey()); + + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + @Override + public void clearCache(List<PortletTitle> portletTitles) { + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + for (PortletTitle portletTitle : portletTitles) { + EntityCacheUtil.removeResult(PortletTitleModelImpl.ENTITY_CACHE_ENABLED, + PortletTitleImpl.class, portletTitle.getPrimaryKey()); + } + } + + /** + * Creates a new portlet title with the primary key. Does not add the portlet title to the database. + * + * @param portletId the primary key for the new portlet title + * @return the new portlet title + */ + @Override + public PortletTitle create(String portletId) { + PortletTitle portletTitle = new PortletTitleImpl(); + + portletTitle.setNew(true); + portletTitle.setPrimaryKey(portletId); + + return portletTitle; + } + + /** + * Removes the portlet title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param portletId the primary key of the portlet title + * @return the portlet title that was removed + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public PortletTitle remove(String portletId) + throws NoSuchPortletTitleException, SystemException { + return remove((Serializable)portletId); + } + + /** + * Removes the portlet title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param primaryKey the primary key of the portlet title + * @return the portlet title that was removed + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public PortletTitle remove(Serializable primaryKey) + throws NoSuchPortletTitleException, SystemException { + Session session = null; + + try { + session = openSession(); + + PortletTitle portletTitle = (PortletTitle)session.get(PortletTitleImpl.class, + primaryKey); + + if (portletTitle == null) { + if (_log.isWarnEnabled()) { + _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchPortletTitleException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return remove(portletTitle); + } + catch (NoSuchPortletTitleException nsee) { + throw nsee; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + @Override + protected PortletTitle removeImpl(PortletTitle portletTitle) + throws SystemException { + portletTitle = toUnwrappedModel(portletTitle); + + Session session = null; + + try { + session = openSession(); + + if (!session.contains(portletTitle)) { + portletTitle = (PortletTitle)session.get(PortletTitleImpl.class, + portletTitle.getPrimaryKeyObj()); + } + + if (portletTitle != null) { + session.delete(portletTitle); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + if (portletTitle != null) { + clearCache(portletTitle); + } + + return portletTitle; + } + + @Override + public PortletTitle updateImpl( + ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle portletTitle) + throws SystemException { + portletTitle = toUnwrappedModel(portletTitle); + + boolean isNew = portletTitle.isNew(); + + PortletTitleModelImpl portletTitleModelImpl = (PortletTitleModelImpl)portletTitle; + + Session session = null; + + try { + session = openSession(); + + if (portletTitle.isNew()) { + session.save(portletTitle); + + portletTitle.setNew(false); + } + else { + session.merge(portletTitle); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + + if (isNew || !PortletTitleModelImpl.COLUMN_BITMASK_ENABLED) { + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + else { + if ((portletTitleModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + portletTitleModelImpl.getOriginalTitleId() + }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_TITLEID, args); + FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID, + args); + + args = new Object[] { portletTitleModelImpl.getTitleId() }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_TITLEID, args); + FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TITLEID, + args); + } + } + + EntityCacheUtil.putResult(PortletTitleModelImpl.ENTITY_CACHE_ENABLED, + PortletTitleImpl.class, portletTitle.getPrimaryKey(), portletTitle); + + return portletTitle; + } + + protected PortletTitle toUnwrappedModel(PortletTitle portletTitle) { + if (portletTitle instanceof PortletTitleImpl) { + return portletTitle; + } + + PortletTitleImpl portletTitleImpl = new PortletTitleImpl(); + + portletTitleImpl.setNew(portletTitle.isNew()); + portletTitleImpl.setPrimaryKey(portletTitle.getPrimaryKey()); + + portletTitleImpl.setPortletId(portletTitle.getPortletId()); + portletTitleImpl.setTitleId(portletTitle.getTitleId()); + + return portletTitleImpl; + } + + /** + * Returns the portlet title with the primary key or throws a {@link com.liferay.portal.NoSuchModelException} if it could not be found. + * + * @param primaryKey the primary key of the portlet title + * @return the portlet title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public PortletTitle findByPrimaryKey(Serializable primaryKey) + throws NoSuchPortletTitleException, SystemException { + PortletTitle portletTitle = fetchByPrimaryKey(primaryKey); + + if (portletTitle == null) { + if (_log.isWarnEnabled()) { + _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchPortletTitleException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return portletTitle; + } + + /** + * Returns the portlet title with the primary key or throws a {@link ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException} if it could not be found. + * + * @param portletId the primary key of the portlet title + * @return the portlet title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchPortletTitleException if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public PortletTitle findByPrimaryKey(String portletId) + throws NoSuchPortletTitleException, SystemException { + return findByPrimaryKey((Serializable)portletId); + } + + /** + * Returns the portlet title with the primary key or returns <code>null</code> if it could not be found. + * + * @param primaryKey the primary key of the portlet title + * @return the portlet title, or <code>null</code> if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public PortletTitle fetchByPrimaryKey(Serializable primaryKey) + throws SystemException { + PortletTitle portletTitle = (PortletTitle)EntityCacheUtil.getResult(PortletTitleModelImpl.ENTITY_CACHE_ENABLED, + PortletTitleImpl.class, primaryKey); + + if (portletTitle == _nullPortletTitle) { + return null; + } + + if (portletTitle == null) { + Session session = null; + + try { + session = openSession(); + + portletTitle = (PortletTitle)session.get(PortletTitleImpl.class, + primaryKey); + + if (portletTitle != null) { + cacheResult(portletTitle); + } + else { + EntityCacheUtil.putResult(PortletTitleModelImpl.ENTITY_CACHE_ENABLED, + PortletTitleImpl.class, primaryKey, _nullPortletTitle); + } + } + catch (Exception e) { + EntityCacheUtil.removeResult(PortletTitleModelImpl.ENTITY_CACHE_ENABLED, + PortletTitleImpl.class, primaryKey); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return portletTitle; + } + + /** + * Returns the portlet title with the primary key or returns <code>null</code> if it could not be found. + * + * @param portletId the primary key of the portlet title + * @return the portlet title, or <code>null</code> if a portlet title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public PortletTitle fetchByPrimaryKey(String portletId) + throws SystemException { + return fetchByPrimaryKey((Serializable)portletId); + } + + /** + * Returns all the portlet titles. + * + * @return the portlet titles + * @throws SystemException if a system exception occurred + */ + @Override + public List<PortletTitle> findAll() throws SystemException { + return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the portlet titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @return the range of portlet titles + * @throws SystemException if a system exception occurred + */ + @Override + public List<PortletTitle> findAll(int start, int end) + throws SystemException { + return findAll(start, end, null); + } + + /** + * Returns an ordered range of all the portlet titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.PortletTitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of portlet titles + * @param end the upper bound of the range of portlet titles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of portlet titles + * @throws SystemException if a system exception occurred + */ + @Override + public List<PortletTitle> findAll(int start, int end, + OrderByComparator orderByComparator) throws SystemException { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL; + finderArgs = FINDER_ARGS_EMPTY; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL; + finderArgs = new Object[] { start, end, orderByComparator }; + } + + List<PortletTitle> list = (List<PortletTitle>)FinderCacheUtil.getResult(finderPath, + finderArgs, this); + + if (list == null) { + StringBundler query = null; + String sql = null; + + if (orderByComparator != null) { + query = new StringBundler(2 + + (orderByComparator.getOrderByFields().length * 3)); + + query.append(_SQL_SELECT_PORTLETTITLE); + + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + + sql = query.toString(); + } + else { + sql = _SQL_SELECT_PORTLETTITLE; + + if (pagination) { + sql = sql.concat(PortletTitleModelImpl.ORDER_BY_JPQL); + } + } + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + if (!pagination) { + list = (List<PortletTitle>)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = new UnmodifiableList<PortletTitle>(list); + } + else { + list = (List<PortletTitle>)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + FinderCacheUtil.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Removes all the portlet titles from the database. + * + * @throws SystemException if a system exception occurred + */ + @Override + public void removeAll() throws SystemException { + for (PortletTitle portletTitle : findAll()) { + remove(portletTitle); + } + } + + /** + * Returns the number of portlet titles. + * + * @return the number of portlet titles + * @throws SystemException if a system exception occurred + */ + @Override + public int countAll() throws SystemException { + Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, this); + + if (count == null) { + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(_SQL_COUNT_PORTLETTITLE); + + count = (Long)q.uniqueResult(); + + FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, count); + } + catch (Exception e) { + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + /** + * Initializes the portlet title persistence. + */ + public void afterPropertiesSet() { + String[] listenerClassNames = StringUtil.split(GetterUtil.getString( + com.liferay.util.service.ServiceProps.get( + "value.object.listener.ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle"))); + + if (listenerClassNames.length > 0) { + try { + List<ModelListener<PortletTitle>> listenersList = new ArrayList<ModelListener<PortletTitle>>(); + + for (String listenerClassName : listenerClassNames) { + listenersList.add((ModelListener<PortletTitle>)InstanceFactory.newInstance( + getClassLoader(), listenerClassName)); + } + + listeners = listenersList.toArray(new ModelListener[listenersList.size()]); + } + catch (Exception e) { + _log.error(e); + } + } + } + + public void destroy() { + EntityCacheUtil.removeCache(PortletTitleImpl.class.getName()); + FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY); + FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + private static final String _SQL_SELECT_PORTLETTITLE = "SELECT portletTitle FROM PortletTitle portletTitle"; + private static final String _SQL_SELECT_PORTLETTITLE_WHERE = "SELECT portletTitle FROM PortletTitle portletTitle WHERE "; + private static final String _SQL_COUNT_PORTLETTITLE = "SELECT COUNT(portletTitle) FROM PortletTitle portletTitle"; + private static final String _SQL_COUNT_PORTLETTITLE_WHERE = "SELECT COUNT(portletTitle) FROM PortletTitle portletTitle WHERE "; + private static final String _ORDER_BY_ENTITY_ALIAS = "portletTitle."; + private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No PortletTitle exists with the primary key "; + private static final String _NO_SUCH_ENTITY_WITH_KEY = "No PortletTitle exists with the key {"; + private static final boolean _HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE = GetterUtil.getBoolean(PropsUtil.get( + PropsKeys.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE)); + private static Log _log = LogFactoryUtil.getLog(PortletTitlePersistenceImpl.class); + private static PortletTitle _nullPortletTitle = new PortletTitleImpl() { + @Override + public Object clone() { + return this; + } + + @Override + public CacheModel<PortletTitle> toCacheModel() { + return _nullPortletTitleCacheModel; + } + }; + + private static CacheModel<PortletTitle> _nullPortletTitleCacheModel = new CacheModel<PortletTitle>() { + @Override + public PortletTitle toEntityModel() { + return _nullPortletTitle; + } + }; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistenceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistenceImpl.java new file mode 100644 index 0000000..a3888af --- /dev/null +++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/persistence/TitlePersistenceImpl.java @@ -0,0 +1,1175 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package ir.ac.iut.sccportal.guestdiscussion.service.persistence; + +import com.liferay.portal.kernel.cache.CacheRegistryUtil; +import com.liferay.portal.kernel.dao.orm.EntityCacheUtil; +import com.liferay.portal.kernel.dao.orm.FinderCacheUtil; +import com.liferay.portal.kernel.dao.orm.FinderPath; +import com.liferay.portal.kernel.dao.orm.Query; +import com.liferay.portal.kernel.dao.orm.QueryPos; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.dao.orm.Session; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.InstanceFactory; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.PropsKeys; +import com.liferay.portal.kernel.util.PropsUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.kernel.util.UnmodifiableList; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.model.ModelListener; +import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; + +import ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException; +import ir.ac.iut.sccportal.guestdiscussion.model.Title; +import ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleImpl; +import ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * The persistence implementation for the title service. + * + * <p> + * Caching information and settings can be found in <code>portal.properties</code> + * </p> + * + * @author Alireza + * @see TitlePersistence + * @see TitleUtil + * @generated + */ +public class TitlePersistenceImpl extends BasePersistenceImpl<Title> + implements TitlePersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link TitleUtil} to access the title persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. + */ + public static final String FINDER_CLASS_NAME_ENTITY = TitleImpl.class.getName(); + public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List1"; + public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List2"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(TitleModelImpl.ENTITY_CACHE_ENABLED, + TitleModelImpl.FINDER_CACHE_ENABLED, TitleImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(TitleModelImpl.ENTITY_CACHE_ENABLED, + TitleModelImpl.FINDER_CACHE_ENABLED, TitleImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(TitleModelImpl.ENTITY_CACHE_ENABLED, + TitleModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_COMPANYID = + new FinderPath(TitleModelImpl.ENTITY_CACHE_ENABLED, + TitleModelImpl.FINDER_CACHE_ENABLED, TitleImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByCompanyId", + new String[] { + Long.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID = + new FinderPath(TitleModelImpl.ENTITY_CACHE_ENABLED, + TitleModelImpl.FINDER_CACHE_ENABLED, TitleImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByCompanyId", + new String[] { Long.class.getName() }, + TitleModelImpl.COMPANYID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_COMPANYID = new FinderPath(TitleModelImpl.ENTITY_CACHE_ENABLED, + TitleModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByCompanyId", + new String[] { Long.class.getName() }); + + /** + * Returns all the titles where companyId = ?. + * + * @param companyId the company ID + * @return the matching titles + * @throws SystemException if a system exception occurred + */ + @Override + public List<Title> findByCompanyId(long companyId) + throws SystemException { + return findByCompanyId(companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, + null); + } + + /** + * Returns a range of all the titles where companyId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param companyId the company ID + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @return the range of matching titles + * @throws SystemException if a system exception occurred + */ + @Override + public List<Title> findByCompanyId(long companyId, int start, int end) + throws SystemException { + return findByCompanyId(companyId, start, end, null); + } + + /** + * Returns an ordered range of all the titles where companyId = ?. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param companyId the company ID + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of matching titles + * @throws SystemException if a system exception occurred + */ + @Override + public List<Title> findByCompanyId(long companyId, int start, int end, + OrderByComparator orderByComparator) throws SystemException { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID; + finderArgs = new Object[] { companyId }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_COMPANYID; + finderArgs = new Object[] { companyId, start, end, orderByComparator }; + } + + List<Title> list = (List<Title>)FinderCacheUtil.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (Title title : list) { + if ((companyId != title.getCompanyId())) { + list = null; + + break; + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(3 + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_TITLE_WHERE); + + query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(TitleModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(companyId); + + if (!pagination) { + list = (List<Title>)QueryUtil.list(q, getDialect(), start, + end, false); + + Collections.sort(list); + + list = new UnmodifiableList<Title>(list); + } + else { + list = (List<Title>)QueryUtil.list(q, getDialect(), start, + end); + } + + cacheResult(list); + + FinderCacheUtil.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first title in the ordered set where companyId = ?. + * + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a matching title could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Title findByCompanyId_First(long companyId, + OrderByComparator orderByComparator) + throws NoSuchTitleException, SystemException { + Title title = fetchByCompanyId_First(companyId, orderByComparator); + + if (title != null) { + return title; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("companyId="); + msg.append(companyId); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + throw new NoSuchTitleException(msg.toString()); + } + + /** + * Returns the first title in the ordered set where companyId = ?. + * + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the first matching title, or <code>null</code> if a matching title could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Title fetchByCompanyId_First(long companyId, + OrderByComparator orderByComparator) throws SystemException { + List<Title> list = findByCompanyId(companyId, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last title in the ordered set where companyId = ?. + * + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a matching title could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Title findByCompanyId_Last(long companyId, + OrderByComparator orderByComparator) + throws NoSuchTitleException, SystemException { + Title title = fetchByCompanyId_Last(companyId, orderByComparator); + + if (title != null) { + return title; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("companyId="); + msg.append(companyId); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + throw new NoSuchTitleException(msg.toString()); + } + + /** + * Returns the last title in the ordered set where companyId = ?. + * + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the last matching title, or <code>null</code> if a matching title could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Title fetchByCompanyId_Last(long companyId, + OrderByComparator orderByComparator) throws SystemException { + int count = countByCompanyId(companyId); + + if (count == 0) { + return null; + } + + List<Title> list = findByCompanyId(companyId, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the titles before and after the current title in the ordered set where companyId = ?. + * + * @param titleId the primary key of the current title + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) + * @return the previous, current, and next title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Title[] findByCompanyId_PrevAndNext(long titleId, long companyId, + OrderByComparator orderByComparator) + throws NoSuchTitleException, SystemException { + Title title = findByPrimaryKey(titleId); + + Session session = null; + + try { + session = openSession(); + + Title[] array = new TitleImpl[3]; + + array[0] = getByCompanyId_PrevAndNext(session, title, companyId, + orderByComparator, true); + + array[1] = title; + + array[2] = getByCompanyId_PrevAndNext(session, title, companyId, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected Title getByCompanyId_PrevAndNext(Session session, Title title, + long companyId, OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByFields().length * 6)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_TITLE_WHERE); + + query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(TitleModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(companyId); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(title); + + for (Object value : values) { + qPos.add(value); + } + } + + List<Title> list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the titles where companyId = ? from the database. + * + * @param companyId the company ID + * @throws SystemException if a system exception occurred + */ + @Override + public void removeByCompanyId(long companyId) throws SystemException { + for (Title title : findByCompanyId(companyId, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(title); + } + } + + /** + * Returns the number of titles where companyId = ?. + * + * @param companyId the company ID + * @return the number of matching titles + * @throws SystemException if a system exception occurred + */ + @Override + public int countByCompanyId(long companyId) throws SystemException { + FinderPath finderPath = FINDER_PATH_COUNT_BY_COMPANYID; + + Object[] finderArgs = new Object[] { companyId }; + + Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, + this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_TITLE_WHERE); + + query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(companyId); + + count = (Long)q.uniqueResult(); + + FinderCacheUtil.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_COMPANYID_COMPANYID_2 = "title.companyId = ?"; + + public TitlePersistenceImpl() { + setModelClass(Title.class); + } + + /** + * Caches the title in the entity cache if it is enabled. + * + * @param title the title + */ + @Override + public void cacheResult(Title title) { + EntityCacheUtil.putResult(TitleModelImpl.ENTITY_CACHE_ENABLED, + TitleImpl.class, title.getPrimaryKey(), title); + + title.resetOriginalValues(); + } + + /** + * Caches the titles in the entity cache if it is enabled. + * + * @param titles the titles + */ + @Override + public void cacheResult(List<Title> titles) { + for (Title title : titles) { + if (EntityCacheUtil.getResult(TitleModelImpl.ENTITY_CACHE_ENABLED, + TitleImpl.class, title.getPrimaryKey()) == null) { + cacheResult(title); + } + else { + title.resetOriginalValues(); + } + } + } + + /** + * Clears the cache for all titles. + * + * <p> + * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. + * </p> + */ + @Override + public void clearCache() { + if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { + CacheRegistryUtil.clear(TitleImpl.class.getName()); + } + + EntityCacheUtil.clearCache(TitleImpl.class.getName()); + + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + /** + * Clears the cache for the title. + * + * <p> + * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. + * </p> + */ + @Override + public void clearCache(Title title) { + EntityCacheUtil.removeResult(TitleModelImpl.ENTITY_CACHE_ENABLED, + TitleImpl.class, title.getPrimaryKey()); + + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + @Override + public void clearCache(List<Title> titles) { + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + for (Title title : titles) { + EntityCacheUtil.removeResult(TitleModelImpl.ENTITY_CACHE_ENABLED, + TitleImpl.class, title.getPrimaryKey()); + } + } + + /** + * Creates a new title with the primary key. Does not add the title to the database. + * + * @param titleId the primary key for the new title + * @return the new title + */ + @Override + public Title create(long titleId) { + Title title = new TitleImpl(); + + title.setNew(true); + title.setPrimaryKey(titleId); + + return title; + } + + /** + * Removes the title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param titleId the primary key of the title + * @return the title that was removed + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Title remove(long titleId) + throws NoSuchTitleException, SystemException { + return remove((Serializable)titleId); + } + + /** + * Removes the title with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param primaryKey the primary key of the title + * @return the title that was removed + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Title remove(Serializable primaryKey) + throws NoSuchTitleException, SystemException { + Session session = null; + + try { + session = openSession(); + + Title title = (Title)session.get(TitleImpl.class, primaryKey); + + if (title == null) { + if (_log.isWarnEnabled()) { + _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchTitleException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return remove(title); + } + catch (NoSuchTitleException nsee) { + throw nsee; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + @Override + protected Title removeImpl(Title title) throws SystemException { + title = toUnwrappedModel(title); + + Session session = null; + + try { + session = openSession(); + + if (!session.contains(title)) { + title = (Title)session.get(TitleImpl.class, + title.getPrimaryKeyObj()); + } + + if (title != null) { + session.delete(title); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + if (title != null) { + clearCache(title); + } + + return title; + } + + @Override + public Title updateImpl( + ir.ac.iut.sccportal.guestdiscussion.model.Title title) + throws SystemException { + title = toUnwrappedModel(title); + + boolean isNew = title.isNew(); + + TitleModelImpl titleModelImpl = (TitleModelImpl)title; + + Session session = null; + + try { + session = openSession(); + + if (title.isNew()) { + session.save(title); + + title.setNew(false); + } + else { + session.merge(title); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + + if (isNew || !TitleModelImpl.COLUMN_BITMASK_ENABLED) { + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + else { + if ((titleModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + titleModelImpl.getOriginalCompanyId() + }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMPANYID, + args); + FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID, + args); + + args = new Object[] { titleModelImpl.getCompanyId() }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMPANYID, + args); + FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID, + args); + } + } + + EntityCacheUtil.putResult(TitleModelImpl.ENTITY_CACHE_ENABLED, + TitleImpl.class, title.getPrimaryKey(), title); + + return title; + } + + protected Title toUnwrappedModel(Title title) { + if (title instanceof TitleImpl) { + return title; + } + + TitleImpl titleImpl = new TitleImpl(); + + titleImpl.setNew(title.isNew()); + titleImpl.setPrimaryKey(title.getPrimaryKey()); + + titleImpl.setTitleId(title.getTitleId()); + titleImpl.setGroupId(title.getGroupId()); + titleImpl.setCompanyId(title.getCompanyId()); + titleImpl.setUserId(title.getUserId()); + titleImpl.setUserName(title.getUserName()); + titleImpl.setCreateDate(title.getCreateDate()); + titleImpl.setTitleText(title.getTitleText()); + titleImpl.setNewCommentDraft(title.getNewCommentDraft()); + titleImpl.setAnswerCommentDraft(title.getAnswerCommentDraft()); + + return titleImpl; + } + + /** + * Returns the title with the primary key or throws a {@link com.liferay.portal.NoSuchModelException} if it could not be found. + * + * @param primaryKey the primary key of the title + * @return the title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Title findByPrimaryKey(Serializable primaryKey) + throws NoSuchTitleException, SystemException { + Title title = fetchByPrimaryKey(primaryKey); + + if (title == null) { + if (_log.isWarnEnabled()) { + _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchTitleException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return title; + } + + /** + * Returns the title with the primary key or throws a {@link ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException} if it could not be found. + * + * @param titleId the primary key of the title + * @return the title + * @throws ir.ac.iut.sccportal.guestdiscussion.NoSuchTitleException if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Title findByPrimaryKey(long titleId) + throws NoSuchTitleException, SystemException { + return findByPrimaryKey((Serializable)titleId); + } + + /** + * Returns the title with the primary key or returns <code>null</code> if it could not be found. + * + * @param primaryKey the primary key of the title + * @return the title, or <code>null</code> if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Title fetchByPrimaryKey(Serializable primaryKey) + throws SystemException { + Title title = (Title)EntityCacheUtil.getResult(TitleModelImpl.ENTITY_CACHE_ENABLED, + TitleImpl.class, primaryKey); + + if (title == _nullTitle) { + return null; + } + + if (title == null) { + Session session = null; + + try { + session = openSession(); + + title = (Title)session.get(TitleImpl.class, primaryKey); + + if (title != null) { + cacheResult(title); + } + else { + EntityCacheUtil.putResult(TitleModelImpl.ENTITY_CACHE_ENABLED, + TitleImpl.class, primaryKey, _nullTitle); + } + } + catch (Exception e) { + EntityCacheUtil.removeResult(TitleModelImpl.ENTITY_CACHE_ENABLED, + TitleImpl.class, primaryKey); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return title; + } + + /** + * Returns the title with the primary key or returns <code>null</code> if it could not be found. + * + * @param titleId the primary key of the title + * @return the title, or <code>null</code> if a title with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Title fetchByPrimaryKey(long titleId) throws SystemException { + return fetchByPrimaryKey((Serializable)titleId); + } + + /** + * Returns all the titles. + * + * @return the titles + * @throws SystemException if a system exception occurred + */ + @Override + public List<Title> findAll() throws SystemException { + return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @return the range of titles + * @throws SystemException if a system exception occurred + */ + @Override + public List<Title> findAll(int start, int end) throws SystemException { + return findAll(start, end, null); + } + + /** + * Returns an ordered range of all the titles. + * + * <p> + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + * </p> + * + * @param start the lower bound of the range of titles + * @param end the upper bound of the range of titles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) + * @return the ordered range of titles + * @throws SystemException if a system exception occurred + */ + @Override + public List<Title> findAll(int start, int end, + OrderByComparator orderByComparator) throws SystemException { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL; + finderArgs = FINDER_ARGS_EMPTY; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL; + finderArgs = new Object[] { start, end, orderByComparator }; + } + + List<Title> list = (List<Title>)FinderCacheUtil.getResult(finderPath, + finderArgs, this); + + if (list == null) { + StringBundler query = null; + String sql = null; + + if (orderByComparator != null) { + query = new StringBundler(2 + + (orderByComparator.getOrderByFields().length * 3)); + + query.append(_SQL_SELECT_TITLE); + + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + + sql = query.toString(); + } + else { + sql = _SQL_SELECT_TITLE; + + if (pagination) { + sql = sql.concat(TitleModelImpl.ORDER_BY_JPQL); + } + } + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + if (!pagination) { + list = (List<Title>)QueryUtil.list(q, getDialect(), start, + end, false); + + Collections.sort(list); + + list = new UnmodifiableList<Title>(list); + } + else { + list = (List<Title>)QueryUtil.list(q, getDialect(), start, + end); + } + + cacheResult(list); + + FinderCacheUtil.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Removes all the titles from the database. + * + * @throws SystemException if a system exception occurred + */ + @Override + public void removeAll() throws SystemException { + for (Title title : findAll()) { + remove(title); + } + } + + /** + * Returns the number of titles. + * + * @return the number of titles + * @throws SystemException if a system exception occurred + */ + @Override + public int countAll() throws SystemException { + Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, this); + + if (count == null) { + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(_SQL_COUNT_TITLE); + + count = (Long)q.uniqueResult(); + + FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, count); + } + catch (Exception e) { + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + /** + * Initializes the title persistence. + */ + public void afterPropertiesSet() { + String[] listenerClassNames = StringUtil.split(GetterUtil.getString( + com.liferay.util.service.ServiceProps.get( + "value.object.listener.ir.ac.iut.sccportal.guestdiscussion.model.Title"))); + + if (listenerClassNames.length > 0) { + try { + List<ModelListener<Title>> listenersList = new ArrayList<ModelListener<Title>>(); + + for (String listenerClassName : listenerClassNames) { + listenersList.add((ModelListener<Title>)InstanceFactory.newInstance( + getClassLoader(), listenerClassName)); + } + + listeners = listenersList.toArray(new ModelListener[listenersList.size()]); + } + catch (Exception e) { + _log.error(e); + } + } + } + + public void destroy() { + EntityCacheUtil.removeCache(TitleImpl.class.getName()); + FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY); + FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + private static final String _SQL_SELECT_TITLE = "SELECT title FROM Title title"; + private static final String _SQL_SELECT_TITLE_WHERE = "SELECT title FROM Title title WHERE "; + private static final String _SQL_COUNT_TITLE = "SELECT COUNT(title) FROM Title title"; + private static final String _SQL_COUNT_TITLE_WHERE = "SELECT COUNT(title) FROM Title title WHERE "; + private static final String _ORDER_BY_ENTITY_ALIAS = "title."; + private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No Title exists with the primary key "; + private static final String _NO_SUCH_ENTITY_WITH_KEY = "No Title exists with the key {"; + private static final boolean _HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE = GetterUtil.getBoolean(PropsUtil.get( + PropsKeys.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE)); + private static Log _log = LogFactoryUtil.getLog(TitlePersistenceImpl.class); + private static Title _nullTitle = new TitleImpl() { + @Override + public Object clone() { + return this; + } + + @Override + public CacheModel<Title> toCacheModel() { + return _nullTitleCacheModel; + } + }; + + private static CacheModel<Title> _nullTitleCacheModel = new CacheModel<Title>() { + @Override + public Title toEntityModel() { + return _nullTitle; + } + }; +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/log4j.properties b/docroot/WEB-INF/src/log4j.properties new file mode 100644 index 0000000..bdb36e3 --- /dev/null +++ b/docroot/WEB-INF/src/log4j.properties @@ -0,0 +1,8 @@ +log4j.rootLogger=INFO, CONSOLE + +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.layout=org.apache.log4j.EnhancedPatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}:%L] %m%n + +log4j.logger.com.liferay.faces.util.lifecycle.DebugPhaseListener=DEBUG +log4j.logger.com.liferay.sample=DEBUG \ No newline at end of file diff --git a/docroot/WEB-INF/src/service.properties b/docroot/WEB-INF/src/service.properties new file mode 100644 index 0000000..15984ae --- /dev/null +++ b/docroot/WEB-INF/src/service.properties @@ -0,0 +1,41 @@ +## +## Properties Override +## + + # + # Specify where to get the overridden properties. Updates should not be made + # on this file but on the overridden version of this file. + # + include-and-override=${base.path}/service-ext.properties + +## +## Build +## + + build.namespace=GDP + build.number=28 + build.date=1503846512779 + build.auto.upgrade=true + +## +## Spring +## + + # + # Input a list of comma delimited Spring configurations. These will be + # loaded after the bean definitions specified in the + # portalContextConfigLocation parameter in web.xml. + # + spring.configs=\ + WEB-INF/classes/META-INF/base-spring.xml,\ + \ + WEB-INF/classes/META-INF/hibernate-spring.xml,\ + WEB-INF/classes/META-INF/infrastructure-spring.xml,\ + \ + WEB-INF/classes/META-INF/cluster-spring.xml,\ + \ + WEB-INF/classes/META-INF/portlet-spring.xml,\ + \ + WEB-INF/classes/META-INF/shard-data-source-spring.xml,\ + \ + WEB-INF/classes/META-INF/ext-spring.xml \ No newline at end of file diff --git a/docroot/WEB-INF/src/simulation/DatabaseSimulator.java b/docroot/WEB-INF/src/simulation/DatabaseSimulator.java new file mode 100644 index 0000000..fc15696 --- /dev/null +++ b/docroot/WEB-INF/src/simulation/DatabaseSimulator.java @@ -0,0 +1,102 @@ +package simulation; + + + + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import ir.ac.iut.sccportal.guestdiscussion.bean.Comment; + + + + + + + +//@Named +//@ApplicationScoped +public class DatabaseSimulator implements Serializable { + private static final long serialVersionUID = -4562076201196928335L; + + private List<Comment> comments = new ArrayList<Comment>(); + private int uniqueID = 0; + + public List<Comment> getRootComments(Long start, Long count) { + int startInt = start.intValue(); + int endInt = start.intValue() + count.intValue(); + + + if (endInt > this.comments.size()) { + endInt = this.comments.size(); + } + + return SerializationUtils.cloneObject(new ArrayList<Comment>(this.comments.subList(startInt, endInt))); + } + + + public Long getRootCommentCount() { + return (long) this.comments.size(); + } + + private Comment _findCommentByID(Comment parent, String commentid) { + //if (parent.getId().equals(commentid)) { + //return parent; + //} + + for (Comment answer : parent.getAnswers()) { + Comment result = _findCommentByID(answer, commentid); + + if (result != null) { + return result; + } + } + + return null; + } + + private Comment findCommentByID(String commentid) { + for (Comment comment : comments) { + Comment result = _findCommentByID(comment, commentid); + + if (result != null) { + return result; + } + } + + return null; + } + + public List<Comment> getAnswers(Comment comment) { + return null; //SerializationUtils.cloneObject(findCommentByID(comment.getId()).getAnswers()); + } + + public void createComment(Comment comment) { + //comment.setId(this.uniqueID + ""); + this.uniqueID++; + + this.comments.add(0, SerializationUtils.cloneObject(comment)); + } + + public void createAnswer(Comment parent, Comment comment) { + //comment.setId(this.uniqueID + ""); + this.uniqueID++; + + //this.findCommentByID(parent.getId()).getAnswers().add(0, SerializationUtils.cloneObject(comment)); + } + + public void likeComment(Comment comment) { + //Comment databaseComment = findCommentByID(comment.getId()); + //databaseComment.setLikecount(comment.getLikecount()); + } + + + + public void editComment(Comment comment) { + //Comment databaseComment = findCommentByID(comment.getId()); + //databaseComment.setComment_text(comment.getComment_text()); + } + +} \ No newline at end of file diff --git a/docroot/WEB-INF/src/simulation/SerializationUtils.java b/docroot/WEB-INF/src/simulation/SerializationUtils.java new file mode 100644 index 0000000..70ed1b6 --- /dev/null +++ b/docroot/WEB-INF/src/simulation/SerializationUtils.java @@ -0,0 +1,84 @@ +package simulation; +/* + * License: + * This sourcecode (SerializationUtils.java) is license free. + * This means you are free to do whatever you want with it, without asking the Authors. + */ + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; + +/** + * Simple Class to serialize object to byte arrays + * @author + * Nick Russler + * http://www.whitebyte.info + */ +public class SerializationUtils { + + + /** + * @param obj - object to serialize to a byte array + * @return byte array containing the serialized obj + */ + public static byte[] serialize(Object obj) { + byte[] result = null; + ByteArrayOutputStream fos = null; + + try { + fos = new ByteArrayOutputStream(); + ObjectOutputStream o = new ObjectOutputStream(fos); + o.writeObject(obj); + result = fos.toByteArray(); + } catch (IOException e) { + System.err.println(e); + } finally { + try { + fos.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + return result; + } + + + /** + * @param arr - the byte array that holds the serialized object + * @return the deserialized object + */ + public static Object deserialize(byte[] arr) { + InputStream fis = null; + + try { + fis = new ByteArrayInputStream(arr); + ObjectInputStream o = new ObjectInputStream(fis); + return o.readObject(); + } catch (IOException e) { + System.err.println(e); + } catch (ClassNotFoundException e) { + System.err.println(e); + } finally { + try { + fis.close(); + } catch (Exception e) { + } + } + + return null; + } + + /** + * @param obj - object to be cloned + * @return a clone of obj + */ + @SuppressWarnings("unchecked") + public static <T> T cloneObject(T obj) { + return (T) deserialize(serialize(obj)); + } +} \ No newline at end of file diff --git a/docroot/WEB-INF/tld/aui.tld b/docroot/WEB-INF/tld/aui.tld new file mode 100644 index 0000000..1eeac88 --- /dev/null +++ b/docroot/WEB-INF/tld/aui.tld @@ -0,0 +1,2568 @@ +<?xml version="1.0"?> + +<taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"> + <description><![CDATA[Provides the AUI component tags, prefixed with <code>aui:</code>.]]></description> + <tlib-version>1.0</tlib-version> + <short-name>aui</short-name> + <uri>http://alloy.liferay.com/tld/aui</uri> + <tag> + <description><![CDATA[Deprecated as of 6.2, replaced by aui:button.]]></description> + <name>button-item</name> + <tag-class>com.liferay.taglib.aui.ButtonItemTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Whether to track the active state of the button.<!--{"event":false,"inputType":"boolean","outputType":"boolean","required":false,"defaultValue":"false"}-->]]></description> + <name>activeState</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[The outermost DOM node for the Widget, used for sizing and positioning + of a Widget as well as a containing element for any decorator elements used + for skinning.<!--{"event":false,"inputType":"java.lang.String","outputType":"java.lang.String","required":false}-->]]></description> + <name>boundingBox</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[An object map of the CSS class names to use for the different interaction states.<!--{"event":false,"inputType":"java.lang.Object","outputType":"java.util.HashMap","required":false}-->]]></description> + <name>classNames</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[A DOM node that is a direct descendant of a Widget's bounding box that + houses its content.<!--{"event":false,"inputType":"java.lang.String","outputType":"java.lang.String","required":false}-->]]></description> + <name>contentBox</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[CSS class to be automatically added to the <code>boundingBox</code>.<!--{"event":false,"inputType":"java.lang.String","outputType":"java.lang.String","required":false}-->]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Whether to apply the default interaction state to the button<!--{"event":false,"inputType":"boolean","outputType":"boolean","required":false,"defaultValue":"true"}-->]]></description> + <name>defaultState</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Number representing the depth of this Widget relative to + the root Widget in the object heirarchy.<!--{"event":false,"inputType":"java.lang.Object","outputType":"java.lang.Number","required":false,"defaultValue":"-1"}-->]]></description> + <name>depth</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Flag indicating whether or not this object + has been through the destroy lifecycle phase.<!--{"event":false,"inputType":"boolean","outputType":"boolean","required":false,"defaultValue":"false"}-->]]></description> + <name>destroyed</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Boolean indicating if the Widget should be disabled. The disabled implementation + is left to the specific classes extending widget.<!--{"event":false,"inputType":"boolean","outputType":"boolean","required":false,"defaultValue":"false"}-->]]></description> + <name>disabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Boolean indicating if the Widget, or one of its descendants, + has focus.<!--{"event":false,"inputType":"boolean","outputType":"boolean","required":false,"defaultValue":"false"}-->]]></description> + <name>focused</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[An event callback to handle when a user interacts with the button. + This can either be a function that will be attached on click, or + an object map that accepts the following keys: + <code>{fn: // The function to execute + context: // The context to execute the function in + type: // The type of event to listen for (defaults to "click") + }</code><!--{"event":false,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false,"defaultValue":"false"}-->]]></description> + <name>handler</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[String with units, or number, representing the height of the Widget. If a number is provided, + the default unit, defined by the Widgets DEF_UNIT, property is used.<!--{"event":false,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>height</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[css class added to hide the <code>boundingBox</code> when + <a href="Component.html#config_visible">visible</a> is set to + <code>false</code>.<!--{"event":false,"inputType":"java.lang.String","outputType":"java.lang.String","required":false,"defaultValue":"aui-hide"}-->]]></description> + <name>hideClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Whether to track the hover interaction state of the button.<!--{"event":false,"inputType":"boolean","outputType":"boolean","required":false,"defaultValue":"true"}-->]]></description> + <name>hoverState</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[The icon to use inside of the button. Possible values are:<!--{"event":false,"inputType":"java.lang.String","outputType":"java.lang.String","required":false}-->]]></description> + <name>icon</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[DOM Node to display the icon of the ButtonItem. If not + specified try to query using HTML_PARSER an element inside + boundingBox which matches <code>aui-button-icon</code>.<!--{"event":false,"inputType":"java.lang.String","outputType":"java.lang.String","required":false}-->]]></description> + <name>iconNode</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[<!--{"event":false,"inputType":"java.lang.String","outputType":"java.lang.String","required":false}-->]]></description> + <name>buttonitemId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Number representing the Widget's ordinal position in its + parent Widget.<!--{"event":false,"inputType":"java.lang.Object","outputType":"java.lang.Number","required":false,"defaultValue":"0"}-->]]></description> + <name>index</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Flag indicating whether or not this object + has been through the init lifecycle phase.<!--{"event":false,"inputType":"boolean","outputType":"boolean","required":false,"defaultValue":"false"}-->]]></description> + <name>initialized</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Text to use inside of the button.<!--{"event":false,"inputType":"java.lang.String","outputType":"java.lang.String","required":false}-->]]></description> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[DOM Node to display the text of the ButtonItem. If not + specified try to query using HTML_PARSER an element inside + boundingBox which matches <code>aui-button-label</code>.<!--{"event":false,"inputType":"java.lang.String","outputType":"java.lang.String","required":false}-->]]></description> + <name>labelNode</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Retrieves the parent of the Widget in the object hierarchy.<!--{"event":false,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>buttonitemParent</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[If <code>true</code> the render phase will be autimatically invoked + preventing the <code>.render()</code> manual call.<!--{"event":false,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false,"defaultValue":"false"}-->]]></description> + <name>render</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Flag indicating whether or not this Widget + has been through the render lifecycle phase.<!--{"event":false,"inputType":"boolean","outputType":"boolean","required":false,"defaultValue":"false"}-->]]></description> + <name>rendered</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Returns the root Widget in the object hierarchy. If the + ROOT_TYPE property is set, the search for the root Widget will be + constrained to parent Widgets of the specified type.<!--{"event":false,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>root</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Number indicating if the Widget is selected. Possible + values are: + <dl> + <dt>0</dt> <dd>(Default) Not selected</dd> + <dt>1</dt> <dd>Fully selected</dd> + <dt>2</dt> <dd>Partially selected</dd> + </dl><!--{"event":false,"inputType":"java.lang.Object","outputType":"java.lang.Number","required":false,"defaultValue":"0"}-->]]></description> + <name>selected</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[The DOM node to parse for configuration values, passed to the Widget's HTML_PARSER definition<!--{"event":false,"inputType":"java.lang.String","outputType":"java.lang.String","required":false}-->]]></description> + <name>srcNode</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Collection of strings used to label elements of the Widget's UI.<!--{"event":false,"inputType":"java.lang.Object","outputType":"java.util.HashMap","required":false}-->]]></description> + <name>strings</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Number (between -32767 to 32767) indicating the widget's + position in the default tab flow. The value is used to set the + "tabIndex" attribute on the widget's bounding box. Negative values allow + the widget to receive DOM focus programmatically (by calling the focus + method), while being removed from the default tab flow. A value of + null removes the "tabIndex" attribute from the widget's bounding box.<!--{"event":false,"inputType":"java.lang.Object","outputType":"java.lang.Number","required":false,"defaultValue":"0"}-->]]></description> + <name>tabIndex</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Text to use as the title attribute of the button.<!--{"event":false,"inputType":"java.lang.String","outputType":"java.lang.String","required":false}-->]]></description> + <name>title</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Button type.<!--{"event":false,"inputType":"java.lang.String","outputType":"java.lang.String","required":false,"defaultValue":"button"}-->]]></description> + <name>type</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Boolean indicating if use of the WAI-ARIA Roles and States should be + enabled for the Widget.<!--{"event":false,"inputType":"boolean","outputType":"boolean","required":false,"defaultValue":"true"}-->]]></description> + <name>useARIA</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Boolean indicating weather or not the Widget is visible.<!--{"event":false,"inputType":"boolean","outputType":"boolean","required":false,"defaultValue":"true"}-->]]></description> + <name>visible</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[String with units, or number, representing the width of the Widget. If a number is provided, + the default unit, defined by the Widgets DEF_UNIT, property is used.<!--{"event":false,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>width</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'activeState' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterActiveStateChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'boundingBox' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterBoundingBoxChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'classNames' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterClassNamesChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'contentBox' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterContentBoxChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'cssClass' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterCssClassChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'defaultState' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterDefaultStateChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'depth' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterDepthChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[<p> + Lifecycle event for the destroy phase, + fired prior to destruction. Invoking the preventDefault + method on the event object provided to subscribers will + prevent destruction from proceeding. + </p> + <p> + Subscribers to the "after" moment of this event, will be notified + after destruction is complete (and as a result cannot prevent + destruction). + </p><!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterDestroy</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'destroyed' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterDestroyedChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'disabled' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterDisabledChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'focused' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterFocusedChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'handler' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterHandlerChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'height' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterHeightChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'hideClass' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterHideClassChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'hoverState' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterHoverStateChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'icon' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterIconChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'iconNode' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterIconNodeChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'id' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterIdChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'index' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterIndexChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[<p> + Lifecycle event for the init phase, fired prior to initialization. + Invoking the preventDefault() method on the event object provided + to subscribers will prevent initialization from occuring. + </p> + <p> + Subscribers to the "after" momemt of this event, will be notified + after initialization of the object is complete (and therefore + cannot prevent initialization). + </p><!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterInit</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'initialized' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterInitializedChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'label' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterLabelChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'labelNode' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterLabelNodeChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'parent' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterParentChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'render' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterRenderChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'rendered' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterRenderedChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'root' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterRootChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'selected' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterSelectedChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'srcNode' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterSrcNodeChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'strings' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterStringsChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'tabIndex' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterTabIndexChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'title' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterTitleChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'type' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterTypeChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'useARIA' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterUseARIAChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'visible' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterVisibleChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Notification event, which widget implementations can fire, when + they change the content of the widget. This event has no default + behavior and cannot be prevented, so the "on" or "after" + moments are effectively equivalent (with on listeners being invoked before + after listeners).<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterContentUpdate</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Lifecycle event for the render phase, fired prior to rendering the UI + for the widget (prior to invoking the widget's renderer method). + <p> + Subscribers to the "on" moment of this event, will be notified + before the widget is rendered. + </p> + <p> + Subscribers to the "after" moment of this event, will be notified + after rendering is complete. + </p><!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterRender</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'width' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>afterWidthChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'activeState' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onActiveStateChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'boundingBox' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onBoundingBoxChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'classNames' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onClassNamesChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'contentBox' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onContentBoxChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'cssClass' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onCssClassChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'defaultState' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onDefaultStateChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'depth' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onDepthChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[<p> + Lifecycle event for the destroy phase, + fired prior to destruction. Invoking the preventDefault + method on the event object provided to subscribers will + prevent destruction from proceeding. + </p> + <p> + Subscribers to the "after" moment of this event, will be notified + after destruction is complete (and as a result cannot prevent + destruction). + </p><!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onDestroy</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'destroyed' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onDestroyedChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'disabled' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onDisabledChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'focused' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onFocusedChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'handler' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onHandlerChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'height' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onHeightChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'hideClass' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onHideClassChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'hoverState' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onHoverStateChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'icon' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onIconChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'iconNode' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onIconNodeChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'id' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onIdChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'index' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onIndexChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[<p> + Lifecycle event for the init phase, fired prior to initialization. + Invoking the preventDefault() method on the event object provided + to subscribers will prevent initialization from occuring. + </p> + <p> + Subscribers to the "after" momemt of this event, will be notified + after initialization of the object is complete (and therefore + cannot prevent initialization). + </p><!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onInit</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'initialized' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onInitializedChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'label' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onLabelChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'labelNode' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onLabelNodeChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'parent' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onParentChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'render' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onRenderChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'rendered' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onRenderedChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'root' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onRootChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'selected' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onSelectedChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'srcNode' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onSrcNodeChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'strings' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onStringsChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'tabIndex' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onTabIndexChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'title' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onTitleChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'type' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onTypeChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'useARIA' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onUseARIAChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'visible' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onVisibleChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Notification event, which widget implementations can fire, when + they change the content of the widget. This event has no default + behavior and cannot be prevented, so the "on" or "after" + moments are effectively equivalent (with on listeners being invoked before + after listeners).<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onContentUpdate</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Lifecycle event for the render phase, fired prior to rendering the UI + for the widget (prior to invoking the widget's renderer method). + <p> + Subscribers to the "on" moment of this event, will be notified + before the widget is rendered. + </p> + <p> + Subscribers to the "after" moment of this event, will be notified + after rendering is complete. + </p><!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onRender</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Fires when the value for the configuration attribute 'width' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.<!--{"event":true,"inputType":"java.lang.Object","outputType":"java.lang.Object","required":false}-->]]></description> + <name>onWidthChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates an anchor (or link) that offers custom configuration and localization.]]></description> + <name>a</name> + <tag-class>com.liferay.taglib.aui.ATag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets a role for assistive technologies to interpret HTML elements that have been used for something other than their intended purpose. For example, the <code><p></code> tag could be used for something other than a paragraph.]]></description> + <name>ariaRole</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Takes a set of data and passes it as HTML data attributes. For example, the <code>HashMap<"class-name", foo></code> would render as the attribute <code>data-class-name = foo;</code>.]]></description> + <name>data</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.Map</type> + </attribute> + <attribute> + <description><![CDATA[Sets the URL navigated to when the link is clicked.]]></description> + <name>href</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the text value for the anchor's label.]]></description> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the language of the anchor component, to assist search engines and web browsers in finding and rendering the anchor appropriately.]]></description> + <name>lang</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a JavaScript function to be called on a user clicking the anchor.]]></description> + <name>onClick</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the target window in which the URL is opened. The default value is <code>self</code>. Possible values are <code>blank</code>, <code>self</code>, <code>parent</code>, <code>top</code>, and a unique frame's name.]]></description> + <name>target</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the anchor's title.]]></description> + <name>title</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <name>button</name> + <tag-class>com.liferay.taglib.aui.ButtonTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component. These styles override the ones set by the <code>primary</code> attribute.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Takes a set of data and passes it as HTML data attributes. For example, the <code>HashMap<"class-name", foo></code> would render as the attribute <code>data-class-name = foo;</code>.]]></description> + <name>data</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the component is disabled. The default value is <code>false</code>.]]></description> + <name>disabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the URL navigated to when the button is clicked.]]></description> + <name>href</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the icon to display on the button based on the icon CSS class value given. Possible CSS class values can be found at <a href="http://marcoceppi.github.io/bootstrap-glyphicons/">here</a>.]]></description> + <name>icon</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the alignment for the button's icon. The default value is <code>left</code>.]]></description> + <name>iconAlign</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the button's name.]]></description> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a function to be called on a user clicking the button.]]></description> + <name>onClick</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to apply the primary btn CSS styling to the button. If the <code>type</code> attribute is set to <code>submit</code>, this value is set to <code>true</code>. For all other types, the value is set to <code>false</code> by default.]]></description> + <name>primary</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Sets the button's type. Possible values are <code>button</code>, <code>submit</code>, <code>cancel</code> and <code>reset</code>. The default value is <code>button</code>.]]></description> + <name>type</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to open a dialog window with the <code>href</code> location when a user clicks the button. The default value is <code>false</code>.]]></description> + <name>useDialog</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <name>value</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates a button row <code><div></code> tag to wrap <code><aui:button></code> components and offer additional styling.]]></description> + <name>button-row</name> + <tag-class>com.liferay.taglib.aui.ButtonRowTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates a column to display content in an <code><aui:row></code> component.]]></description> + <name>col</name> + <tag-class>com.liferay.taglib.aui.ColTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>offset</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <name>offsetWidth</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description><![CDATA[Sets the width of the column in the containing row as a fraction of <code>12</code>. For example, a span of <code>4</code> would result in a column width <code>4/12</code> (or <code>1/3</code>) of the total width of the containing row.]]></description> + <name>span</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description><![CDATA[Sets the width of the column in the containing row as a percentage, overriding the <code>span</code> attribute. The width is then converted to a span expressed as <code>((width/100) x 12)</code>, rounded to the nearest whole number. For example, a width of <code>33</code> would be converted to <code>3.96</code>, which would be rounded up to a span value of <code>4</code>.]]></description> + <name>width</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Deprecated as of 6.2, replaced by <code>aui:col</code>.]]></description> + <name>column</name> + <tag-class>com.liferay.taglib.aui.ColumnTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets the width of the column in percentage. For example, <code>20</code> would be 20%. The default value is <code>0</code>.]]></description> + <name>columnWidth</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the column should be the first column. The default value is <code>false</code>.]]></description> + <name>first</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the column is the last column. The default value is <code>false</code>.]]></description> + <name>last</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <name>component</name> + <tag-class>com.liferay.taglib.aui.ComponentTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>defineVar</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <name>excludeAttributes</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>javaScriptAttributes</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>module</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>options</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.Map</type> + </attribute> + <attribute> + <name>scriptPosition</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>tagPageContext</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>javax.servlet.jsp.JspContext</type> + </attribute> + <attribute> + <name>useJavaScript</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.io.Serializable</type> + </attribute> + <attribute> + <name>var</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates a container <code><div></code> tag to wrap <code><aui:row></code> components and offer additional styling.]]></description> + <name>container</name> + <tag-class>com.liferay.taglib.aui.ContainerTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the container's size is fixed or is able to span the entire width of the viewport. The default value is <code>true</code>.]]></description> + <name>fluid</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates a <code><div></code> tag to wrap form fields and offer additional styling.]]></description> + <name>field-wrapper</name> + <tag-class>com.liferay.taglib.aui.FieldWrapperTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Takes a set of data and passes it as HTML data attributes. For example, the <code>HashMap<"class-name", foo></code> would render as the attribute <code>data-class-name = foo;</code>.]]></description> + <name>data</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the wrapper should be the first element of the form. The default value is <code>false</code>.]]></description> + <name>first</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets text to display as a help tooltip on mouse over of the component's help icon.]]></description> + <name>helpMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to make this field inline with the next element. The default value is <code>false</code>.]]></description> + <name>inlineField</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Aligns the label's text. Possible values are <code>right</code> and <code>left</code>.]]></description> + <name>inlineLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the text value for the wrapper's label.]]></description> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the wrapper should be the last element of the form. The default value is <code>false</code>.]]></description> + <name>last</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the field wrapper's name.]]></description> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to mark the wrapped fields as required.]]></description> + <name>required</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + </tag> + <tag> + <description><![CDATA[Creates a <code><div></code> tag to group related form elements and offer additional styling.]]></description> + <name>fieldset</name> + <tag-class>com.liferay.taglib.aui.FieldsetTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets whether to display the field set as a column instead of a row.]]></description> + <name>column</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets text to display as a help tooltip on mouse over of the component's help icon.]]></description> + <name>helpMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the text value for the field set's label and renders it as a legend, with a horizontal rule, above the fieldset.]]></description> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates a form that offers additional styling and custom namespacing.]]></description> + <name>form</name> + <tag-class>com.liferay.taglib.aui.FormTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets where to send the form data when the form is submitted.]]></description> + <name>action</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to escape the XML of the form's action URL. The default value is <code>true</code>.]]></description> + <name>escapeXml</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to align the form's labels. The default value is <code>false</code>.]]></description> + <name>inlineLabels</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets how to send the form data. The default value is <code>post</code>. Possible values are <code>get</code> and <code>post</code>.]]></description> + <name>method</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the form's name and ID. The default value is <code>fm</code>.]]></description> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a function to be called on submitting the form.]]></description> + <name>onSubmit</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a namespace for the form and its elements. This attribute lets you set a namespace value that differs from the default portlet namespace.]]></description> + <name>portletNamespace</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to use the default portlet namespace, to avoid name conflicts. The default value is <code>true</code>.]]></description> + <name>useNamespace</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates a customizable icon that can leverage Bootstrap CSS icon classes.]]></description> + <name>icon</name> + <tag-class>com.liferay.taglib.aui.IconTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets a class to give to the container of the icon, to provide an implementation for the icon. Note that the preferred method of setting the icon's image is via the <code>image</code> attribute.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Takes a set of data and passes it as HTML data attributes. For example, the <code>HashMap<"class-name", foo></code> would render as the attribute <code>data-class-name = foo;</code>.]]></description> + <name>data</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.Map</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the image to display for the icon. Values are taken from the suffix of the Bootstrap icon CSS classes. For example, to display the edit icon you would reference the <code>icon-edit</code> CSS class by setting the value <code>edit</code>. If an icon image is referenced for <code>cssClass</code> and <code>image</code>, both icons are shown in the component.]]></description> + <name>image</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the text to display alongside the icon.]]></description> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the target window in which the URL is opened. The default value is <code>self</code>. Possible values are <code>blank</code>, <code>self</code>, <code>parent</code>, <code>top</code>, and a unique frame's name.]]></description> + <name>target</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the URL navigated to when the icon is clicked.]]></description> + <name>url</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates a configurable input component.]]></description> + <name>input</name> + <tag-class>com.liferay.taglib.aui.InputTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets whether the input component gets focus by default.]]></description> + <name>autoFocus</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the input component autosizes.]]></description> + <name>autoSize</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets a bean to associate with the input component.]]></description> + <name>bean</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to reload the page when the value of the input changes. The default value is <code>false</code>.]]></description> + <name>changesContext</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the input is selected. Note that this attribute is only enabled when <code>type</code> is <code>radio</code> or <code>checkbox</code>.]]></description> + <name>checked</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the primary key for the instance of the class. The default value is <code>0</code>.]]></description> + <name>classPK</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>long</type> + </attribute> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Takes a set of data and passes it as HTML data attributes. For example, the <code>HashMap<"class-name", foo></code> would render as the attribute <code>data-class-name = foo;</code>.]]></description> + <name>data</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <name>dateTogglerCheckboxLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the default language ID for the component.]]></description> + <name>defaultLanguageId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the component is disabled. The default value is <code>false</code>.]]></description> + <name>disabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <name>field</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a variable name to refer to the <code>field</code> of the component.]]></description> + <name>fieldParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the input component should be the first element of the form.]]></description> + <name>first</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the name of the component's form.]]></description> + <name>formName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets text to display as a help tooltip on mouse over of the component's help icon.]]></description> + <name>helpMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a CSS class for styling the help message text. The default value is <code>input-group-addon</code>.]]></description> + <name>helpTextCssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to ignore the value saved from the request object. The default value is <code>false</code>.]]></description> + <name>ignoreRequestValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to align the input's field with the next element in the form. The default value is <code>false</code>.]]></description> + <name>inlineField</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Aligns the input label's text. Possible values are <code>right</code> and <code>left</code>.]]></description> + <name>inlineLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the label for the input component. If not assigned a value, the label is automatically taken from the <code>name</code> attribute's value.]]></description> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>languageId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the component should be the last element of the form.]]></description> + <name>last</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to translate the component's text features into the user's language. The default value is <code>false</code>.]]></description> + <name>localized</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the maximum value for the input if its <code>type</code> is <code>number</code> or <code>range</code>. Note that the max value is inclusive if the input's <code>type</code> is <code>range</code>.]]></description> + <name>max</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Sets the class for the bean object.]]></description> + <name>model</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Class</type> + </attribute> + <attribute> + <description><![CDATA[Sets the minimum value for the input if its <code>type</code> is <code>number</code> or <code>range</code>. Note that the min value is inclusive if the input's <code>type</code> is <code>range</code>.]]></description> + <name>min</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <name>multiple</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the component's name.]]></description> + <name>name</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a function to be called when the input's value changes.]]></description> + <name>onChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a function to be called on a user clicking the input.]]></description> + <name>onClick</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets placeholder text for the input's field.]]></description> + <name>placeholder</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets text to display before the input.]]></description> + <name>prefix</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to mark the input as required.]]></description> + <name>required</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the input's field is resizeable, if the input is of type <code>textarea</code>.]]></description> + <name>resizable</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to show the input's required label, if an input value is required.]]></description> + <name>showRequiredLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets text to display after the input.]]></description> + <name>suffix</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the input's title.]]></description> + <name>title</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the input's type. Possible values are <code>text</code>, <code>hidden</code>, <code>assetCategories</code>, <code>assetTags</code>, <code>textarea</code>, <code>timeZone</code>, <code>password</code>, <code>checkbox</code>, <code>radio</code>, <code>submit</code>, <code>button</code>, <code>color</code>, <code>email</code>, <code>number</code>, <code>range</code>, <code>resource</code>, <code>url</code>, and an empty value. If an empty value or no value is set, the input's type is obtained automatically from the input component's bean.]]></description> + <name>type</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to use the default portlet namespace, to avoid name conflicts. The default value is <code>true</code>.]]></description> + <name>useNamespace</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the input's value.]]></description> + <name>value</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Sets a CSS class for styling the <code>div</code> that wraps the input component.]]></description> + <name>wrapperCssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Deprecated as of 6.2, with no replacement.]]></description> + <name>layout</name> + <tag-class>com.liferay.taglib.aui.LayoutTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates a configurable model context object that can be used as a model for other components.]]></description> + <name>model-context</name> + <tag-class>com.liferay.taglib.aui.ModelContextTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets the bean associated with the model object.]]></description> + <name>bean</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Sets the default language ID for the component.]]></description> + <name>defaultLanguageId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the class for the bean object.]]></description> + <name>model</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Class</type> + </attribute> + </tag> + <tag> + <description><![CDATA[Creates a navigation wrapper component to hold <code><nav:item></code> components for an <code><aui:nav-bar></code> component.]]></description> + <name>nav</name> + <tag-class>com.liferay.taglib.aui.NavTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets a name for the navigation component for assistive technologies to interpret.]]></description> + <name>ariaLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a role for assistive technologies to interpret HTML elements that have been used for something other than their intended purpose. For example, the <code><p></code> tag could be used for something other than a paragraph.]]></description> + <name>ariaRole</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>collapsible</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>icon</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to use the default portlet namespace, to avoid name conflicts. The default value is <code>true</code>.]]></description> + <name>useNamespace</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates a navigation bar to house navigation components.]]></description> + <name>nav-bar</name> + <tag-class>com.liferay.taglib.aui.NavBarTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates a search component for an <code><aui:nav-bar></code> component.]]></description> + <name>nav-bar-search</name> + <tag-class>com.liferay.taglib.aui.NavBarSearchTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>file</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the search container for the navigation bar to use.]]></description> + <name>searchContainer</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>com.liferay.portal.kernel.dao.search.SearchContainer</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates a navigation item for using in an <code><aui:nav></code> component.]]></description> + <name>nav-item</name> + <tag-class>com.liferay.taglib.aui.NavItemTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets a CSS class for styling the link set in the <code>href</code> attribute.]]></description> + <name>anchorCssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Takes a set of data and passes it as HTML data attributes for the anchor. For example, the <code>HashMap<"class-name", foo></code> would render as the attribute <code>data-class-name = foo;</code>.]]></description> + <name>anchorData</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the instance of the navigation item's link, set in the <code>href</code> attribute.]]></description> + <name>anchorId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a name for the navigation item for assistive technologies to interpret.]]></description> + <name>ariaLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a role for assistive technologies to interpret HTML elements that have been used for something other than their intended purpose. For example, the <code><p></code> tag could be used for something other than a paragraph.]]></description> + <name>ariaRole</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Takes a set of data and passes it as HTML data attributes. For example, the <code>HashMap<"class-name", foo></code> would render as the attribute <code>data-class-name = foo;</code>.]]></description> + <name>data</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the navigation item is a dropdown menu. The default value is <code>false</code>.]]></description> + <name>dropdown</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the URL navigated to when the navigation item is clicked.]]></description> + <name>href</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Sets a CSS class for styling the navigation item's icon.]]></description> + <name>iconCssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the text to display for the navigation item.]]></description> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>localizeLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the navigation item is selected by default. The default value is <code>false</code>.]]></description> + <name>selected</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <name>state</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the navigation item's title.]]></description> + <name>title</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>toggle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to open a dialog window with the <code>href</code> location when a user clicks the navigation item. The default value is <code>false</code>.]]></description> + <name>useDialog</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to wrap the navigation item's dropdown menu in an unordered list with the <code>drop-down-menu</code> class. The default value is <code>true</code>.]]></description> + <name>wrapDropDownMenu</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates an option component for using in an <code><aui:select></code> component.]]></description> + <name>option</name> + <tag-class>com.liferay.taglib.aui.OptionTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Takes a set of data and passes it as HTML data attributes. For example, the <code>HashMap<"class-name", foo></code> would render as the attribute <code>data-class-name = foo;</code>.]]></description> + <name>data</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.Map</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the component is disabled. The default value is <code>false</code>.]]></description> + <name>disabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the text to display as the option in the select form.]]></description> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the option is selected when the component loads. The default value is <code>false</code>.]]></description> + <name>selected</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the styling for the option component. For example, to align the text to the right you would specify <code>text-align:right;</code>.]]></description> + <name>style</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>useModelValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the option's value. If no value is given, the value is taken from the <code>label</code> attribute.]]></description> + <name>value</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <name>panel</name> + <tag-class>com.liferay.taglib.aui.PanelTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>collapsed</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <name>collapsible</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + </tag> + <tag> + <description><![CDATA[Creates a row to hold <code><aui:col></code> components.]]></description> + <name>row</name> + <tag-class>com.liferay.taglib.aui.RowTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to assign the <code>row-fluid</code> CSS class to the row. The default value is <code>true</code>. If set to <code>false</code>, the <code>row</code> CSS class is assigned.]]></description> + <name>fluid</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates a script component in which to write JavaScript that facilitates using AlloyUI modules.]]></description> + <name>script</name> + <tag-class>com.liferay.taglib.aui.ScriptTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets the script's position.]]></description> + <name>position</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets AlloyUI modules to be used in the script. Names of multiple modules must be separated by commas.]]></description> + <name>use</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + </tag> + <tag> + <description><![CDATA[Creates a select field (or combo box) for holding <code><aui:option></code> components.]]></description> + <name>select</name> + <tag-class>com.liferay.taglib.aui.SelectTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets the bean associated with the select component.]]></description> + <name>bean</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to reload the page when the value of the field changes. The default value is <code>false</code>.]]></description> + <name>changesContext</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets a CSS class for styling this component.]]></description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Takes a set of data and passes it as HTML data attributes. For example, the <code>HashMap<"class-name", "foo"></code> would render as the attribute <code>data-class-name = "foo";</code>.]]></description> + <name>data</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.Map</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the component is disabled. The default value is <code>false</code>.]]></description> + <name>disabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the component should be the first element of the form. The default value is <code>false</code>.]]></description> + <name>first</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets text to display as a help tooltip on mouse over of the component's help icon.]]></description> + <name>helpMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>ignoreRequestValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to align the select field with the next element in the form. The default value is <code>false</code>.]]></description> + <name>inlineField</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Aligns the label's text. Possible values are <code>right</code> and <code>left</code>.]]></description> + <name>inlineLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the select field's label and displays it above the field.]]></description> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether the component should be the last element in the form. The default value is <code>false</code>.]]></description> + <name>last</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the list type and automatically generates the options. Possible values can be found in <code>ListTypeImpl.java</code>.]]></description> + <name>listType</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>listTypeFieldName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether multiple options can be selected. If set to <code>true</code>, the select field expands to allow for multiple selections. The default value is <code>false</code>.]]></description> + <name>multiple</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the select field's name attribute. Note that this value overrides the <code>label</code> attribute and takes the place of the label.]]></description> + <name>name</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a function to be called when the select field's value changes.]]></description> + <name>onChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets a function to be called on users clicking the select field.]]></description> + <name>onClick</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the text to display before the select field.]]></description> + <name>prefix</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to mark the select field as required. The default value is <code>false</code>.]]></description> + <name>required</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to display an empty option as a placeholder. The default value is <code>false</code>.]]></description> + <name>showEmptyOption</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to display the required label above the select field. Note that this attribute is only active if the <code>required</code> attribute is set to <code>true</code>. The default value is <code>false</code>.]]></description> + <name>showRequiredLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the text to display after the select field.]]></description> + <name>suffix</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the select field's title.]]></description> + <name>title</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to use the default portlet namespace, to avoid name conflicts. The default value is <code>true</code>.]]></description> + <name>useNamespace</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description><![CDATA[Creates a spacer component that enables JSP 2.1 server-side trimming of white spaces.]]></description> + <name>spacer</name> + <tag-class>com.liferay.taglib.aui.SpacerTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <description><![CDATA[Creates a UI component for managing translation of associated content.]]></description> + <name>translation-manager</name> + <tag-class>com.liferay.taglib.aui.TranslationManagerTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets the available locales of translation languages to choose from.]]></description> + <name>availableLocales</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.Locale[]</type> + </attribute> + <attribute> + <description><![CDATA[Sets the language ID to which the translation manager defaults when no other translations are available in the user's language.]]></description> + <name>defaultLanguageId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>editingLanguageId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to activate the translation manager. The default value is <code>true</code>. If this is set to <code>false</code>, the translation manager will not work entirely.]]></description> + <name>initialize</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to make the translation manager read-only for the user. The default value is <code>false</code>.]]></description> + <name>readOnly</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + </tag> + <tag> + <description><![CDATA[Creates a component to validate input fields.]]></description> + <name>validator</name> + <tag-class>com.liferay.taglib.aui.ValidatorTagImpl</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets whether custom validator rules force a field to be required. The default value is <code>true</code>.]]></description> + <name>customValidatorRequired</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets a custom error message to replace the default validation error message.]]></description> + <name>errorMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the type of validation for the input field. Possible values are <code>acceptFiles</code>, <code>alpha</code>, <code>alphanum</code>, <code>date</code>, <code>digits</code>, <code>email</code>, <code>equalTo</code>, <code>iri</code>, <code>max</code>, <code>maxLength</code>, <code>min</code>, <code>minLength</code>, <code>number</code>, <code>required</code>, and <code>url</code>.]]></description> + <name>name</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + </tag> + <tag> + <description><![CDATA[Creates a UI component that displays the current status of its associated workflow.]]></description> + <name>workflow-status</name> + <tag-class>com.liferay.taglib.aui.WorkflowStatusTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description><![CDATA[Sets the bean associated with the workflow status component.]]></description> + <name>bean</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Object</type> + </attribute> + <attribute> + <description><![CDATA[Sets text to display as a help tooltip on mouse over of the component's help icon.]]></description> + <name>helpMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Identifies the component instance.]]></description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the class for the bean object.]]></description> + <name>model</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Class</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to show the workflow status icon. The default value is <code>true</code>.]]></description> + <name>showIcon</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets whether to show the status label. The default value is <code>true</code>.]]></description> + <name>showLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description><![CDATA[Sets the workflow status. Possible values are <code>0</code> (Approved), <code>1</code> (Pending), <code>2</code> (Draft), <code>3</code> (Expired), <code>4</code> (Denied), <code>5</code> (Inactive), <code>6</code> (Incomplete), <code>7</code> (Scheduled), and <code>8</code> (In-Trash). Any other value defaults to status (Any).]]></description> + <name>status</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Integer</type> + </attribute> + <attribute> + <description><![CDATA[Sets the worflow status message, overriding the existing one.]]></description> + <name>statusMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <description><![CDATA[Sets the version for the workflow status and displays the version in a label next to the workflow status.]]></description> + <name>version</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + </tag> +</taglib> \ No newline at end of file diff --git a/docroot/WEB-INF/tld/liferay-portlet-ext.tld b/docroot/WEB-INF/tld/liferay-portlet-ext.tld new file mode 100644 index 0000000..7c04664 --- /dev/null +++ b/docroot/WEB-INF/tld/liferay-portlet-ext.tld @@ -0,0 +1,538 @@ +<?xml version="1.0"?> +<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> + +<taglib> + <tlib-version>1.0</tlib-version> + <jsp-version>1.1</jsp-version> + <short-name>liferay-portlet</short-name> + <uri>http://liferay.com/tld/portlet</uri> + + <!-- + liferay-portlet:actionURL is similar to portlet:actionURL except it has the + additional attributes plid, portletName, anchor, and encrypt. + + Set varImpl to set the PortletURL object. This gives you an object reference + to the underlying URL implementation. + + Set plid to the plid of another layout. This allows you to post the URL to + another layout. + + Set portletName to the name of a portlet other than the current portlet. + This allows you to post the URL to another portlet. + + Set anchor to false if you do not want the page to refresh and anchor to the + current portlet. + + Set encrypt to true if you want to encrypt all the parameter values. + + Set doAsUserId to process this URL as if it is accessed by the specified + user. + + Set portletConfiguration to true if you want to pass the parameters needed + when you are accessing a portlet that is wrapped by the Portlet + Configuration portlet. + --> + + <tag> + <name>actionURL</name> + <tag-class>com.liferay.taglib.portlet.ActionURLTag</tag-class> + <tei-class>com.liferay.taglib.portlet.ActionURLTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <name>allowEmptyParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>anchor</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>copyCurrentRenderParameters</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>doAsGroupId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>doAsUserId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>encrypt</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>escapeXml</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>plid</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletConfiguration</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletMode</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>refererGroupId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>refererPlid</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>secure</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>var</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>varImpl</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>windowState</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>icon-back</name> + <tag-class>com.liferay.taglib.portletext.IconBackTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>icon-close</name> + <tag-class>com.liferay.taglib.portletext.IconCloseTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>icon-configuration</name> + <tag-class>com.liferay.taglib.portletext.IconConfigurationTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>icon-edit</name> + <tag-class>com.liferay.taglib.portletext.IconEditTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>icon-edit-defaults</name> + <tag-class>com.liferay.taglib.portletext.IconEditDefaultsTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>icon-edit-guest</name> + <tag-class>com.liferay.taglib.portletext.IconEditGuestTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>icon-export-import</name> + <tag-class>com.liferay.taglib.portletext.IconExportImportTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>icon-help</name> + <tag-class>com.liferay.taglib.portletext.IconHelpTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>icon-maximize</name> + <tag-class>com.liferay.taglib.portletext.IconMaximizeTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>icon-minimize</name> + <tag-class>com.liferay.taglib.portletext.IconMinimizeTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>icon-options</name> + <tag-class>com.liferay.taglib.portletext.IconOptionsTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>icon-portlet</name> + <tag-class>com.liferay.taglib.portletext.IconPortletTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>ariaRole</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portlet</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>url</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>icon-portlet-css</name> + <tag-class>com.liferay.taglib.portletext.IconPortletCssTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>icon-print</name> + <tag-class>com.liferay.taglib.portletext.IconPrintTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>icon-refresh</name> + <tag-class>com.liferay.taglib.portletext.IconRefreshTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>param</name> + <tag-class>com.liferay.taglib.util.ParamTag</tag-class> + <body-content>empty</body-content> + <attribute> + <name>name</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>value</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>preview</name> + <tag-class>com.liferay.taglib.portletext.PreviewTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>portletName</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>queryString</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showBorders</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>width</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + + <!-- + liferay-portlet:renderURL is similar to portlet:renderURL except it has the + additional attributes plid, portletName, anchor, and encrypt. + + Set varImpl to set the PortletURL object. This gives you an object reference + to the underlying URL implementation. + + Set plid to the plid of another layout. This allows you to post the URL to + another layout. + + Set portletName to the name of a portlet other than the current portlet. + This allows you to post the URL to another portlet. + + Set anchor to false if you do not want the page to refresh and anchor to the + current portlet. + + Set encrypt to true if you want to encrypt all the parameter values. + + Set doAsUserId to process this URL as if it is accessed by the specified + user. + + Set portletConfiguration to true if you want to pass the parameters needed + when you are accessing a portlet that is wrapped by the Portlet + Configuration portlet. + --> + + <tag> + <name>renderURL</name> + <tag-class>com.liferay.taglib.portlet.RenderURLTag</tag-class> + <tei-class>com.liferay.taglib.portlet.RenderURLTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <name>allowEmptyParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>anchor</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>copyCurrentRenderParameters</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>doAsGroupId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>doAsUserId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>encrypt</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>escapeXml</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>plid</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletConfiguration</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletMode</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>refererGroupId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>refererPlid</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>secure</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>var</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>varImpl</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>windowState</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>renderURLParams</name> + <tag-class>com.liferay.taglib.portlet.RenderURLParamsTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>varImpl</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + + <!-- + liferay-portlet:resourceURL is similar to portlet:resourceURL except it has + the additional attributes plid, portletName, anchor, and encrypt. + + Set varImpl to set the PortletURL object. This gives you an object reference + to the underlying URL implementation. + + Set plid to the plid of another layout. This allows you to post the URL to + another layout. + + Set portletName to the name of a portlet other than the current portlet. + This allows you to post the URL to another portlet. + + Set anchor to false if you do not want the page to refresh and anchor to the + current portlet. + + Set encrypt to true if you want to encrypt all the parameter values. + + Set doAsUserId to process this URL as if it is accessed by the specified + user. + + Set portletConfiguration to true if you want to pass the parameters needed + when you are accessing a portlet that is wrapped by the Portlet + Configuration portlet. + --> + + <tag> + <name>resourceURL</name> + <tag-class>com.liferay.taglib.portlet.ResourceURLTag</tag-class> + <tei-class>com.liferay.taglib.portlet.ResourceURLTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <name>anchor</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>copyCurrentRenderParameters</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>doAsGroupId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>doAsUserId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>encrypt</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>escapeXml</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>plid</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletConfiguration</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletMode</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>refererGroupId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>refererPlid</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>secure</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>var</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>varImpl</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>windowState</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>runtime</name> + <tag-class>com.liferay.taglib.portletext.RuntimeTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>defaultPreferences</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletName</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>queryString</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> +</taglib> \ No newline at end of file diff --git a/docroot/WEB-INF/tld/liferay-portlet.tld b/docroot/WEB-INF/tld/liferay-portlet.tld new file mode 100644 index 0000000..a7cd2fd --- /dev/null +++ b/docroot/WEB-INF/tld/liferay-portlet.tld @@ -0,0 +1,158 @@ +<?xml version="1.0"?> +<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> + +<taglib> + <tlib-version>1.0</tlib-version> + <jsp-version>1.1</jsp-version> + <short-name>portlet</short-name> + <uri>http://java.sun.com/portlet</uri> + <tag> + <name>actionURL</name> + <tag-class>com.liferay.taglib.portlet.ActionURLTag</tag-class> + <tei-class>com.liferay.taglib.portlet.ActionURLTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <name>copyCurrentRenderParameters</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>escapeXml</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletMode</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>secure</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>var</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>windowState</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>defineObjects</name> + <tag-class>com.liferay.taglib.portlet.DefineObjectsTag</tag-class> + <tei-class>com.liferay.taglib.portlet.DefineObjectsTei</tei-class> + <body-content>empty</body-content> + </tag> + <tag> + <name>namespace</name> + <tag-class>com.liferay.taglib.portlet.NamespaceTag</tag-class> + <body-content>empty</body-content> + </tag> + <tag> + <name>param</name> + <tag-class>com.liferay.taglib.util.ParamTag</tag-class> + <body-content>empty</body-content> + <attribute> + <name>name</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>value</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>property</name> + <tag-class>com.liferay.taglib.util.PropertyTag</tag-class> + <body-content>empty</body-content> + <attribute> + <name>name</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>value</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>renderURL</name> + <tag-class>com.liferay.taglib.portlet.RenderURLTag</tag-class> + <tei-class>com.liferay.taglib.portlet.RenderURLTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <name>copyCurrentRenderParameters</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>escapeXml</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletMode</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>secure</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>var</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>windowState</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>resourceURL</name> + <tag-class>com.liferay.taglib.portlet.ResourceURLTag</tag-class> + <tei-class>com.liferay.taglib.portlet.ResourceURLTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <name>cacheability</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>escapeXml</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>secure</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>var</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> +</taglib> \ No newline at end of file diff --git a/docroot/WEB-INF/tld/liferay-security.tld b/docroot/WEB-INF/tld/liferay-security.tld new file mode 100644 index 0000000..f8e6f6d --- /dev/null +++ b/docroot/WEB-INF/tld/liferay-security.tld @@ -0,0 +1,106 @@ +<?xml version="1.0"?> +<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> + +<taglib> + <tlib-version>1.0</tlib-version> + <jsp-version>1.1</jsp-version> + <short-name>liferay-security</short-name> + <uri>http://liferay.com/tld/security</uri> + <tag> + <name>doAsURL</name> + <tag-class>com.liferay.taglib.security.DoAsURLTag</tag-class> + <tei-class>com.liferay.taglib.security.DoAsURLTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <name>doAsUserId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>var</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>encrypt</name> + <tag-class>com.liferay.taglib.security.EncryptTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>className</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>protocol</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>style</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>target</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>unencryptedParams</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>url</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>permissionsURL</name> + <tag-class>com.liferay.taglib.security.PermissionsURLTag</tag-class> + <tei-class>com.liferay.taglib.security.PermissionsURLTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <name>modelResource</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>modelResourceDescription</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>redirect</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>resourceGroupId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>resourcePrimKey</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>roleTypes</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>var</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>windowState</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> +</taglib> \ No newline at end of file diff --git a/docroot/WEB-INF/tld/liferay-theme.tld b/docroot/WEB-INF/tld/liferay-theme.tld new file mode 100644 index 0000000..90ac81d --- /dev/null +++ b/docroot/WEB-INF/tld/liferay-theme.tld @@ -0,0 +1,65 @@ +<?xml version="1.0"?> +<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> + +<taglib> + <tlib-version>1.0</tlib-version> + <jsp-version>1.1</jsp-version> + <short-name>theme</short-name> + <uri>http://liferay.com/tld/theme</uri> + <tag> + <name>defineObjects</name> + <tag-class>com.liferay.taglib.theme.DefineObjectsTag</tag-class> + <tei-class>com.liferay.taglib.theme.DefineObjectsTei</tei-class> + <body-content>empty</body-content> + </tag> + <tag> + <name>include</name> + <tag-class>com.liferay.taglib.theme.IncludeTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>page</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>layout-icon</name> + <tag-class>com.liferay.taglib.theme.LayoutIconTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>layout</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>meta-tags</name> + <tag-class>com.liferay.taglib.theme.MetaTagsTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>param</name> + <tag-class>com.liferay.taglib.util.ParamTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>name</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>value</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>wrap-portlet</name> + <tag-class>com.liferay.taglib.theme.WrapPortletTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>page</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> +</taglib> \ No newline at end of file diff --git a/docroot/WEB-INF/tld/liferay-ui.tld b/docroot/WEB-INF/tld/liferay-ui.tld new file mode 100644 index 0000000..a9a746a --- /dev/null +++ b/docroot/WEB-INF/tld/liferay-ui.tld @@ -0,0 +1,4691 @@ +<?xml version="1.0"?> + +<taglib + version="2.1" + xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd" +> + <description>Provides the Liferay UI component tags, prefixed with <![CDATA[<code>liferay-ui:</code>]]>.</description> + <tlib-version>1.0</tlib-version> + <short-name>liferay-ui</short-name> + <uri>http://liferay.com/tld/ui</uri> + <tag> + <name>app-view-display-style</name> + <tag-class>com.liferay.taglib.ui.AppViewDisplayStyleTag</tag-class> + <body-content>empty</body-content> + <attribute> + <name>displayStyle</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>displayStyles</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>requestParams</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a component for displaying entry items such as images, documents, folders, etc. in a concise but informative manner. Items are displayed in a similar fashion to entries in the file system of most operating systems.</description> + <name>app-view-entry</name> + <tag-class>com.liferay.taglib.ui.AppViewEntryTag</tag-class> + <body-content>empty</body-content> + <attribute> + <description>The path to an action JSP page.</description> + <name>actionJsp</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The Java class name for any categories added to the entry.</description> + <name>assetCategoryClassName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The Java class primary key for any categories added to the entry. This is a Java <![CDATA[<code>long</code>]]>.</description> + <name>assetCategoryClassPK</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The Java class name for any tags added to the entry.</description> + <name>assetTagClassName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The Java class primary key for any tags added to the entry. This is a Java <![CDATA[<code>long</code>]]>.</description> + <name>assetTagClassPK</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The name of the entry's author.</description> + <name>author</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The date the entry was created.</description> + <name>createDate</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A CSS class for styling this component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Miscellaneous data to be stored via a map. This data is not shared with the browser. The map holds key value pairs of type <![CDATA[<code><String, Object></code>]]>.</description> + <name>data</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.Map</type> + </attribute> + <attribute> + <description>A description of the entry.</description> + <name>description</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A date to display the entry.</description> + <name>displayDate</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A display style for the component. Options are <![CDATA[<code>list</code>]]>, <![CDATA[<code>icon</code>]]>, and <![CDATA[<code>descriptive</code>]]>.</description> + <name>displayStyle</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A date for the entry to expire and be automatically deleted.</description> + <name>expirationDate</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the entry is a folder. The default is <![CDATA[<code>false</code>]]>.</description> + <name>folder</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>The group ID of the entry. This is a Java <![CDATA[<code>long</code>]]>.</description> + <name>groupId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The version number of the most recently published copy of the entry.</description> + <name>latestApprovedVersion</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The author of the most recently published version of the entry.</description> + <name>latestApprovedVersionAuthor</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the entry is locked. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>locked</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>The date of the most recent modification to the entry.</description> + <name>modifiedDate</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The date the entry was reviewed.</description> + <name>reviewDate</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A checkbox input ID to be used for the entry row checker.</description> + <name>rowCheckerId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A name for the entry row checker.</description> + <name>rowCheckerName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to show a shortcut icon link to the entry. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>shortcut</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether the entry is selectable. An actual checkbox is used when the display style is <![CDATA[<code>icon</code>]]> or <![CDATA[<code>descriptive</code>]]>. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>showCheckbox</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether to show the link title. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>showLinkTitle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>The current status of the entry, as represented by an integer. Options are <![CDATA[<code>-1: STATUS_ANY</code>]]>, <![CDATA[<code>0: STATUS_APPROVED</code>]]>, <![CDATA[<code>1: ACTION_PUBLISH</code>]]>, <![CDATA[<code>2: STATUS_DRAFT</code>]]>, and <![CDATA[<code>4: STATUS_DENIED</code>]]>. The default value is <![CDATA[<code>-1</code>]]>.</description> + <name>status</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A CSS style to be applied to the div containing the thumbnail for the entry.</description> + <name>thumbnailDivStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The source URL for an entry thumbnail image.</description> + <name>thumbnailSrc</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A CSS style to be applied to the thumbnail for the entry.</description> + <name>thumbnailStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A title for the entry.</description> + <name>title</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The current version of the entry.</description> + <name>version</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL to view the full entry.</description> + <name>url</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a navigation list item component for navigating app view entries.</description> + <name>app-view-navigation-entry</name> + <tag-class>com.liferay.taglib.ui.AppViewNavigationEntryTag</tag-class> + <body-content>empty</body-content> + <attribute> + <description>The path for an action JSP page.</description> + <name>actionJsp</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A CSS class for styling this component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Data to be applied to the component link and stored via a map. This data is not shared with the browser. The map holds key value pairs of type <![CDATA[<code><String, Object></code>]]>.</description> + <name>dataView</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.Map</type> + </attribute> + <attribute> + <description>A title for the component.</description> + <name>entryTitle</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A CSS class for setting the icon of the component.</description> + <name>iconImage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>iconSrc</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the entry is selected.</description> + <name>selected</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A URL to view the entry.</description> + <name>viewURL</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a toolbar for viewing items in app view.</description> + <name>app-view-toolbar</name> + <tag-class>com.liferay.taglib.ui.AppViewToolbarTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Whether to include the option to choose a display style for component items. If the value is <![CDATA[<code>true</code>]]>, a list of display style options is rendered. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>includeDisplayStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether to include an option to select all component items. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>includeSelectAll</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>The file path for a search JSP page.</description> + <name>searchJsp</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a component for displaying search results of entries in app view.</description> + <name>app-view-search-entry</name> + <tag-class>com.liferay.taglib.ui.AppViewSearchEntryTag</tag-class> + <body-content>empty</body-content> + <attribute> + <description>The file path for an action JSP page.</description> + <name>actionJsp</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>containerIcon</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The name of the container that the entry is in, such as the name of a folder.</description> + <name>containerName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>containerSrc</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The type of container the entry is in, such as <![CDATA[<code>Folder</code>]]>.</description> + <name>containerType</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A CSS class for styling this component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A description of the entry.</description> + <name>description</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A list of objects containing information such as content, user ID, and titles of the entry file attachments.</description> + <name>fileEntryTuples</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the entry is locked. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>locked</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A list of objects containing information such as content, author, and status of entry messages. An example would be a comment made by one user on another user's blog post.</description> + <name>mbMessages</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Query terms of the search.</description> + <name>queryTerms</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A checkbox input ID to be used for the entry row checker. This is a Java <![CDATA[<code>long</code>]]>.</description> + <name>rowCheckerId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A name to be used for the entry row checker.</description> + <name>rowCheckerName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the entry is selectable via a checkbox. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>showCheckbox</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>The current status of the entry as represented by an integer. Options are <![CDATA[<code>-1: STATUS_ANY</code>]]>, <![CDATA[<code>0: STATUS_APPROVED</code>]]>, <![CDATA[<code>1: ACTION_PUBLISH</code>]]>, <![CDATA[<code>2: STATUS_DRAFT</code>]]>, and <![CDATA[<code>4: STATUS_DENIED</code>]]>.</description> + <name>status</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The URL for an entry thumbnail image.</description> + <name>thumbnailSrc</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A title for the entry.</description> + <name>title</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL used to view the full entry.</description> + <name>url</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The current and past versions of the entry.</description> + <name>versions</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>asset-categories-error</name> + <tag-class>com.liferay.taglib.ui.AssetCategoriesErrorTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>asset-categories-navigation</name> + <tag-class>com.liferay.taglib.ui.AssetCategoriesNavigationTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>hidePortletWhenEmpty</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>vocabularyIds</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>asset-categories-selector</name> + <tag-class>com.liferay.taglib.ui.AssetCategoriesSelectorTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>className</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>classPK</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>contentCallback</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>curCategoryIds</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>groupIds</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>hiddenInput</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>ignoreRequestValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>asset-categories-summary</name> + <tag-class>com.liferay.taglib.ui.AssetCategoriesSummaryTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>className</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>classPK</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>message</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>asset-links</name> + <tag-class>com.liferay.taglib.ui.AssetLinksTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>assetEntryId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>className</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>classPK</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a <![CDATA[<code>liferay-ui:error</code>]]> component to display tag-related error messages.</description> + <name>asset-tags-error</name> + <tag-class>com.liferay.taglib.ui.AssetTagsErrorTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>asset-tags-navigation</name> + <tag-class>com.liferay.taglib.ui.AssetTagsNavigationTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>classNameId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>displayStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>hidePortletWhenEmpty</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>maxAssetTags</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showAssetCount</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showZeroAssetCount</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a <![CDATA[<code>Liferay.AssetTagsSelector</code>]]> component to create and select tags to add to an asset, such as a blog entry, bookmark, or wiki page.</description> + <name>asset-tags-selector</name> + <tag-class>com.liferay.taglib.ui.AssetTagsSelectorTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Whether to automatically focus the tag input field. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>autoFocus</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>The Java class of the asset.</description> + <name>className</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The Java class primary key of an asset to associate with the tags. This is a Java <![CDATA[<code>long</code>]]>.</description> + <name>classPK</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A function to get tag suggestions based on the asset's content.</description> + <name>contentCallback</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The current selected tags.</description> + <name>curTags</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The group IDs of the asset tags.</description> + <name>groupIds</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The name of the hidden input for passing in the asset's current tags.</description> + <name>hiddenInput</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An ID for the component instance.</description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>ignoreRequestValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a component to display all the tags associated with an asset, such as a blog entry, wiki page, or message boards message.</description> + <name>asset-tags-summary</name> + <tag-class>com.liferay.taglib.ui.AssetTagsSummaryTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>An array of the asset tag names.</description> + <name>assetTagNames</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The Java class of the asset.</description> + <name>className</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The Java class primary key of an asset. This is a Java <![CDATA[<code>long</code>]]>.</description> + <name>classPK</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A message to display before the tag labels. A standard example is <![CDATA[<code>tags</code>]]>, which renders as <![CDATA[<code>Tags:</code>]]>.</description> + <name>message</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The URL of a portlet to display the tags.</description> + <name>portletURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>breadcrumb</name> + <tag-class>com.liferay.taglib.ui.BreadcrumbTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>displayStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>selLayout</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>selLayoutParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showCurrentGroup</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showCurrentPortlet</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showGuestGroup</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showLayout</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showParentGroups</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showPortletBreadcrumb</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a calendar with configurable events.</description> + <name>calendar</name> + <tag-class>com.liferay.taglib.ui.CalendarTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A given set of integers, corresponding to a day of the chosen month, and to mark with a dot.</description> + <name>data</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.Set</type> + </attribute> + <attribute> + <description>A day of the month to highlight in the calendar.</description> + <name>day</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A format for the header.</description> + <name>headerFormat</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.text.Format</type> + </attribute> + <attribute> + <description>A pattern for the calendar header. A possible value is <![CDATA[<code>MMM/dd/yyyy</code>]]>.</description> + <name>headerPattern</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A month of the year to display at the top of the calendar.</description> + <name>month</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>Whether to display up to six calendar weeks relative to the set day. If the set day of the month is in the latter part of the month, the current month's weeks will be displayed and up to two weeks of the next month will be displayed. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>showAllPotentialWeeks</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A year to display at the top of the calendar.</description> + <name>year</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + </tag> + <tag> + <description>Creates an image CAPTCHA with a corresponding verification input.</description> + <name>captcha</name> + <tag-class>com.liferay.taglib.ui.CaptchaTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>The source URL for the image CAPTCHA.</description> + <name>url</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>categorization-filter</name> + <tag-class>com.liferay.taglib.ui.CategorizationFilterTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>assetType</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>custom-attribute</name> + <tag-class>com.liferay.taglib.ui.CustomAttributeTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>className</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>classPK</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>editable</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>name</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>custom-attribute-list</name> + <tag-class>com.liferay.taglib.ui.CustomAttributeListTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>className</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>classPK</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>editable</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>ignoreAttributeNames</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>custom-attributes-available</name> + <tag-class>com.liferay.taglib.ui.CustomAttributesAvailableTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>className</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>classPK</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>companyId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>ignoreAttributeNames</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>editable</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>ddm-template-selector</name> + <tag-class>com.liferay.taglib.ui.DDMTemplateSelectorTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>classNameId</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>displayStyle</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>displayStyleGroupId</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>displayStyles</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>icon</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>refreshURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showEmptyOption</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>diff</name> + <tag-class>com.liferay.taglib.ui.DiffTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>diffResults</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>sourceName</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>targetName</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>diff-html</name> + <tag-class>com.liferay.taglib.ui.DiffHtmlTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>diffHtmlResults</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>discussion</name> + <tag-class>com.liferay.taglib.ui.DiscussionTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>assetEntryVisible</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>className</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>classPK</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>formAction</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>formName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>hideControls</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>permissionClassName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>permissionClassPK</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>ratingsEnabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>redirect</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Deprecated as of 6.2.0, with no direct replacement</description> + <name>subject</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>userId</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates an error message to display to the user.</description> + <name>error</name> + <tag-class>com.liferay.taglib.ui.ErrorTag</tag-class> + <tei-class>com.liferay.taglib.ui.ErrorTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <description>A class for the exception.</description> + <name>exception</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The name of a field on which to focus the error message.</description> + <name>focusField</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A key to place in the <![CDATA[<code>SessionErrors</code>]]> object to trigger the error message.</description> + <name>key</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Explicit message text or a language key name from which to derive text for the message.</description> + <name>message</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>rowBreak</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to translate the message into the user's language. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>translateMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + </tag> + <tag> + <name>error-marker</name> + <tag-class>com.liferay.taglib.ui.ErrorMarkerTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>key</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>value</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a flag icon that lets users report inappropriate content.</description> + <name>flags</name> + <tag-class>com.liferay.taglib.ui.FlagsTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>The flagged asset's Java class name.</description> + <name>className</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The flagged asset's entry ID.</description> + <name>classPK</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The flagged asset's title.</description> + <name>contentTitle</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to show message text as a label next to the flag icon or as a tooltip. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Text to display next to the flag icon. The default text is <![CDATA[<code>Flag</code>]]>.</description> + <name>message</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The user ID of the user who flagged the asset.</description> + <name>reportedUserId</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>flash</name> + <tag-class>com.liferay.taglib.ui.FlashTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>align</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>allowFullScreen</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>allowScriptAccess</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>base</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>bgcolor</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>devicefont</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>flashvars</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>height</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>loop</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>menu</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>movie</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>play</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>quality</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>salign</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>scale</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>swliveconnect</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>version</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>width</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>wmode</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a navigable form for multiple section forms. It's default navigation is a side navigation box with links to each section. But the navigation can be configured as a progressive step navigation positioned above the form or as vertically stacked accordion style sections that expand when clicked.</description> + <name>form-navigator</name> + <tag-class>com.liferay.taglib.ui.FormNavigatorTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A URL for the form's cancel button.</description> + <name>backURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The name of each category in the form.</description> + <name>categoryNames</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The name of each section within a category.</description> + <name>categorySections</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A type of navigation to be used. Options are <![CDATA[<code>steps</code>]]> and <![CDATA[<code>panel</code>]]>. The default display style is side navigation.</description> + <name>displayStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A name for the form.</description> + <name>formName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>HTML to append to the navigator. Examples include alternate form buttons, form instructions, or information about the form.</description> + <name>htmlBottom</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>HTML to prepend to the navigator.</description> + <name>htmlTop</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A path to the <![CDATA[<code>formSection.jsp</code>]]> file's folder <![CDATA[<code>/path/to/jsp/folder/</code>]]>.</description> + <name>jspPath</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to show the <![CDATA[<code>Submit</code>]]> and <![CDATA[<code>Cancel</code>]]> buttons. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>showButtons</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + </tag> + <tag> + <name>group-search</name> + <tag-class>com.liferay.taglib.ui.GroupSearchTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>groupParams</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletURL</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>rowChecker</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a header that displays its text above a horizontal rule accompanied by a configurable back URL button.</description> + <name>header</name> + <tag-class>com.liferay.taglib.ui.HeaderTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Text to display on mouse over of the back URL. The default value is <![CDATA[<code>Back</code>]]>.</description> + <name>backLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL for navigating back to.</description> + <name>backURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A CSS class for styling the header component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to escape the header's XML tags. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>escapeXml</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether to translate the header's <![CDATA[<code>title</code>]]> into the localized language. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>localizeTitle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether to display the back URL. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>showBackURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A title to display as the header text.</description> + <name>title</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a fully configurable icon that provides access to current Liferay theme icons.</description> + <name>icon</name> + <tag-class>com.liferay.taglib.ui.IconTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A value for the <![CDATA[<code>alt</code>]]> attribute of the embedded <![CDATA[<code>img</code>]]> tag.</description> + <name>alt</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A role for assistive technologies to interpret for HTML elements that have been used for something other than their intended purpose. For example, the <![CDATA[<code><p></code>]]> tag could be used for something other than a paragraph.</description> + <name>ariaRole</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A CSS class for styling the component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Miscellaneous data to be stored via a map. This data is not shared with the browser. The map holds key value pairs of type <![CDATA[<code><String, Object></code>]]>.</description> + <name>data</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.Map</type> + </attribute> + <attribute> + <description>An icon from a Bootstrap icon CSS Class. Note that any image for the <![CDATA[<code>image</code>]]> attribute takes precedence. Icon CSS classes to specify for this attribute can be found at <![CDATA[<a href="http://marcoceppi.github.io/bootstrap-glyphicons/" >http://marcoceppi.github.io/bootstrap-glyphicons/</a>]]>.</description> + <name>iconCssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An ID for the component instance.</description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An image for the icon, from the current theme. The value can be the filename prefix of any image file in the theme's <![CDATA[<code>common</code>]]> image folder. This image takes precedence over any icon value set via the <![CDATA[<code>iconCssClass</code>]]> attribute.</description> + <name>image</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An icon to display on mouse over of the component. The icon image comes from the current theme. The value can be the filename prefix of any image file in the theme's <![CDATA[<code>common</code>]]> image folder.</description> + <name>imageHover</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to display the <![CDATA[<code>message</code>]]> attribute's value as the icon's label.</description> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A language to associate with the icon, to assist search engines and web browsers in finding and rendering the icon appropriately.</description> + <name>lang</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A CSS class for styling the icon's URL.</description> + <name>linkCssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to translate the icon's <![CDATA[<code>message</code>]]> into the user's language.</description> + <name>localizeMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Text to be displayed for the icon on mouse over.</description> + <name>message</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An HTTP request method. Possible values are <![CDATA[<code>get</code>]]> and <![CDATA[<code>post</code>]]>.</description> + <name>method</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A function to be called on a user clicking the icon.</description> + <name>onClick</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The location of an image file to use in the icon.</description> + <name>src</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The location of an image file to use on mouse over of the icon. This value takes precedence over the <![CDATA[<code>imageHover</code>]]> attribute. This image takes precedence over icons set with the <![CDATA[<code>imageHover</code>]]> attribute.</description> + <name>srcHover</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A target window in which to open the URL. The default value is <![CDATA[<code>self</code>]]>. Possible values are <![CDATA[<code>blank</code>]]>, <![CDATA[<code>self</code>]]>, <![CDATA[<code>parent</code>]]>, <![CDATA[<code>top</code>]]>, and a unique frame's name.</description> + <name>target</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to use a tooltip. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>toolTip</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A URL to navigate to when the icon is clicked.</description> + <name>url</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to open the URL in a dialog window. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>useDialog</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + </tag> + <tag> + <description>Creates an icon to associate with deactivating an item.</description> + <name>icon-deactivate</name> + <tag-class>com.liferay.taglib.ui.IconDeactivateTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Whether to display a message on the icon's label on mouse over of the icon. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A URL navigated to when the icon is clicked.</description> + <name>url</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a configurable icon to associate with deleting or removing an item.</description> + <name>icon-delete</name> + <tag-class>com.liferay.taglib.ui.IconDeleteTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Text to use in place of the text from the default deletion confirmation message language key <![CDATA[<code>are-you-sure-you-want-to-delete-this</code>]]>. If the <![CDATA[<code>trash</code>]]> attribute is set to <![CDATA[<code>true</code>]]>, no confirmation message is shown.</description> + <name>confirmation</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A CSS class for styling the component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An ID for the component instance.</description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An image for the icon, from the current theme. The value can be the filename prefix of any image file in the theme's <![CDATA[<code>common</code>]]> image folder. The image takes precedence over any default icon images.</description> + <name>image</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to display the <![CDATA[<code>message</code>]]> attribute's value as the icon's label. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>label</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Text to display on mouse over of the icon.</description> + <name>message</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An HTTP request method to invoke. Possible values are <![CDATA[<code>get</code>]]> and <![CDATA[<code>post</code>]]>.</description> + <name>method</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to use the trash icon instead of the remove icon. The default value is<![CDATA[<code>false</code>]]>.</description> + <name>trash</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A URL navigated to when the icon is clicked.</description> + <name>url</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a help icon that displays a custom message as a tooltip on mouse over of the help icon.</description> + <name>icon-help</name> + <tag-class>com.liferay.taglib.ui.IconHelpTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Text to be displayed on mouse over of the icon.</description> + <name>message</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a list of icons from a list of child components.</description> + <name>icon-list</name> + <tag-class>com.liferay.taglib.ui.IconListTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Whether to render the icon list when there is only one child component. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>showWhenSingleIcon</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + </tag> + <tag> + <description>Creates an icon menu from a list of child components.</description> + <name>icon-menu</name> + <tag-class>com.liferay.taglib.ui.IconMenuTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A CSS class for styling the component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A position from which to pop up the icon menu dialog in relation to the trigger. The default direction is <![CDATA[<code>left</code>]]>. Possible values are <![CDATA[<code>up</code>]]>, <![CDATA[<code>down</code>]]>, <![CDATA[<code>left</code>]]> or <![CDATA[<code>right</code>]]>.</description> + <name>direction</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to disable the icon menu.</description> + <name>disabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether to extend the icon menu trigger by wrapping it in a button. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>extended</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>The location of an image file to use in the icon.</description> + <name>icon</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An ID for the component instance.</description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to translate the message to the user's language. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>localizeMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>The number of items to show in the icon menu before scrolling. The default value is 15.</description> + <name>maxDisplayItems</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>Text to display next to the icon menu trigger. The default value is <![CDATA[<code>actions</code>]]>.</description> + <name>message</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to add the <![CDATA[<code>select</code>]]> CSS class to the icon menu. If set to <![CDATA[<code>true</code>]]>, the selected icon is added to the icon menu's trigger when the icon is selected. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>select</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether to extend the icon menu by default. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>showExpanded</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether to show an arrow, indicating a popup dialog, next to the icon menu's trigger icon. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>showArrow</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether to show the icon menu when there is only one icon. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>showWhenSingleIcon</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A CSS class for styling the trigger for the icon menu. The default value is <![CDATA[<code>btn btn-default</code>]]>.</description> + <name>triggerCssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the icon menu drop-down caret points to the direction set by the <![CDATA[<code>direction</code>]]> attribute.</description> + <name>useIconCaret</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + </tag> + <tag> + <name>input-asset-links</name> + <tag-class>com.liferay.taglib.ui.InputAssetLinksTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>assetEntryId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>className</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>classPK</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a configurable input checkbox.</description> + <name>input-checkbox</name> + <tag-class>com.liferay.taglib.ui.InputCheckBoxTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A CSS class for styling the component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the checkbox is selected by default.</description> + <name>defaultValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether the checkbox is disabled.</description> + <name>disabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A name for the checkbox's form.</description> + <name>formName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An ID for the component instance.</description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A function to be called on a user clicking the checkbox.</description> + <name>onClick</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A variable name for the component.</description> + <name>param</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a date input field that displays a calendar for date selection.</description> + <name>input-date</name> + <tag-class>com.liferay.taglib.ui.InputDateTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Whether the date field gets focus by default. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>autoFocus</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A CSS class for styling the component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A variable name to refer to the day of the component.</description> + <name>dayParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A day value to display in the input field.</description> + <name>dayValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>Whether to disable the namespace for the component. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>disableNamespace</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether to disable the input field. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>disabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A day to set as the first day of the week. The default value is <![CDATA[<code>Calendar.SUNDAY - 2</code>]]>.</description> + <name>firstDayOfWeek</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A name for the date input's form.</description> + <name>formName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A variable name to refer to the combined month and year of the component.</description> + <name>monthAndYearParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A variable name to refer to the month of the component.</description> + <name>monthParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The numerical value for a month to display in the input field. Integer values for the month start with <![CDATA[<code>0</code>]]>.</description> + <name>monthValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A name for the date input.</description> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the component's values can be set to null.</description> + <name>nullable</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A variable name to refer to the year of the component.</description> + <name>yearParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A year value to display in the input field.</description> + <name>yearValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + </tag> + <tag> + <description>Creates an input field for editing rich text.</description> + <name>input-editor</name> + <tag-class>com.liferay.taglib.ui.InputEditorTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A map of configuration parameters. The map holds key value pairs of type <![CDATA[<code><String, String></code>]]>.</description> + <name>configParams</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.Map</type> + </attribute> + <attribute> + <description>The ID of a language for the input editor's text.</description> + <name>contentsLanguageId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A CSS class for styling the component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>editorImpl</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>inlineEdit</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>inlineEditSaveURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A map of configuration parameters. The map holds key value pairs of <![CDATA[<code><String, String></code>]]>.</description> + <name>fileBrowserParams</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.Map</type> + </attribute> + <attribute> + <name>height</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>initMethod</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A name for the input editor. The default value is <![CDATA[<code>editor</code>]]>.</description> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A function to be called when the input editor loses focus.</description> + <name>onBlurMethod</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A function to be called on a change in the input editor.</description> + <name>onChangeMethod</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A function to be called when the input editor gets focus.</description> + <name>onFocusMethod</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the field for the input editor is resizable. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>resizable</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether to skip loading resources necessary for the CKEditor. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>skipEditorLoading</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A toolbar for the input editor. The default value is <![CDATA[<code>liferay</code>]]>. Possible values are <![CDATA[<code>bbcode</code>]]>, <![CDATA[<code>creole</code>]]>, <![CDATA[<code>editInPlace</code>]]>, <![CDATA[<code>email</code>]]>, <![CDATA[<code>liferay</code>]]>, <![CDATA[<code>liferayArticle</code>]]>, <![CDATA[<code>phone</code>]]>, <![CDATA[<code>simple</code>]]>, and <![CDATA[<code>tablet</code>]]>.</description> + <name>toolbarSet</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>width</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>input-field</name> + <tag-class>com.liferay.taglib.ui.InputFieldTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>autoFocus</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>autoSize</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>bean</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>dateTogglerCheckboxLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>defaultLanguageId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>defaultValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>disabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>field</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>fieldParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>formName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>format</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>ignoreRequestValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>languageId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>model</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>placeholder</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>input-localized</name> + <tag-class>com.liferay.taglib.ui.InputLocalizedTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>autoFocus</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>autoSize</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>availableLocales</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>defaultLanguageId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>disabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>displayWidth</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>formName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>ignoreRequestValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>languageId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>maxLength</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>name</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>type</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>xml</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <dynamic-attributes>true</dynamic-attributes> + </tag> + <tag> + <description>Creates an input move boxes component comprised of two columns of key value pairs that can be rearranged.</description> + <name>input-move-boxes</name> + <tag-class>com.liferay.taglib.ui.InputMoveBoxesTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A CSS class for styling the component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A name for the left box.</description> + <name>leftBoxName</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A list of key value pairs for the left box.</description> + <name>leftList</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.List</type> + </attribute> + <attribute> + <description>A function to be called on a change in selection in the left list.</description> + <name>leftOnChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the left list can be reordered. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>leftReorder</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A title to display at the top of the right box.</description> + <name>leftTitle</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A name for the right box.</description> + <name>rightBoxName</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A list of key value pairs for the right box.</description> + <name>rightList</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.List</type> + </attribute> + <attribute> + <description>A function to be called on a change in selection in the right list.</description> + <name>rightOnChange</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the right list can be reordered. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>rightReorder</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A title to display at the top of the right box.</description> + <name>rightTitle</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>input-permissions</name> + <tag-class>com.liferay.taglib.ui.InputPermissionsTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>formName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>modelName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>input-permissions-params</name> + <tag-class>com.liferay.taglib.ui.InputPermissionsParamsTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>modelName</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>input-repeat</name> + <tag-class>com.liferay.taglib.ui.InputRepeatTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>event</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>input-resource</name> + <tag-class>com.liferay.taglib.ui.InputResourceTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>title</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>url</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>input-scheduler</name> + <tag-class>com.liferay.taglib.ui.InputSchedulerTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <description>Creates a configurable search box.</description> + <name>input-search</name> + <tag-class>com.liferay.taglib.ui.InputSearchTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Whether the search field gets focus by default. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>autoFocus</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A text value for the search button's label. The default value is <![CDATA[<code>Search</code>]]>.</description> + <name>buttonLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A CSS class for styling the component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An ID for the component instance. The default value is <![CDATA[<code>displayTerms.KEYWORDS</code>]]>.</description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A name for the search box. The default value is <![CDATA[<code>displayTerms.KEYWORDS</code>]]>.</description> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Placeholder text for the search field. The default value is the value of the <![CDATA[<code>buttonLabel</code>]]> attribute.</description> + <name>placeholder</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to show the search button. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>showButton</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A title for the search box.</description> + <name>title</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to use a namespace with the search button. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>useNamespace</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + </tag> + <tag> + <description>Creates a select input component with yes or no options.</description> + <name>input-select</name> + <tag-class>com.liferay.taglib.ui.InputSelectTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A CSS class for styling the component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to select <![CDATA[<code>yes</code>]]> as the input's default value.</description> + <name>defaultValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether to disable input.</description> + <name>disabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A name for the input select's form.</description> + <name>formName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A variable name for the component.</description> + <name>param</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a configurable text area input field.</description> + <name>input-textarea</name> + <tag-class>com.liferay.taglib.ui.InputTextAreaTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A CSS class for styling the component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Text to display in the text area.</description> + <name>defaultValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to disable input. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>disabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A variable name for the component.</description> + <name>param</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a time input field that provides a scrollable dropdown list of hours, in intervals designated by the <![CDATA[<code>minuteInterval</code>]]> attribute.</description> + <name>input-time</name> + <tag-class>com.liferay.taglib.ui.InputTimeTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>The name of the AM/PM parameter for the time input. An acceptable value is <![CDATA[<code>ampm</code>]]>.</description> + <name>amPmParam</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A time to AM or PM. Acceptable values are <![CDATA[<code>0</code>]]> for AM and <![CDATA[<code>1</code>]]> for PM. The default value is <![CDATA[<code>0</code>]]>.</description> + <name>amPmValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A CSS class for styling the time input.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A date parameter for the time input. An acceptable value is <![CDATA[<code>date</code>]]>.</description> + <name>dateParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A date to associate with the time displayed.</description> + <name>dateValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.util.Date</type> + </attribute> + <attribute> + <description>Whether the input field is disabled.</description> + <name>disabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>The name of the hour parameter for the component. An acceptable value is <![CDATA[<code>hour</code>]]>.</description> + <name>hourParam</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An hour value for the time displayed. The default value is <![CDATA[<code>12</code>]]>.</description> + <name>hourValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A minute interval displayed in the input. The default value is <![CDATA[<code>30</code>]]>.</description> + <name>minuteInterval</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>The name of the minute parameter for the component. An acceptable value is <![CDATA[<code>minute</code>]]>.</description> + <name>minuteParam</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A minute value for the time displayed. The default value is <![CDATA[<code>00</code>]]>.</description> + <name>minuteValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A name for the time input.</description> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a configurable timezone drop-down menu.</description> + <name>input-time-zone</name> + <tag-class>com.liferay.taglib.ui.InputTimeZoneTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Whether the field gets focus by default.</description> + <name>autoFocus</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A CSS class for styling the component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to consider daylight savings for the times. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>daylight</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether the field is disabled.</description> + <name>disabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A style number corresponding to the time zone. A value of <![CDATA[<code>0</code>]]> displays the time zone's abbreviated name and a value of <![CDATA[<code>1</code>]]> displays its full name, e.g. "Pacific Standard Time." The default value is <![CDATA[<code>0</code>]]>.</description> + <name>displayStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A name for the component.</description> + <name>name</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the times can be null.</description> + <name>nullable</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>The ID of a time zone to associate with the component. For example, setting the value to <![CDATA[<code>PST</code>]]> associates the component with the Pacific Standard Time zone.</description> + <name>value</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>journal-article</name> + <tag-class>com.liferay.taglib.ui.JournalArticleTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>articleId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>articlePage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>articleResourcePrimKey</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>groupId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>languageId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showAvailableLocales</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showTitle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>templateId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>xmlRequest</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>journal-content-search</name> + <tag-class>com.liferay.taglib.ui.JournalContentSearchTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>showListed</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>targetPortletId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>type</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>language</name> + <tag-class>com.liferay.taglib.ui.LanguageTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>displayCurrentLocale</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>displayStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>formAction</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>formName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>languageId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>languageIds</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>logo-selector</name> + <tag-class>com.liferay.taglib.ui.LogoSelectorTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>currentLogoURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>defaultLogoURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>editLogoURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>imageId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>logoDisplaySelector</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showBackground</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>membership-policy-error</name> + <tag-class>com.liferay.taglib.ui.MembershipPolicyErrorTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <description>Creates a message to display to the user.</description> + <name>message</name> + <tag-class>com.liferay.taglib.ui.MessageTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Arguments for the language key, if the language key is configured to recieve arguments.</description> + <name>arguments</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The name of a language key from which to derive the message to be displayed.</description> + <name>key</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to translate the language key value into the user's language. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>localizeKey</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Whether to translate the arguments into the user's language. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>translateArguments</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <name>unicode</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + </tag> + <tag> + <name>my-sites</name> + <tag-class>com.liferay.taglib.ui.MySitesTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>classNames</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>includeControlPanel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>max</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>navigation</name> + <tag-class>com.liferay.taglib.ui.NavigationTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>bulletStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>displayStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>headerType</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>includedLayouts</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>nestedChildren</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>preview</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>rootLayoutLevel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>rootLayoutType</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a page iterator for paginating through lists of items.</description> + <name>page-iterator</name> + <tag-class>com.liferay.taglib.ui.PageIteratorTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Which page of items to display (e.g., first, second, third, etc.).</description> + <name>cur</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A variable name to refer to the <![CDATA[<code>cur</code>]]> value of the component.</description> + <name>curParam</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The number of items to display per page.</description> + <name>delta</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>Whether the user can choose the number of items displayed per page. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>deltaConfigurable</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A variable name to refer to the delta value of the component.</description> + <name>deltaParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A name for the form.</description> + <name>formName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An ID for the component instance.</description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>JavaScript to be called when the <![CDATA[<code>first</code>]]>, <![CDATA[<code>previous</code>]]>, <![CDATA[<code>next</code>]]>, or <![CDATA[<code>last</code>]]> links are clicked if the URL property is not set.</description> + <name>jsCall</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A maximum number of pages to iterate through.</description> + <name>maxPages</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A target for the <![CDATA[<code>first</code>]]>, <![CDATA[<code>previous</code>]]>, <![CDATA[<code>next</code>]]>, and <![CDATA[<code>last</code>]]> link buttons.</description> + <name>target</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The total number of items in the iterator.</description> + <name>total</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A type of iterator to display. Options are <![CDATA[<code>approximate</code>]]>, <![CDATA[<code>article</code>]]>, <![CDATA[<code>more</code>]]>, and <![CDATA[<code>regular</code>]]>.</description> + <name>type</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A base URL for the iterator. Parameters are added to and removed from this URL as the user navigates through pages.</description> + <name>url</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a collapsible panel for housing content.</description> + <name>panel</name> + <tag-class>com.liferay.taglib.ui.PanelTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Whether the panel can be collapsed. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>collapsible</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A CSS class for styling the component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A default state for the component. Possible values are <![CDATA[<code>open</code>]]> and any string other than open. Any string other than <![CDATA[<code>open</code>]]> collapses the panel. The default value is <![CDATA[<code>open</code>]]>.</description> + <name>defaultState</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the panel is extended. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>extended</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Text to display as a help tool tip on mouse over of the panel's help icon.</description> + <name>helpMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An icon to display next to the panel's title. The icon can be specified using the name of one of the Bootstrap icon CSS classes found at <![CDATA[<a href="http://marcoceppi.github.io/bootstrap-glyphicons/" >http://marcoceppi.github.io/bootstrap-glyphicons/</a>]]>.</description> + <name>iconCssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An ID for the component instance.</description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The ID of the component that contains the panel. If a <![CDATA[<code>liferay-ui:panel-container</code>]]> is used as the container for the panel, its ID is used as the value for the <![CDATA[<code>parentID</code>]]>.</description> + <name>parentId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to remember the component's state and persist it to the database. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>persistState</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A state for the component. Possible values are <![CDATA[<code>open</code>]]> and any string other than open. Any string other than <![CDATA[<code>open</code>]]> collapses the panel.</description> + <name>state</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A title to display at the top of the panel.</description> + <name>title</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a collapsible container to house <![CDATA[<code>liferay-ui:panel</code>]]> components.</description> + <name>panel-container</name> + <tag-class>com.liferay.taglib.ui.PanelContainerTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Whether only one panel can be shown at a time. As one panel is opened, the others close, creating an accordian effect. The default value is <![CDATA[<code>false<code>]]>.</description> + <name>accordion</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A CSS class for styling the component.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to extend the interface with additional styling. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>extended</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>An ID for the component instance.</description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to remember the component's state and persist it to the database. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>persistState</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + </tag> + <tag> + <name>param</name> + <tag-class>com.liferay.taglib.util.ParamTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>name</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>value</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Renders a PNG image with the source given for the <![CDATA[<code>image</code>]]> attribute.</description> + <name>png-image</name> + <tag-class>com.liferay.taglib.ui.PngImageTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>The height of the image in pixels. A possible value would be <![CDATA[<code>16</code>]]>. <![CDATA[<code>px</code>]]> is then appended to the end of the value.</description> + <name>height</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>The location of a PNG image file to use.</description> + <name>image</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The height of the image in pixels. A possible value would be <![CDATA[<code>16</code>]]>. <![CDATA[<code>px</code>]]> is then appended to the end of the value.</description> + <name>width</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + </tag> + <tag> + <name>progress</name> + <tag-class>com.liferay.taglib.ui.ProgressTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>height</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>id</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>message</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>sessionKey</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>updatePeriod</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>ratings</name> + <tag-class>com.liferay.taglib.ui.RatingsTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>className</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>classPK</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>numberOfStars</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>ratingsEntry</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>ratingsStats</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>type</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>url</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>ratings-score</name> + <tag-class>com.liferay.taglib.ui.RatingsScoreTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>score</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>restore-entry</name> + <tag-class>com.liferay.taglib.ui.RestoreEntryTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>duplicateEntryAction</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>overrideMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>renameMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>restoreEntryAction</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a clickable link and/or icon to an RSS feed document.</description> + <name>rss</name> + <tag-class>com.liferay.taglib.ui.RSSTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A default maximum number of items to display. The default value is <![CDATA[<code>20</code>]]>.</description> + <name>delta</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A default style to display.</description> + <name>displayStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A default format for the RSS feed. Options are <![CDATA[<code>atom_1.0</code>]]>, <![CDATA[<code>rss_1.0</code>]]>, and <![CDATA[<code>rss_2.0</code>]]>.</description> + <name>feedType</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A message to display next to the RSS icon.</description> + <name>message</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A name for the RSS feed.</description> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL from which to retrieve feed information.</description> + <name>resourceURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The URL for an RSS feed file.</description> + <name>url</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a configuration component for users to define RSS settings, such as how many articles to display.</description> + <name>rss-settings</name> + <tag-class>com.liferay.taglib.ui.RSSSettingsTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A default maximum number of items to display. The default value is <![CDATA[<code>20</code>]]>.</description> + <name>delta</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A default style to display.</description> + <name>displayStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Available RSS display styles from which the user can choose. Options are <![CDATA[<code>abstract</code>]]>, <![CDATA[<code>full-content</code>]]>, and <![CDATA[<code>title</code>]]>.</description> + <name>displayStyles</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether users are able to subscribe. Default value is <![CDATA[<code>false</code>]]>.</description> + <name>enabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A default format for the RSS feed. Options are <![CDATA[<code>atom_1.0</code>]]>, <![CDATA[<code>rss_1.0</code>]]>, and <![CDATA[<code>rss_2.0</code>]]>.</description> + <name>feedType</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A name for the component.</description> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the RSS feed has a name. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>nameEnabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + </tag> + <tag> + <description>Creates a search form, with an additional select input to set the scope of the search.</description> + <name>search</name> + <tag-class>com.liferay.taglib.ui.SearchTag</tag-class> + <body-content>JSP</body-content> + </tag> + <tag> + <description>Creates a grid for displaying a list of objects and their properties.</description> + <name>search-container</name> + <tag-class>com.liferay.taglib.ui.SearchContainerTag</tag-class> + <tei-class>com.liferay.taglib.ui.SearchContainerTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <description>A variable for the search container's pagination. Different pagination variables ensure independent pagination when multiple search containers are on a JSP.</description> + <name>curParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The number of items to show on each search container page.</description> + <name>delta</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>The <![CDATA[<code>delta</code>]]> attribute as configurable by users.</description> + <name>deltaConfigurable</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>deltaParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>displayTerms</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A message displayed when the search container is empty.</description> + <name>emptyResultsMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>headerNames</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>hover</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>iteratorURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>orderByCol</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>orderByColParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>orderByComparator</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An order type for the columns, either ascending or descending. Values are <![CDATA[<code>asc</code>]]> or <![CDATA[<code>desc</code>]]>.</description> + <name>orderByType</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>orderByTypeParam</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Inserts a checkbox column in the search container. Value must be a <![CDATA[<code>RowChecker</code>]]> object.</description> + <name>rowChecker</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>searchContainer</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>searchTerms</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The total number of objects in the search container.</description> + <name>total</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A variable name for the results of the <![CDATA[<code>total</code>]]> attribute. The default is <![CDATA[<code>total</code>]]>.</description> + <name>totalVar</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A variable name for the <![CDATA[<code>SearchContainer</code>]]> object. The default is <![CDATA[<code>searchContainer</code>]]>.</description> + <name>var</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>search-container-column-button</name> + <tag-class>com.liferay.taglib.ui.SearchContainerColumnButtonTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>align</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>colspan</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>href</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>index</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>valign</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a date column in a search container.</description> + <name>search-container-column-date</name> + <tag-class>com.liferay.taglib.ui.SearchContainerColumnDateTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A horizontal alignment for the column contents. The default is <![CDATA[<code>left</code>]]>.</description> + <name>align</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The number of columns to span. The default is <![CDATA[<code>1</code>]]>.</description> + <name>colspan</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A CSS class for styling the column.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL for the items in the column.</description> + <name>href</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>index</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A name for the column.</description> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to set the column as sortable. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>orderable</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>An object's property by which to sort the column.</description> + <name>orderableProperty</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A property to request from the row object.</description> + <name>property</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A vertical alignment for the column contents. The default is <![CDATA[<code>middle</code>]]>.</description> + <name>valign</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A value for the column.</description> + <name>value</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a column in a search container with the contents of a JSP file.</description> + <name>search-container-column-jsp</name> + <tag-class>com.liferay.taglib.ui.SearchContainerColumnJSPTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A horizontal alignment for the column contents. The default is <![CDATA[<code>left</code>]]>.</description> + <name>align</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The number of columns to span. The default is <![CDATA[<code>1</code>]]>.</description> + <name>colspan</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A CSS class for styling the column.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>index</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The JSP file's location.</description> + <name>path</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>valign</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a column in a search container for the workflow status.</description> + <name>search-container-column-status</name> + <tag-class>com.liferay.taglib.ui.SearchContainerColumnStatusTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A horizontal alignment for the column contents. The default is <![CDATA[<code>left</code>]]>.</description> + <name>align</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The number of columns to span. The default is <![CDATA[<code>1</code>]]>.</description> + <name>colspan</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A CSS class for styling the column.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL for the column's contents.</description> + <name>href</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>index</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to set the column as sortable. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>orderable</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>An object's property by which to sort the column.</description> + <name>orderableProperty</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An object's property to use for the column.</description> + <name>property</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A vertical alignment for the column contents. The default is <![CDATA[<code>middle</code>]]>.</description> + <name>valign</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A workflow status for the item.</description> + <name>status</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>statusByUserId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>statusDate</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a text column in a search container.</description> + <name>search-container-column-text</name> + <tag-class>com.liferay.taglib.ui.SearchContainerColumnTextTag</tag-class> + <tei-class>com.liferay.taglib.ui.SearchContainerColumnTextTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <description>A horizontal alignment for the column contents.</description> + <name>align</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A string buffer variable for constructing a URL in a scriptlet.</description> + <name>buffer</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The number of columns to span. The default is <![CDATA[<code>1</code>]]>.</description> + <name>colspan</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + <attribute> + <description>A CSS class for styling the column.</description> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>href</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>index</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>name</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to set the column as sortable. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>orderable</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>An object's property by which to sort the column.</description> + <name>orderableProperty</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>property</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>target</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>title</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to automatically translate values. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>translate</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A vertical alignment for the column contents. The default is <![CDATA[<code>middle</code>]]>.</description> + <name>valign</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>value</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>The list of objects to display in the search container.</description> + <name>search-container-results</name> + <tag-class>com.liferay.taglib.ui.SearchContainerResultsTag</tag-class> + <tei-class>com.liferay.taglib.ui.SearchContainerResultsTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <description>A list of objects to display in the search container.</description> + <name>results</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A variable to use for the results.</description> + <name>resultsVar</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Deprecated as of 6.2.0, replaced by liferay-ui:search-container#total</description> + <name>total</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Deprecated as of 6.2.0, replaced by liferay-ui:search-container#totalVar</description> + <name>totalVar</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates rows in the search container for each object returned by <![CDATA[<code>liferay-ui:search-container-results</code>]]>.</description> + <name>search-container-row</name> + <tag-class>com.liferay.taglib.ui.SearchContainerRowTag</tag-class> + <tei-class>com.liferay.taglib.ui.SearchContainerRowTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <name>bold</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The class name of the objects to display in rows.</description> + <name>className</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The returned model instances as HTML escaped.</description> + <name>escapedModel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A variable name to use for the rows' index.</description> + <name>indexVar</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A property to use as the primary key for the object type in the <![CDATA[<code>className</code>]]> attribute.</description> + <name>keyProperty</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A variable name to use for each object as the search container iterates through the objects returned by <![CDATA[<code>liferay-ui:search-container-results</code>]]>.</description> + <name>modelVar</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A model property to use as the row ID.</description> + <name>rowIdProperty</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A variable name to use for the rows.</description> + <name>rowVar</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>servletContext</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>stringKey</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates parameters for rows in the search container. The <![CDATA[<code>liferay-ui:search-container-row</code>]]> tag is required.</description> + <name>search-container-row-parameter</name> + <tag-class>com.liferay.taglib.ui.SearchContainerRowParameterTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>A name for the row parameter.</description> + <name>name</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A value for the row parameter.</description> + <name>value</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>search-form</name> + <tag-class>com.liferay.taglib.ui.SearchFormTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>page</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>searchContainer</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>servletContext</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showAddButton</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a search results page iterator with an optional paginator.</description> + <name>search-iterator</name> + <tag-class>com.liferay.taglib.ui.SearchIteratorTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Whether to add a <![CDATA[<code>liferay-ui:search-paginator</code>]]> to the search container. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>paginate</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>All configurable properties of the search container, such as <![CDATA[<code>cur</code>]]> and <![CDATA[<code>curParam</code>]]>. These properties are set with <![CDATA[<code>searchContainer.getCur()</code>]]> and <![CDATA[<code>searchContainer.getCurParam()</code>]]> respectively.</description> + <name>searchContainer</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A type of iterator to display. Options are <![CDATA[<code>approximate</code>]]>, <![CDATA[<code>article</code>]]>, <![CDATA[<code>more</code>]]>, and <![CDATA[<code>regular</code>]]>.</description> + <name>type</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a page iterator to paginate through search results</description> + <name>search-paginator</name> + <tag-class>com.liferay.taglib.ui.SearchPaginatorTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>An ID for the component instance.</description> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>All configurable porperties of the search container, such as <![CDATA[<code>cur</code>]]> and <![CDATA[<code>curParam</code>]]>. These properties are set with <![CDATA[<code>searchContainer.getCur()</code>]]> and <![CDATA[<code>searchContainer.getCurParam()</code>]]> respectively.</description> + <name>searchContainer</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A type of iterator to display. Options are <![CDATA[<code>approximate</code>]]>, <![CDATA[<code>article</code>]]>, <![CDATA[<code>more</code>]]>, and <![CDATA[<code>regular</code>]]>.</description> + <name>type</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>search-speed</name> + <tag-class>com.liferay.taglib.ui.SearchSpeedTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>hits</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>searchContainer</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a search instance that can be toggled between basic and advanced search.</description> + <name>search-toggle</name> + <tag-class>com.liferay.taglib.ui.SearchToggleTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Whether the search input field is automatically focused. The default value is <![CDATA[<code>false</code>]]>.</description> + <name>autoFocus</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>A label for the search button such as <![CDATA[<code>Search</code>]]> or <![CDATA[<code>Go</code>]]>.</description> + <name>buttonLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Terms to be used and displayed through the search instance. Term examples include <![CDATA[<code>keywords</code>]]>, <![CDATA[<code>advancedSearch</code>]]>, and <![CDATA[<code>description</code>]]>.</description> + <name>displayTerms</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The component instance's ID.</description> + <name>id</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>width</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>section</name> + <tag-class>com.liferay.taglib.ui.SectionTag</tag-class> + <tei-class>com.liferay.taglib.ui.SectionTei</tei-class> + <body-content>JSP</body-content> + </tag> + <tag> + <name>sites-directory</name> + <tag-class>com.liferay.taglib.ui.SitesDirectoryTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>displayStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>sites</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>social-activities</name> + <tag-class>com.liferay.taglib.ui.SocialActivitiesTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>activities</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>className</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>classPK</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>displayRSSFeed</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>feedDelta</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>feedDisplayStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>feedEnabled</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>feedLink</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>feedLinkMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>feedTitle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>feedType</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>social-bookmark</name> + <tag-class>com.liferay.taglib.ui.SocialBookmarkTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>contentId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>target</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>title</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>type</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>url</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>social-bookmarks</name> + <tag-class>com.liferay.taglib.ui.SocialBookmarksTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>contentId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>displayStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>target</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>title</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>types</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>url</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>staging</name> + <tag-class>com.liferay.taglib.ui.StagingTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>cssClass</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>extended</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>groupId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>icon</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>layoutSetBranchId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>message</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>onlyActions</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>privateLayout</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>selPlid</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showManageBranches</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a success message to display to the user.</description> + <name>success</name> + <tag-class>com.liferay.taglib.ui.SuccessTag</tag-class> + <body-content>empty</body-content> + <attribute> + <description>A key to be placed in the <![CDATA[<code>SessionMessages</code>]]> object to trigger the success message.</description> + <name>key</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Explicit message text or the name of a language key from which to derive the message text.</description> + <name>message</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether to translate the success message into the user's language. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>translateMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + </tag> + <tag> + <name>table-iterator</name> + <tag-class>com.liferay.taglib.ui.TableIteratorTag</tag-class> + <tei-class>com.liferay.taglib.ui.TableIteratorTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <name>bodyPage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>list</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>listType</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>rowBreak</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>rowLength</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>rowPadding</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>rowValign</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>width</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a tabbed UI of section dividers that each house their own content.</description> + <name>tabs</name> + <tag-class>com.liferay.taglib.ui.TabsTag</tag-class> + <body-content>JSP</body-content> + <!-- + values is a reserved property, so we have to use tabsValues instead + --> + <attribute> + <description>A label for the back URL.</description> + <name>backLabel</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL for navigating back to.</description> + <name>backURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A name for the tab's form.</description> + <name>formName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The names of the tabs. Each name must be separated by a comma with no spaces.</description> + <name>names</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A function to be called on a user clicking any of the tabs.</description> + <name>onClick</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A variable for the component.</description> + <name>param</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL to refer to the portlet that contains the component.</description> + <name>portletURL</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Whether the page refreshes when a tab is clicked.</description> + <name>refresh</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>Tab values that must follow the same order as the <![CDATA[<code>names</code>]]> attribute. Each value must be separated by a comma with no spaces.</description> + <name>tabsValues</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A design type for the tabs. Possible values are <![CDATA[<code>tabs</code>]]> and <![CDATA[<code>pills</code>]]>.</description> + <name>type</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL to which all the tabs are linked when clicked. You can also set each tab's URL individually using <![CDATA[<code>url[number]</code>]]> attribute.</description> + <name>url</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>url0</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL to which the second tab is linked when clicked.</description> + <name>url1</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL to which the third tab is linked when clicked</description> + <name>url2</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL to which the fourth tab is linked when clicked</description> + <name>url3</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL to which the fifth tab is linked when clicked</description> + <name>url4</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL to which the sixth tab is linked when clicked</description> + <name>url5</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL to which the seventh tab is linked when clicked</description> + <name>url6</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL to which the eighth tab is linked when clicked</description> + <name>url7</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL to which the ninth tab is linked when clicked</description> + <name>url8</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL to which the tenth tab is linked when clicked</description> + <name>url9</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An active tab from the value given in the attribute <![CDATA[<code>tabsValues</code>]]>. No matter which tab a user selects, the tab given for this value always remains active.</description> + <name>value</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a component that toggles the visibility of the content of the component matching the given <![CDATA[<code>id</code>]]>. Default icons are used as the component's default mechanism for showing and hiding the content.</description> + <name>toggle</name> + <tag-class>com.liferay.taglib.ui.ToggleTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <description>Whether to initially show content by default. The default value is <![CDATA[<code>true</code>]]>.</description> + <name>defaultShowContent</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>boolean</type> + </attribute> + <attribute> + <description>An icon to use as the mechanism for hiding the content. You can specify the location of an image file to use in the icon; otherwise a default icon is used.</description> + <name>hideImage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Text to display as a link for hiding the content. It overrides the <![CDATA[<code>hideImage</code>]]> attribute. Note that the <![CDATA[<code>showMessage</code>]]> attribute must also be configured in order for the hide message to render.</description> + <name>hideMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The ID of a component instance whose content's visibility to toggle.</description> + <name>id</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>An icon to use as the mechanism for showing the content. You can specify the location of an image file to use in the icon; otherwise a default icon is used.</description> + <name>showImage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A link to use as the mechanism for showing the content. The text value of this attribute is used as the link's text. The message takes precedence over showing an image, via the <![CDATA[<code>showImage</code>]]> attribute. If you specify a <![CDATA[<code>showMessage</code>]]> attribute, you should also specify the <![CDATA[<code>hideMessage</code>]]> attribute; a <![CDATA[<code>null</code>]]> is otherwise displayed for the text of the hide link.</description> + <name>showMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>Text to be prefixed to the <![CDATA[<code>Toggle()</code>]]> function that is called to toggle visibility of the content. If this is not configured, a random key is generated and prefixed to the <![CDATA[<code>Toggle()</code>]]> function. For example, a value of <![CDATA[<code>run</code>]]> would result in a function named <![CDATA[<code>runToggle()</code>]]>.</description> + <name>stateVar</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>toggle-area</name> + <tag-class>com.liferay.taglib.ui.ToggleAreaTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>align</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>defaultShowContent</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>hideImage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>hideMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>id</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showImage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>showMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>stateVar</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>toggle-value</name> + <tag-class>com.liferay.taglib.ui.ToggleValueTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>defaultValue</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>id</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <description>Creates a component for users to permanently delete items such as images, articles, etc. from the recycle bin.</description> + <name>trash-empty</name> + <tag-class>com.liferay.taglib.ui.TrashEmptyTag</tag-class> + <body-content>empty</body-content> + <attribute> + <description>A message to display to confirm that the user wants to remove the item(s) from the recycle bin.</description> + <name>confirmMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A message to be used for the <![CDATA[<code>empty-trash</code>]]> button and link.</description> + <name>emptyMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A message to display to give users information about removing items from the recycle bin.</description> + <name>infoMessage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A URL for the <![CDATA[<code>empty-trash</code>]]> button/link.</description> + <name>portletURL</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>The number of items to be removed from the recycle bin.</description> + <name>totalEntries</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + <type>int</type> + </attribute> + </tag> + <tag> + <description>Creates a message confirming items were moved to the recycle bin and presenting an option to restore them.</description> + <name>trash-undo</name> + <tag-class>com.liferay.taglib.ui.TrashUndoTag</tag-class> + <body-content>empty</body-content> + <attribute> + <description>The URL of the undo link.</description> + <name>portletURL</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <description>A redirect URL.</description> + <name>redirect</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>upload-progress</name> + <tag-class>com.liferay.taglib.ui.UploadProgressTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>height</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>id</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>message</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>redirect</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>updatePeriod</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>user-display</name> + <tag-class>com.liferay.taglib.ui.UserDisplayTag</tag-class> + <tei-class>com.liferay.taglib.ui.UserDisplayTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <name>displayStyle</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>url</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>userId</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>userName</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>user-search</name> + <tag-class>com.liferay.taglib.ui.UserSearchTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>portletURL</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>rowChecker</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>userParams</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>webdav</name> + <tag-class>com.liferay.taglib.ui.WebDAVTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>path</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>write</name> + <tag-class>com.liferay.taglib.ui.WriteTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>bean</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>property</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> +</taglib> \ No newline at end of file diff --git a/docroot/WEB-INF/tld/liferay-util.tld b/docroot/WEB-INF/tld/liferay-util.tld new file mode 100644 index 0000000..72a4caf --- /dev/null +++ b/docroot/WEB-INF/tld/liferay-util.tld @@ -0,0 +1,141 @@ +<?xml version="1.0"?> +<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> + +<taglib> + <tlib-version>1.2</tlib-version> + <jsp-version>1.1</jsp-version> + <short-name>liferay-util</short-name> + <uri>http://liferay.com/tld/util</uri> + <tag> + <name>body-bottom</name> + <tag-class>com.liferay.taglib.util.BodyBottomTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>outputKey</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>body-top</name> + <tag-class>com.liferay.taglib.util.BodyTopTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>outputKey</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>buffer</name> + <tag-class>com.liferay.taglib.util.BufferTag</tag-class> + <tei-class>com.liferay.taglib.util.BufferTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <name>var</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>get-url</name> + <tag-class>com.liferay.taglib.util.GetUrlTag</tag-class> + <tei-class>com.liferay.taglib.util.GetUrlTei</tei-class> + <body-content>JSP</body-content> + <attribute> + <name>expires</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>url</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>var</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>html-bottom</name> + <tag-class>com.liferay.taglib.util.HtmlBottomTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>outputKey</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>position</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>html-top</name> + <tag-class>com.liferay.taglib.util.HtmlTopTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>outputKey</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>position</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>include</name> + <tag-class>com.liferay.taglib.util.IncludeTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>page</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>portletId</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>servletContext</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>strict</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>useCustomPage</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>param</name> + <tag-class>com.liferay.taglib.util.ParamTag</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>name</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>value</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + <tag> + <name>whitespace-remover</name> + <tag-class>com.liferay.taglib.util.WhitespaceRemoverTag</tag-class> + <body-content>JSP</body-content> + </tag> +</taglib> \ No newline at end of file diff --git a/docroot/WEB-INF/web.xml b/docroot/WEB-INF/web.xml new file mode 100644 index 0000000..f3ac4e6 --- /dev/null +++ b/docroot/WEB-INF/web.xml @@ -0,0 +1,23 @@ +<?xml version="1.0"?> + +<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> + <context-param> + <param-name>com.sun.faces.expressionFactory</param-name> + <param-value>org.jboss.el.ExpressionFactoryImpl</param-value> + </context-param> + <context-param> + <param-name>javax.faces.PROJECT_STAGE</param-name> + <param-value>Development</param-value> + </context-param> + <context-param> + <param-name>primefaces.THEME</param-name> + <param-value>bootstrap</param-value> + </context-param> + <servlet> + <servlet-name>Faces Servlet</servlet-name> + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> + <load-on-startup>1</load-on-startup> + </servlet> +</web-app> \ No newline at end of file diff --git a/docroot/WEB-INF/weblogic.xml b/docroot/WEB-INF/weblogic.xml new file mode 100644 index 0000000..8190f53 --- /dev/null +++ b/docroot/WEB-INF/weblogic.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> + +<wls:weblogic-web-app + xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd" +> + <wls:container-descriptor> + <wls:prefer-application-packages> + <wls:package-name>com.sun.xml.bind.*</wls:package-name> + <wls:package-name>org.apache.commons.fileupload.*</wls:package-name> + <wls:package-name>org.apache.xerces.*</wls:package-name> + </wls:prefer-application-packages> + <wls:optimistic-serialization>true</wls:optimistic-serialization> + <wls:show-archived-real-path-enabled>true</wls:show-archived-real-path-enabled> + </wls:container-descriptor> + <wls:library-ref> + <wls:library-name>jsf</wls:library-name> + </wls:library-ref> +</wls:weblogic-web-app> \ No newline at end of file diff --git a/docroot/css/.sass-cache/main.css b/docroot/css/.sass-cache/main.css new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/docroot/css/.sass-cache/main.css @@ -0,0 +1 @@ + diff --git a/docroot/css/.sass-cache/main_rtl.css b/docroot/css/.sass-cache/main_rtl.css new file mode 100644 index 0000000..e69de29 diff --git a/docroot/css/main.css b/docroot/css/main.css new file mode 100644 index 0000000..e69de29 diff --git a/docroot/icon.png b/docroot/icon.png new file mode 100644 index 0000000..807b862 Binary files /dev/null and b/docroot/icon.png differ diff --git a/docroot/js/main.js b/docroot/js/main.js new file mode 100644 index 0000000..e69de29 diff --git a/docroot/resources/css/.sass-cache/commentbox.css b/docroot/resources/css/.sass-cache/commentbox.css new file mode 100644 index 0000000..0b3363e --- /dev/null +++ b/docroot/resources/css/.sass-cache/commentbox.css @@ -0,0 +1,218 @@ +.tr-commentbox .ui-separator { + border: 0 !important; + height: 2px !important; + background: #CCC !important; } + +.tr-commentbox .comments * { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + line-height: 1; + font-family: inherit; } + +.tr-commentbox .commentTree { + width: auto; } + +.tr-commentbox .numberButton span { + position: relative; + top: -3px; + left: -4px; } + +.tr-commentbox .ui-editor { + -webkit-transition: all .2s ease-in-out; + -moz-transition: all .2s ease-in-out; + -ms-transition: all .2s ease-in-out; + -o-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; } + +.tr-commentbox .ui-tree-container, .tr-commentbox .ui-treenode-label { + padding-left: 0; } + +.tr-commentbox .comment_editor .ui-editor-toolbar { + display: none; } + +.tr-commentbox .comment_editor-height-hack .ui-editor { + height: 48px !important; } + +.tr-commentbox .ui-tree-container { + overflow: hidden; } + +.tr-commentbox .ui-tree-toggler { + display: none; } + +.tr-commentbox .ui-treenode-leaf-icon { + display: none; } + +.tr-commentbox .ui-treenode-children { + padding: 0 0 0 58px; } + +.tr-commentbox .ui-treenode-children .ui-treenode-children { + padding: 0 0 0 42px; } + +.tr-commentbox .ui-treenode-children .ui-treenode-children .ui-treenode-children .ui-treenode-children .ui-treenode-children { + padding: 0; } + +.tr-commentbox .commentEditorDiv { + display: none; + height: 156px; + width: 602px; } + +.tr-commentbox .commentEditorDivAnswer { + margin-left: 40px; + height: 156px; + width: 602px; } + +.tr-commentbox .treenode-dummy { + display: none; } + +.tr-commentbox .clickedLink { + color: grey !important; + pointer-events: none; + cursor: default; } + +.tr-commentbox .ui-treenode-label.ui-corner-all { + cursor: default; } + +.tr-commentbox .updateRootButton { + display: none; + margin: 10px 0 5px 0; + width: 50%; + min-width: 200px; + max-width: 500px; + background: #ffc62e; + border: 0; + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); } + +/* .tr-commentbox .newIndicator { + width: 5px; + height: 50px; + background: #ffc62e; + border-radius: 1px; + float: left; + margin-right: 5px; + display: none; +} */ +.tr-commentbox .ui-treenode-children .newIndicator { + height: 35px; } + +.tr-commentbox .comments { + position: relative; + font-family: "Helvetica Neue",arial,sans-serif; } + +.tr-commentbox .comments a { + text-decoration: none; + -webkit-transition: color linear .1s; + -moz-transition: color linear .1s; + -ms-transition: color linear .1s; + -o-transition: color linear .1s; + transition: color linear .1s; } + +.tr-commentbox .comment { + margin-top: 5px; + margin-bottom: 5px; + overflow: hidden; } + +.tr-commentbox .username { + color: #2E9FFF; + font-weight: 600; } + +.tr-commentbox .bullet { + font-size: 75%; + color: #CCC; + line-height: 1.4; } + +.tr-commentbox .comment-text { + font-size: 13px; + padding: 2px; } + +.tr-commentbox .comment-text, .tr-commentbox .comment-text div { + text-overflow: ellipsis; + overflow: hidden; + width: 99.5%; } + +.tr-commentbox .comment-text a { + text-decoration: underline; } + +/* .tr-commentbox .avatar { + float: right; + padding-left: 8px; + height: auto; + width: 6%; +} + */ +.tr-commentbox .ui-treenode-children .avatar { + height: auto; + width: 4.2%; } + +.comments-wrapper .avatar a { + display: block; } + +.comments-wrapper .avatar img { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + height: auto; + max-width: 100%; } + +.tr-commentbox .ui-treenode-children .avatar img { + height: auto; + max-width: 100%; } + +/* .tr-commentbox .comment .body { + float: left; +} */ +.tr-commentbox .comment header { + color: #777; + line-height: 16px; + font-size: 12px; + position: relative; } + +.comments .comment header .bullet { + padding: 0 3px; } + +.comments .comment header .info { + font-weight: 400; + font-size: 95%; + color: inherit; } + +.tr-commentbox .comment footer { + font-size: 11px; + line-height: 1.85; + color: #6C6C6C; + margin: 4px 0 0; + clear: both; } + +/* .tr-commentbox .comment footer menu li { + float: left; + list-style-type: none; + margin: 0 7px 0 0; + padding: 0; +} */ +.tr-commentbox .comment footer a { + color: #999; } + +.tr-commentbox .comment footer a:hover { + color: #666; } + +.tr-commentbox .comment menu span:first-child .bullet { + display: none; } + +/* .ui-treenode +{ + margin-bottom: 3.5% !important; +} */ +.ui-editor { + width: 99.9% !important; } + +.noBorders tr, .noBorders td { + background: none !important; + border: none !important; } + +@media screen and (max-height: 575px) { + #rc-imageselect, .g-recaptcha { + transform: scale(0.77); + -webkit-transform: scale(0.77); + transform-origin: 0 0; + -webkit-transform-origin: 0 0; } } + diff --git a/docroot/resources/css/.sass-cache/commentbox_rtl.css b/docroot/resources/css/.sass-cache/commentbox_rtl.css new file mode 100644 index 0000000..600919d --- /dev/null +++ b/docroot/resources/css/.sass-cache/commentbox_rtl.css @@ -0,0 +1 @@ +.tr-commentbox .ui-separator{border:0 !important;height:2px !important;background:#CCC !important;}.tr-commentbox .comments *{margin:0;padding:0;border:0;font-size:100%;line-height:1;font-family:inherit;}.tr-commentbox .commentTree{width:auto;}.tr-commentbox .numberButton span{position:relative;top:-3px;right:-4px;}.tr-commentbox .ui-editor{-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;}.tr-commentbox .ui-tree-container,.tr-commentbox .ui-treenode-label{padding-right:0;}.tr-commentbox .comment_editor .ui-editor-toolbar{display:none;}.tr-commentbox .comment_editor-height-hack .ui-editor{height:48px !important;}.tr-commentbox .ui-tree-container{overflow:hidden;}.tr-commentbox .ui-tree-toggler{display:none;}.tr-commentbox .ui-treenode-leaf-icon{display:none;}.tr-commentbox .ui-treenode-children{padding:0 58px 0 0;}.tr-commentbox .ui-treenode-children .ui-treenode-children{padding:0 42px 0 0;}.tr-commentbox .ui-treenode-children .ui-treenode-children .ui-treenode-children .ui-treenode-children .ui-treenode-children{padding:0;}.tr-commentbox .commentEditorDiv{display:none;height:156px;width:602px;}.tr-commentbox .commentEditorDivAnswer{margin-right:40px;height:156px;width:602px;}.tr-commentbox .treenode-dummy{display:none;}.tr-commentbox .clickedLink{color:grey !important;pointer-events:none;cursor:default;}.tr-commentbox .ui-treenode-label.ui-corner-all{cursor:default;}.tr-commentbox .updateRootButton{display:none;margin:10px 0 5px 0;width:50%;min-width:200px;max-width:500px;background:#ffc62e;border:0;box-shadow:inset 0 0 0 1px rgba(0, 0, 0, 0.2);}.tr-commentbox .ui-treenode-children .newIndicator{height:35px;}.tr-commentbox .comments{position:relative;font-family:"Helvetica Neue",arial,sans-serif;}.tr-commentbox .comments a{text-decoration:none;-webkit-transition:color linear .1s;-moz-transition:color linear .1s;-ms-transition:color linear .1s;-o-transition:color linear .1s;transition:color linear .1s;}.tr-commentbox .comment{margin-top:5px;margin-bottom:5px;overflow:hidden;}.tr-commentbox .username{color:#2E9FFF;font-weight:600;}.tr-commentbox .bullet{font-size:75%;color:#CCC;line-height:1.4;}.tr-commentbox .comment-text{font-size:13px;padding:2px;}.tr-commentbox .comment-text,.tr-commentbox .comment-text div{text-overflow:ellipsis;overflow:hidden;width:99.5%;}.tr-commentbox .comment-text a{text-decoration:underline;}.tr-commentbox .ui-treenode-children .avatar{height:auto;width:4.2%;}.comments-wrapper .avatar a{display:block;}.comments-wrapper .avatar img{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;height:auto;max-width:100%;}.tr-commentbox .ui-treenode-children .avatar img{height:auto;max-width:100%;}.tr-commentbox .comment header{color:#777;line-height:16px;font-size:12px;position:relative;}.comments .comment header .bullet{padding:0 3px;}.comments .comment header .info{font-weight:400;font-size:95%;color:inherit;}.tr-commentbox .comment footer{font-size:11px;line-height:1.85;color:#6C6C6C;margin:4px 0 0;clear:both;}.tr-commentbox .comment footer a{color:#999;}.tr-commentbox .comment footer a:hover{color:#666;}.tr-commentbox .comment menu span:first-child .bullet{display:none;}.ui-editor{width:99.9% !important;}.noBorders tr,.noBorders td{background:none !important;border:none !important;}@media screen and (max-height: 575px){#rc-imageselect,.g-recaptcha{transform:scale(0.77);-webkit-transform:scale(0.77);transform-origin:0 0;-webkit-transform-origin:0 0;}} \ No newline at end of file diff --git a/docroot/resources/css/commentbox.css b/docroot/resources/css/commentbox.css new file mode 100644 index 0000000..e65a129 --- /dev/null +++ b/docroot/resources/css/commentbox.css @@ -0,0 +1,264 @@ +.tr-commentbox .ui-separator { + border: 0 !important; + height: 2px !important; + background: #CCC !important; +} + +.tr-commentbox .comments * { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + line-height: 1; + font-family: inherit; +} + +.tr-commentbox .commentTree { + width: auto; +} + +.tr-commentbox .numberButton span { +position: relative; +top: -3px; +left: -4px; +} + +.tr-commentbox .ui-editor { + -webkit-transition: all .2s ease-in-out; + -moz-transition: all .2s ease-in-out; + -ms-transition: all .2s ease-in-out; + -o-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; +} + +.tr-commentbox .ui-tree-container, .tr-commentbox .ui-treenode-label { + padding-left: 0; +} + +.tr-commentbox .comment_editor .ui-editor-toolbar { + display: none; +} + +.tr-commentbox .comment_editor-height-hack .ui-editor { + height: 48px !important; +} + +.tr-commentbox .ui-tree-container { + overflow: hidden; +} + +.tr-commentbox .ui-tree-toggler { + display: none; +} + +.tr-commentbox .ui-treenode-leaf-icon { + display: none; +} + +.tr-commentbox .ui-treenode-children { + padding: 0 0 0 58px; +} + +.tr-commentbox .ui-treenode-children .ui-treenode-children { + padding: 0 0 0 42px; +} + +.tr-commentbox .ui-treenode-children .ui-treenode-children .ui-treenode-children .ui-treenode-children .ui-treenode-children { + padding: 0; +} + +.tr-commentbox .commentEditorDiv { + display: none; + height: 156px; + width: 602px; +} + +.tr-commentbox .commentEditorDivAnswer { + margin-left: 40px; + height: 156px; + width: 602px; +} + +.tr-commentbox .treenode-dummy { + display: none; +} + +.tr-commentbox .clickedLink { + color: grey !important; + pointer-events: none; + cursor: default; +} + +.tr-commentbox .ui-treenode-label.ui-corner-all { + cursor: default; +} + +.tr-commentbox .updateRootButton { + display: none; + margin: 10px 0 5px 0; + width: 50%; + min-width: 200px; + max-width: 500px; + background: #ffc62e; + border: 0; + box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); +} + +/* .tr-commentbox .newIndicator { + width: 5px; + height: 50px; + background: #ffc62e; + border-radius: 1px; + float: left; + margin-right: 5px; + display: none; +} */ + +.tr-commentbox .ui-treenode-children .newIndicator { + height: 35px; +} + +.tr-commentbox .comments { + position: relative; + font-family: "Helvetica Neue",arial,sans-serif; +} + +.tr-commentbox .comments a { + text-decoration: none; + -webkit-transition: color linear .1s; + -moz-transition: color linear .1s; + -ms-transition: color linear .1s; + -o-transition: color linear .1s; + transition: color linear .1s; +} + +.tr-commentbox .comment { + margin-top: 5px; + margin-bottom: 5px; + overflow: hidden; +} + +.tr-commentbox .username { + color: #2E9FFF; + font-weight: 600; +} + +.tr-commentbox .bullet { + font-size: 75%; + color: #CCC; + line-height: 1.4; +} +.tr-commentbox .comment-text { + font-size: 13px; + padding: 2px; +} + +.tr-commentbox .comment-text, .tr-commentbox .comment-text div { + text-overflow: ellipsis; + overflow: hidden; + width: 99.5%; +} + +.tr-commentbox .comment-text a { + text-decoration: underline; +} + +/* .tr-commentbox .avatar { + float: right; + padding-left: 8px; + height: auto; + width: 6%; +} + */ +.tr-commentbox .ui-treenode-children .avatar { + height: auto; + width: 4.2%; +} + +.comments-wrapper .avatar a { + display: block; +} + +.comments-wrapper .avatar img { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + height: auto; + max-width: 100%; +} + +.tr-commentbox .ui-treenode-children .avatar img{ + height: auto; + max-width: 100%; +} + +/* .tr-commentbox .comment .body { + float: left; +} */ + +.tr-commentbox .comment header { + color: #777; + line-height: 16px; + font-size: 12px; + position: relative; +} + +.comments .comment header .bullet { + padding: 0 3px; +} + +.comments .comment header .info { + font-weight: 400; + font-size: 95%; + color: inherit; +} + +.tr-commentbox .comment footer { + font-size: 11px; + line-height: 1.85; + color: #6C6C6C; + margin: 4px 0 0; + clear: both; +} + +/* .tr-commentbox .comment footer menu li { + float: left; + list-style-type: none; + margin: 0 7px 0 0; + padding: 0; +} */ + +.tr-commentbox .comment footer a { + color: #999; +} + +.tr-commentbox .comment footer a:hover { + color: #666; +} + +.tr-commentbox .comment menu span:first-child .bullet { + display: none; +} + +/* .ui-treenode +{ + margin-bottom: 3.5% !important; +} */ + +.ui-editor { + width: 99.9% !important; +} + +.noBorders tr, .noBorders td { + background: none !important; + border: none !important; +} + +@media screen and (max-height: 575px){ +#rc-imageselect, .g-recaptcha { +transform:scale(0.77); +-webkit-transform:scale(0.77); +transform-origin:0 0; +-webkit-transform-origin:0 0; +} +} \ No newline at end of file diff --git a/docroot/resources/images/default_avatar.png b/docroot/resources/images/default_avatar.png new file mode 100644 index 0000000..c3840d1 Binary files /dev/null and b/docroot/resources/images/default_avatar.png differ diff --git a/docroot/resources/images/editor-smileys/1.gif b/docroot/resources/images/editor-smileys/1.gif new file mode 100644 index 0000000..9f9f923 Binary files /dev/null and b/docroot/resources/images/editor-smileys/1.gif differ diff --git a/docroot/resources/images/editor-smileys/10.gif b/docroot/resources/images/editor-smileys/10.gif new file mode 100644 index 0000000..eea026a Binary files /dev/null and b/docroot/resources/images/editor-smileys/10.gif differ diff --git a/docroot/resources/images/editor-smileys/11.gif b/docroot/resources/images/editor-smileys/11.gif new file mode 100644 index 0000000..e26144c Binary files /dev/null and b/docroot/resources/images/editor-smileys/11.gif differ diff --git a/docroot/resources/images/editor-smileys/12.gif b/docroot/resources/images/editor-smileys/12.gif new file mode 100644 index 0000000..e9eb35b Binary files /dev/null and b/docroot/resources/images/editor-smileys/12.gif differ diff --git a/docroot/resources/images/editor-smileys/2.gif b/docroot/resources/images/editor-smileys/2.gif new file mode 100644 index 0000000..7087f48 Binary files /dev/null and b/docroot/resources/images/editor-smileys/2.gif differ diff --git a/docroot/resources/images/editor-smileys/3.gif b/docroot/resources/images/editor-smileys/3.gif new file mode 100644 index 0000000..6db9d41 Binary files /dev/null and b/docroot/resources/images/editor-smileys/3.gif differ diff --git a/docroot/resources/images/editor-smileys/4.gif b/docroot/resources/images/editor-smileys/4.gif new file mode 100644 index 0000000..4e399bf Binary files /dev/null and b/docroot/resources/images/editor-smileys/4.gif differ diff --git a/docroot/resources/images/editor-smileys/5.gif b/docroot/resources/images/editor-smileys/5.gif new file mode 100644 index 0000000..f6e1b99 Binary files /dev/null and b/docroot/resources/images/editor-smileys/5.gif differ diff --git a/docroot/resources/images/editor-smileys/6.gif b/docroot/resources/images/editor-smileys/6.gif new file mode 100644 index 0000000..621bf47 Binary files /dev/null and b/docroot/resources/images/editor-smileys/6.gif differ diff --git a/docroot/resources/images/editor-smileys/7.gif b/docroot/resources/images/editor-smileys/7.gif new file mode 100644 index 0000000..44bf7f7 Binary files /dev/null and b/docroot/resources/images/editor-smileys/7.gif differ diff --git a/docroot/resources/images/editor-smileys/8.gif b/docroot/resources/images/editor-smileys/8.gif new file mode 100644 index 0000000..ab44a75 Binary files /dev/null and b/docroot/resources/images/editor-smileys/8.gif differ diff --git a/docroot/resources/images/editor-smileys/9.gif b/docroot/resources/images/editor-smileys/9.gif new file mode 100644 index 0000000..5a1630e Binary files /dev/null and b/docroot/resources/images/editor-smileys/9.gif differ diff --git a/docroot/resources/images/editor-smileys/Thumbs.db b/docroot/resources/images/editor-smileys/Thumbs.db new file mode 100644 index 0000000..4208b53 Binary files /dev/null and b/docroot/resources/images/editor-smileys/Thumbs.db differ diff --git a/docroot/resources/images/film-youtube.png b/docroot/resources/images/film-youtube.png new file mode 100644 index 0000000..cd96c78 Binary files /dev/null and b/docroot/resources/images/film-youtube.png differ diff --git a/docroot/resources/images/icon-help-circled-128.png b/docroot/resources/images/icon-help-circled-128.png new file mode 100644 index 0000000..8f1f81d Binary files /dev/null and b/docroot/resources/images/icon-help-circled-128.png differ diff --git a/docroot/resources/javascript/commentbox.js b/docroot/resources/javascript/commentbox.js new file mode 100644 index 0000000..7da7074 --- /dev/null +++ b/docroot/resources/javascript/commentbox.js @@ -0,0 +1,437 @@ +function commentboxWidget(ccid, userid, jsonMsg) { + + var _self = this; + + this.comment_id = '.comments-' + ccid; + + this.isAnswerEditorVisible = false; + this.isEditEditorVisible = false; + + this.resizefunc_edit = function(){}; + this.resizefunc_answer = function(){}; + + this.oldNodes = new Array(); + + this.isUserTyping_timestamp = 0; + + this.newAnswers = {}; + + String.prototype.format = function () { + var args = arguments; + return this.replace(/\{(\d+)\}/g, function (m, n) { return args[n]; }); + }; + + this.rcUserTyping_callback = function(){}; + + this.init = function () { + $(window).resize(function() { + _self.repositionEditors(); + }); + + $(function(){ + _self.timer(); + _self.initUserTypingEvents(); + + if ($(_self.comment_id + ' .comment_editor').first().find('textarea').attr('disabled') != 'disabled') { + editorClickHandler = function () { + _self.cancelEdit(); + _self.cancelCreateAnswer(); + + var $editorForm = $(_self.comment_id + ' .comment_editor').first(); + var $editor = $editorForm.find('.ui-editor'); + //$($editorForm.find('iframe').contents()[0]).find('body').html(''); + $editorForm.removeClass('comment_editor-height-hack'); + $(this).unbind('click', editorClickHandler); + $(_self.comment_id + ' .comment_editorButtons').fadeIn(); + $editor.find('.ui-editor-toolbar').fadeIn(); + }; + + $($(_self.comment_id + ' .comment_editor').first().find('iframe').contents()[0]).bind('click', editorClickHandler); + } + }); + }; + + this.init(); + + this.repositionEditors = function () { + if (_self.isAnswerEditorVisible) { + _self.resizefunc_answer(); + } + + if (_self.isEditEditorVisible) { + _self.resizefunc_edit(); + } + }; + + this.reShowEditors = function () { + if (_self.isAnswerEditorVisible) { + _self.showAnswerEditor(); + } + + if (_self.isEditEditorVisible) { + _self.showInlineEditor(true); + } + }; + + this.initDiffNodes = function () { + _self.oldNodes = new Array(); + $(_self.comment_id + ' .ui-treenode:visible').each(function(){ + var str = $(this).attr('class'); + var startPos = str.indexOf('treenode-unique-id-'); + var endPos = str.indexOf(' ', startPos); + var uniqueID = str.substring(startPos, endPos); + + _self.oldNodes.push(uniqueID); + }); + }; + + this.indicateNewNodes = function () { + var newNodes = new Array(); + + $(_self.comment_id + ' .ui-treenode:visible').each(function(){ + var str = $(this).attr('class'); + var startPos = str.indexOf('treenode-unique-id-'); + var endPos = str.indexOf(' ', startPos); + var uniqueID = str.substring(startPos, endPos); + + newNodes.push(uniqueID); + }); + + var diffNodes = $.grep(newNodes, function(n, i) { + return $.inArray(n, _self.oldNodes) == -1; + }); + + for (var i = 0; i < diffNodes.length; i++) { + $(_self.comment_id + ' .' + diffNodes[i].replace(/:/g, '\\:')).find('.newIndicator').show().fadeOut(10000, function() { + _self.repositionEditors(); + }); + } + }; + + this.scrollTo = function (b){ + var $elem = $(PrimeFaces.escapeClientId(b)); + var a = $elem.offset(); + $("html,body").animate({scrollTop:(a.top - ($(window).height() / 2)) - $elem.height(), scrollLeft:a.left},{easing:"easeInCirc"}, 1000) + }; + + this.isScrolledIntoView = function (elem){ + var docViewTop = $(window).scrollTop(); + var docViewBottom = docViewTop + $(window).height(); + var elemTop = $(elem).offset().top; + var elemBottom = elemTop + 50; // $(elem).height(); + return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop)); + }; + + this.scrollToIfNotInView = function (elem) { + if (!_self.isScrolledIntoView(elem)) { + _self.scrollTo($(elem).attr('id')); + } + }; + + this.saveCurrentEditComment = function (CommentID) { + $(_self.comment_id + ' .inlineEditorForm #currentEditComment').attr('value', CommentID); + }; + + this.showInlineEditor = function (isReshow) { + var comment = $(_self.comment_id + ' .inlineEditorForm #currentEditComment').attr('value'); + + _self.isEditEditorVisible = true; + $(_self.comment_id + ' .comment-text').show(); + $(_self.comment_id + ' .commentEditorDiv').hide(); + $(_self.comment_id + ' .comment-' + comment + ' .body .comment-text').hide(); + $(_self.comment_id + ' .comment-' + comment + ' .body .commentEditorDiv').show(); + _self.resizefunc_edit = function() { + $(_self.comment_id + ' .inlineEditorForm').attr('style', '').css($(_self.comment_id + ' .comment-' + comment + ' .body .commentEditorDiv').first().offset()).css('position', 'absolute'); + }; + _self.repositionEditors(); + + if (!isReshow) { + $(_self.comment_id + ' .inlineEditorForm .inlineEditor iframe').contents().find('body').html($(_self.comment_id + ' .comment-' + comment + ' .body .comment-text').html()); + } + + _self.scrollToIfNotInView($(_self.comment_id + ' .commentEditorDiv')); + }; + + this.submitEdit = function () { + var edit_comment_id = $(_self.comment_id + ' #currentEditComment').attr('value'); + + $(_self.comment_id + ' .comment-' + edit_comment_id +' .body .comment-text').html($(_self.comment_id + ' .inlineEditorForm .inlineEditor iframe').contents().find('body').html()); + _self.cancelEdit(); + }; + + this.cancelEdit = function () { + _self.isEditEditorVisible = false; + var edit_comment_id = $(_self.comment_id + ' #currentEditComment').attr('value'); + + $(_self.comment_id + ' .inlineEditorForm').attr('style', 'height: 0px; overflow: hidden'); + $(_self.comment_id + ' .comment-' + edit_comment_id + ' .body .commentEditorDiv').hide(); + $(_self.comment_id + ' .comment-' + edit_comment_id + ' .body .comment-text').show(); + + _self.repositionEditors(); + }; + + this.saveCurrentAnswerComment = function (CommentID) { + $(_self.comment_id + ' .answerEditorForm #currentAnswerComment').attr('value', CommentID); + }; + + this.showAnswerEditor = function () { + var comment = $(_self.comment_id + ' .answerEditorForm #currentAnswerComment').attr('value'); + + _self.isAnswerEditorVisible = true; +/* $(_self.comment_id + ' .treenode-dummy').hide(); + $(_self.comment_id + ' .treenode-dummy.treenode-' + comment).css('display', 'block');*/ + _self.resizefunc_answer = function() { + $(_self.comment_id + ' .answerEditorForm').attr('style', '').css($( '.MycommentAnswerDivWrapper').last().offset()).css({'position': 'static', 'width': '72%'}); + } + _self.repositionEditors(); + + _self.scrollToIfNotInView($(_self.comment_id + ' .treenode-dummy.treenode-'+ comment)); + }; + + this.submitAnswer = function () { + _self.isUserTyping_timestamp = 0; + + _self.isAnswerEditorVisible = false; + var edit_comment_id = $(_self.comment_id + ' #currentAnswerComment').attr('value'); + + $(_self.comment_id + ' .answerEditorForm').attr('style', 'height: 0px; overflow: hidden'); + $(_self.comment_id + ' .commentAnswerDivWrapper').css('display', 'none'); + }; + + this.cancelCreateAnswer = function () { + _self.isAnswerEditorVisible = false; + $(_self.comment_id + ' .treenode-dummy').css('display', 'none'); + $(_self.comment_id + ' .answerEditorForm').attr('style', 'height: 0px; overflow: hidden'); + + _self.repositionEditors(); + }; + + this.deleteComment = function (comment) { + $(_self.comment_id + ' .comment-' + comment +' .body .comment-text').html('<i>' + jsonMsg['commentbox.comments.comment.deletedmsg'] +'</i>'); + $(_self.comment_id + ' .comment-' + comment +' .body footer .action.lockondelete a').addClass('clickedLink'); + }; + + this.findIDbySelector = function (selector) { + return $(selector).first().attr('id'); + }; + + this.updateNodes = function (tree, c) { + var a = tree; + if (tree.cfg.dynamic) { + if (tree.cfg.cache && c.children(".ui-treenode-children").children().length > 0) { + tree.showNodeChildren(c); + return + } + if (c.data("processing")) { + PrimeFaces.debug("Node is already being expanded, ignoring expand event."); + return + } + c.data("processing", true); + var b = { + source: tree.id, + process: tree.id, + update: tree.id, + formId: tree.cfg.formId + }; + b.onsuccess = function (j) { + var g = $(j.documentElement), + h = g.find("update"); + for (var e = 0; e < h.length; e++) { + var l = h.eq(e), + k = l.attr("id"), + f = l.text(); + if (k == a.id) { + _self.initDiffNodes(); + + c.children(".ui-treenode-children").html(f); + + _self.indicateNewNodes(); + _self.reShowEditors(); + + a.showNodeChildren(c) + } else { + PrimeFaces.ajax.AjaxUtils.updateElement.call(tree, k, f) + } + } + PrimeFaces.ajax.AjaxUtils.handleResponse.call(tree, g); + return true + }; + b.oncomplete = function () { + c.removeData("processing") + }; + b.params = [{ + name: tree.id + "_expandNode", + value: a.getRowKey(c) + }]; + if (tree.hasBehavior("expand")) { + var d = tree.cfg.behaviors.expand; + d.call(tree, c, b) + } else { + PrimeFaces.ajax.AjaxRequest(b) + } + } else { + tree.showNodeChildren(c); + tree.fireExpandEvent(c) + } + }; + + this.initUserTypingEvents = function () { + $(_self.comment_id + ' .answerEditor iframe').contents().find('body').keyup(function() { + _self.isUserTyping_timestamp = new Date().getTime(); + }); + }; + + this.dropTypingUser = function (type, typingContainer, user) { + var $typingContainer = typingContainer; + + var $typingLi = $typingContainer.find('.hiddenUsersTyping'); + var typing_array = $typingLi.html().split('|'); + + var tmp = new Array(); + + tmp.push('{}'); + + for(var k=0; k < typing_array.length; k++) { + if (type == 0) { + if (JSON.parse(typing_array[k])['user']) { + if (JSON.parse(typing_array[k])['user'] != user) { + tmp.push(typing_array[k]); + } + } + } else if (type == 1) { + for( var k=0; k < typing_array.length; k++ ) { + if (JSON.parse(typing_array[k])['date']) { + if (new Date().getTime() - JSON.parse(typing_array[k])['date'] < 5*1000) { + tmp.push(typing_array[k]); + } + } + } + } + } + + $typingLi.html(tmp.join('|')); + + var typingcount = tmp.length - 1; + if (typingcount > 0) { + var typing_message = (typingcount == 1) ? jsonMsg['commentbox.comments.comment.typinguser.single'] : jsonMsg['commentbox.comments.comment.typinguser.multiple'].format(typingcount) + $typingContainer.find('a').html(typing_message); + $typingContainer.show(); + } else { + $typingContainer.hide(); + } + }; + + this.dropOldTypingUsers = function () { + var $typingContainer = $(_self.comment_id + ' .typingUsers'); + + dropTypingUser = _self.dropTypingUser; + + $typingContainer.each(function() { + dropTypingUser(1, $(this)); + }); + }; + + this.timer = function () { + var isUserTyping = (new Date().getTime() - _self.isUserTyping_timestamp) < 1000; + + _self.dropOldTypingUsers(); + + if (isUserTyping) { + $(_self.comment_id + ' .rcUserTypingForm').find('[name=\'currentAnswerComment\']').val($('.answerEditor').closest('form').find('[name=\'currentAnswerComment\']').val()); + + _self.rcUserTyping_callback = function() { + setTimeout(_self.timer, 1500); + }; + + rcUserTyping(); + } else { + setTimeout(_self.timer, 1500); + } + }; + + this.isOnFirstPage = function () { + if ($(_self.comment_id + ' .cbpaginagtion button.ui-state-disabled').length == 0) { + return true; + } + + return $($(_self.comment_id + ' .cbpaginagtion button.ui-state-disabled')[2]).find('span').html() == '1'; + }; + + this.showNewRepliesText = function () { + $.each(_self.newAnswers, function(i, val){ + var $updateAnswersPanel = $(_self.comment_id + ' .comment-' + i + ' .updateAnswersPanel'); + + if (val > 0) { + var new_reply_message = (val == 1) ? jsonMsg['commentbox.comments.comment.newreply.single'] : jsonMsg['commentbox.comments.comment.newreplies.multiple'].format(val); + $updateAnswersPanel.find('.getReplies').html(new_reply_message); + $updateAnswersPanel.fadeIn('slow'); + } else { + $updateAnswersPanel.hide(); + } + }); + }; + + this.handlePushMessage = function (msg) { + var json = JSON.parse(msg); + + if (json.a) { + if (json.a == 'NC') { + if (_self.isOnFirstPage()) { + var $hiddenNewComments = $(_self.comment_id + ' .hiddenNewComments'); + var newCommentCount = parseInt($hiddenNewComments.html()) + 1; + $hiddenNewComments.html(newCommentCount); + + var new_comments_message = (newCommentCount == 1) ? jsonMsg['commentbox.comments.comment.new.single'] : jsonMsg['commentbox.comments.comment.new.multiple'].format(newCommentCount); + $(_self.comment_id + ' .updateRootButton').fadeIn('slow').find('.ui-button-text').html(new_comments_message); + _self.repositionEditors(); + } + } else if (json.a == 'AC') { + if (json.u == userid) { + return; + } + + if (_self.newAnswers[json.p]) { + _self.newAnswers[json.p] = _self.newAnswers[json.p] + 1; + } else { + _self.newAnswers[json.p] = 1; + } + + _self.dropTypingUser(0, $(_self.comment_id + ' .comment-' + json.p + ' .typingUsers'), json.u); + _self.showNewRepliesText(); + } else if (json.a == 'T') { + if (json.u == userid) { + return; + } + + var $typingContainer = $(_self.comment_id + ' .comment-' + json.c + ' .typingUsers'); + var $typingLi = $typingContainer.find('.hiddenUsersTyping'); + var typing_array = $typingLi.html().split('|'); + + var obj = {}; + obj['user'] = json.u; + obj['date'] = new Date().getTime(); + + var found = false; + for( var k=0; k < typing_array.length; k++ ) { + if (JSON.parse(typing_array[k])['user'] == json.u) { + found = true; + break; + } + } + + if (!found) { + typing_array.push(JSON.stringify(obj)); + } + + $typingLi.html(typing_array.join('|')); + + var typingcount = typing_array.length - 1; + if (typingcount > 0) { + var typing_message = (typingcount == 1) ? jsonMsg['commentbox.comments.comment.typinguser.single'] : jsonMsg['commentbox.comments.comment.typinguser.multiple'].format(typingcount); + $typingContainer.find('a').html(typing_message); + $typingContainer.show(); + } + } + } + } +} \ No newline at end of file diff --git a/docroot/resources/javascript/jquery.cleditor.icon.js b/docroot/resources/javascript/jquery.cleditor.icon.js new file mode 100644 index 0000000..0167c03 --- /dev/null +++ b/docroot/resources/javascript/jquery.cleditor.icon.js @@ -0,0 +1,43 @@ +/* + CLEditor Icon Plugin v1.0 + http://premiumsoftware.net/cleditor + requires CLEditor v1.2 or later + + Copyright 2010, Chris Landowski, Premium Software, LLC + Dual licensed under the MIT or GPL Version 2 licenses. + + Adjusted for commentBox by Nick Russler + */ +function initJQueryCLEditorIconPlugin(baseIconURL, smileyCount, smileyPopupWidth) { + // Constants + var baseSplit = baseIconURL.split('/1.gif?ln=') + FOLDER = baseSplit[0] + '/', + EXT = ".gif?ln=" + baseSplit[1], + BUTTON_COUNT = smileyCount, + POPUP_WIDTH = smileyPopupWidth; + + // Define the icon button + $.cleditor.buttons.icon = { + name : "icon", + css : { + background : "URL(" + FOLDER + "1" + EXT + ") 50% 50% no-repeat" + }, + title : "Insert Icon", + command : "insertimage", + popupName : "Icon", + popupHover : true, + buttonClick : function(e, data) { + $(data.popup).width(POPUP_WIDTH); + }, + popupClick : function(e, data) { + data.value = $(e.target).attr('src'); + } + }; + + // Build the popup content + var $content = $("<div>"); + for ( var x = 0; x < BUTTON_COUNT; x++) { + $('<div><img src="' + FOLDER + (x + 1) + EXT + '" />').css("display", "inline-block").css('padding', '1px 2px').appendTo($content); + } + $.cleditor.buttons.icon.popupContent = $content.children(); +} \ No newline at end of file diff --git a/docroot/resources/javascript/jquery.cleditor.youtube.js b/docroot/resources/javascript/jquery.cleditor.youtube.js new file mode 100644 index 0000000..cfd84bd --- /dev/null +++ b/docroot/resources/javascript/jquery.cleditor.youtube.js @@ -0,0 +1,107 @@ +/* + CLEditor YouTube Plugin v1.0.0 + http://www.terapix.de + requires jQuery v1.4.2 or later, CLEditor WYSIWYG HTML Editor v1.3.0 or later + + Copyright 2012, Markus Horowski, TeraPix.de + Licensed for commentBox under Apache v2 with permission by Markus Horowski +*/ + +(function($) +{ + // Define the vimeo/youtube button + $.cleditor.buttons.youtube = { + name: "youtube", + css: { + // EL-will not work here, therefore outer fix was made + background: "URL(#{resource['images:film-youtube.png']}) 50% 50% no-repeat" + }, + title: "Insert Video", + command: "inserthtml", + popupName: "youtube", + popupClass: "ui-editor-prompt", + popupContent: + "YouTube URL:<br /><input type=text style='width:200px;'>" + + "<br />or Vimeo URL:<br /><input type=text style='width:200px;'>" + + "<br />or Dailymotion URL:<br /><input type=text style='width:200px;'><br />" + + "<input type=button value=Submit>", + buttonClick: youtubeButtonClick + }; + + // Event handler + function youtubeButtonClick(e, data) { + // Listen to submitting the button + $(data.popup).children(":button") + .unbind("click") + .bind("click", function(e) { + + // Get the editor + var editor = data.editor; + + // Get the first text-input value + var $text = $(data.popup).find(":text"), + videourl = decodeURI($text[0].value); + + // If first value is set, write youtube embed-code + if(videourl.length) + { + var regExp = /^(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?(?=.*v=((\w|-){11}))(?:\S+)?$/ + var match = videourl.match(regExp); + + if (match&&match[1].length==11) + { + var videourl = match[1]; + var html = '<iframe title="YouTube Video Player" class="youtube-player webkitIframeHack" type="text/html" width="570" height="321" src="http://www.youtube.com/embed/' + videourl + '" src2="http://www.youtube.com/embed/' + videourl + '" frameborder="0" wmode="transparant"></iframe><div><br/><br/></div>'; + } + } + + // Get the second text-input value + var $text = $(data.popup).find(":text"), + vimeourl = decodeURI($text[1].value); + + // If second value is set, write vimeo embed-code + if(vimeourl.length) + { + var regExp = /http:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/; + var match = vimeourl.match(regExp); + + if (match){ + vimeourl = match[2]; + var html = '<iframe class="webkitIframeHack" src="http://player.vimeo.com/video/' + vimeourl + '?color=ffffff" src2="http://player.vimeo.com/video/' + vimeourl + '?color=ffffff" width="570" height="320" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe><div><br/><br/></div>'; + } + } + + // Get the second text-input value + var $text = $(data.popup).find(":text"), + dailymotionurl = decodeURI($text[2].value); + + // If second value is set, write vimeo embed-code + if(dailymotionurl.length) + { + var regExp = /^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/; + var match = dailymotionurl.match(regExp); + + if (match) { + if(match[4] !== undefined) { + dailymotionurl = match[4]; + } else { + dailymotionurl = match[2]; + } + + var html = '<iframe frameborder="0" width="480" height="270" class="webkitIframeHack" src="http://www.dailymotion.com/embed/video/' + dailymotionurl + '" src2="http://www.dailymotion.com/embed/video/' + dailymotionurl + '"></iframe><div><br/><br/></div>'; + } + } + + // Insert the html into the editor + if (html) { + editor.execCommand(data.command, html, null, data.button); + } + + $(editor.$frame.contents()[0]).find('body').animate({ scrollTop: $(document).height() }, 'slow'); + + // Hide the popup and set the focus + editor.hidePopups(); + editor.focus(); + }); + } +})(jQuery); \ No newline at end of file diff --git a/docroot/views/commentBox.xhtml b/docroot/views/commentBox.xhtml new file mode 100644 index 0000000..3a2fd7f --- /dev/null +++ b/docroot/views/commentBox.xhtml @@ -0,0 +1,473 @@ +<?xml version="1.0"?> + +<f:view xmlns="http://www.w3.org/1999/xhtml" + xmlns:c="http://java.sun.com/jsp/jstl/core" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:p="http://primefaces.org/ui" + xmlns:ui="http://java.sun.com/jsf/facelets" + xmlns:wb="http://whitebyte.info/components"> + <h:head> + <h:outputScript library="primefaces" name="jquery/jquery.js" /> + <h:outputScript library="primefaces" name="primefaces.js" /> + <h:outputStylesheet library="css" name="commentbox.css"></h:outputStylesheet> + <h:outputScript library="javascript" name="commentbox.js" /> + <h:outputScript library="javascript" name="jquery.cleditor.icon.js" + target="body" /> + <h:outputScript library="javascript" name="jquery.cleditor.youtube.js" + target="body" /> + + <style> + .tr-commentbox .avatar { + #{commentBoxB.currentLocale eq 'en' ? 'float: left; padding-right: 8px;' : 'float: right; padding-left: 8px;'} + height: auto; + width: 6%; +} + +.tr-commentbox .comment .body { + #{commentBoxB.currentLocale eq 'en' ? 'float: left;' : 'float: right;'} +} + +.tr-commentbox .comment footer menu li { + + #{commentBoxB.currentLocale eq 'en' ? 'float: left;' : 'float: right;'} + list-style-type: none; + margin: 0 7px 0 0; + padding: 1px; +} + +.tr-commentbox .newIndicator { + width: 5px; + height: 50px; + background: #ffc62e; + border-radius: 1px; + #{commentBoxB.currentLocale eq 'en' ? 'float: left;' : 'float: right;'} + margin-right: 5px; + display: none; +} + +</style> + + <script type="text/javascript"> + var emailNotificationFlag1=false; + var emailNotificationFlag2=false; + var widgetId1; + var widgetId2; + var onloadCallback = function() { + + widgetId1 = grecaptcha.render('recaptcha1', { + 'sitekey' : '6Lfaby4UAAAAAGPRPYVpBPVKzQrQNb7wxYVfDhZx', + }); + + widgetId2 = grecaptcha.render('recaptcha2', { + 'sitekey' : '6Lfaby4UAAAAAGPRPYVpBPVKzQrQNb7wxYVfDhZx', + }); + }; + </script> + + </h:head> + <h:body> + + <script> + //<![CDATA[ + $(function(){ + // The images are set here because the el is not evaluated in the external js file.. + $.cleditor.buttons.youtube.css.background = "URL(/GuestDiscussion-portlet/resources/images/film-youtube.png) 50% 50% no-repeat"; + initJQueryCLEditorIconPlugin("/GuestDiscussion-portlet/resources/images/editor-smileys/", 12, 60); + }); + //]]> + </script> + + <p:messages id="messages1" for="newcomment" closable="true" autoUpdate="true" showSummary="true" showDetail="true" /> + + <h3> + <h:outputText dir="#{commentBoxB.currentLocale eq 'en' ? 'ltr' : 'rtl'}" value="#{commentBoxB.discussionTitle}"></h:outputText> + </h3> + + <p:outputPanel styleClass="emptyMessage" + rendered="#{commentBoxB.titleId == -1}">#{i18n['empty-title-message']}</p:outputPanel> + + <p:outputPanel + styleClass="comments-#{commentBoxB.id} tr-commentbox comments-wrapper"> + + <p:outputPanel rendered="#{commentBoxB.titleId != -1}" id="leaveComment" styleClass="newCommentPanel"> + <h:form style="overflow: hidden;"> + + + +<!-- <div class="avatar"> + <h:graphicImage + rendered="#{not empty commentBoxB.currentUserAvatarUrl}" + value="#{commentBoxB.currentUserAvatarUrl}" /> + </div> --> + + + + + + + + <div style="#{commentBoxB.currentLocale eq 'en' ? 'float: left; width: 72%;' : 'float: right; width: 72%;'}"> + <a class="username">#{commentBoxB.currentUserUsername}</a> + + <p:editor id="editor" maxlength="8000" + styleClass="my_editor comment_editor comment_editor-height-hack" + value="#{commentBoxB.new_comment_editor_text}" + controls="bold italic underline strikethrough | color | alignleft | center | alignright | link unlink | undo | redo" + height="120" widgetVar="editor" /> + + + <h:panelGrid columns="2" cellpadding="5" styleClass="comment_editorButtons noBorders" style="margin-top:3px;display: none;"> + + <h:outputLabel for="guestname" + value="#{i18n['commentbox.guest.name']}:" /> + <p:inputText id="guestname" value="#{commentBoxB.guestName}" + style="width: 80%;" /> + + + </h:panelGrid> + + + + <h:panelGrid columns="4" cellpadding="5" styleClass="comment_editorButtons noBorders" style="margin-top:3px;display: none;"> + + <p:selectBooleanCheckbox onchange="if(emailNotificationFlag1==false){document.getElementsByClassName('myemail1')[0].style.display = 'block'; + document.getElementsByClassName('myemail1')[1].style.display = 'block'; emailNotificationFlag1=true;} else{ + document.getElementsByClassName('myemail1')[0].style.display = 'none'; + document.getElementsByClassName('myemail1')[1].style.display = 'none'; emailNotificationFlag1=false;}" + value="#{commentBoxB.guestEmailNotification}" /> + <h:outputText value="#{i18n['inform-by-email']}" /> + + + <h:panelGroup id="help1"> + <p:graphicImage width="20" height="20" value="../resources/images/icon-help-circled-128.png"/> + </h:panelGroup> + <p:tooltip id="toolTipFade1" for="help1" value="#{i18n['inform-by-email-help']}"/> + + </h:panelGrid> + + + + <h:panelGrid columns="2" cellpadding="5" styleClass="comment_editorButtons noBorders" style="margin-top:3px;display: none;"> + + + <h:outputLabel for="email1" + value="#{i18n['commentbox.guest.email']}:" style="display:none;" styleClass="myemail1" /> + <p:inputText id="email1" value="#{commentBoxB.guestEmailAddress}" + style="width: 80%; direction: ltr; display:none;" styleClass="myemail1"/> + + </h:panelGrid> + + + + <p:panelGrid styleClass="comment_editorButtons noBorders" + style="margin-top:3px;display: none;"> + + <p:row> + <p:column colspan="2" style="width: 80%; #{not commentBoxB.administratorFeatures ? '' : 'display: none;'}"> + <div id="recaptcha1" class="g-recaptcha"></div> + </p:column> + </p:row> + + + <p:row> + <p:column colspan="3"> + + <p:commandButton id="submitButton" styleClass="submitButton" + widgetVar="submitButtonVar" + value="#{i18n['commentbox.editor.save']}" icon="ui-icon-disk" + update=":#{component.namingContainer.parent.namingContainer.clientId}:innerWrapper" + onclick="submitButtonVar.disable();$('.ui-button-text', this).html('Submitting...');#{commentBoxB.id}_commentboxWrapper.initDiffNodes();" + oncomplete="if(typeof widgetId1 !== 'undefined'){grecaptcha.reset(widgetId1);}submitButtonVar.enable();$(#{commentBoxB.id}_commentboxWrapper.comment_id + ' .newCommentPanel .submitButton .ui-button-text').html('#{i18n['commentbox.editor.save']}');editor.clear();#{commentBoxB.id}_commentboxWrapper.indicateNewNodes();#{commentBoxB.id}_commentboxWrapper.reShowEditors();#{commentBoxB.id}_commentboxWrapper.showNewRepliesText();" + actionListener="#{commentBoxB.createComment}" /> + + + <p:commandButton rendered="#{commentBoxB.administratorFeatures}" + value="#{i18n['commentbox.editor.savedraft']}" + icon="ui-icon-pencil" actionListener="#{commentBoxB.saveNewCommentDraft}" /> + + <p:commandButton id="clearButton" type="button" + value="#{i18n['commentbox.editor.clear']}" + onclick="editor.clear()" icon="ui-icon-close" /> + + </p:column> + + </p:row> + + </p:panelGrid> + </div> + </h:form> + <p:separator style="margin: 14px 0 4px 0 !important;" /> + </p:outputPanel> + + <p:outputPanel id="innerWrapper"> + + <p:outputPanel styleClass="emptyMessage" + rendered="#{(empty commentBoxB.comments) and (commentBoxB.titleId ne -1)}">#{i18n['commentbox.comments.empty']}</p:outputPanel> + + + <span class="hiddenNewComments" style="display: none;">0</span> + + + + <p:outputPanel styleClass="comments"> + <p:tree value="#{commentBoxB.tree}" var="wrapper" id="tree" dir="#{commentBoxB.currentLocale eq 'en' ? 'ltr' : 'rtl'}" + widgetVar="treeVar" styleClass="commentTree" cache="false" + dynamic="true"> + <p:treeNode + styleClass="treenode-#{wrapper.right.id} #{wrapper.left ? 'treenode-dummy' : 'treenode-unique-id-'.concat(wrapper.right.id)}"> + <p:outputPanel rendered="#{not wrapper.left}"> + <h:form id="commentForm"> + <div class="comment comment-#{wrapper.right.id}" + data-commentid="#{wrapper.right.id}"> + <div class="newIndicator"></div> + + <!-- <div class="avatar"> + <h:graphicImage id="uploadedImage" + value="#{commentBoxB.currentUserAvatarUrl}" /> + </div> --> + + <div class="body"> + + <header> + + <a href="#comment#{wrapper.right.parent.id eq -1 ? '' : wrapper.right.parent.id}" id="comment#{wrapper.right.id}" class="username">#{wrapper.right.guestName}</a> <span + class="bullet">•</span> <span> <p:outputPanel + styleClass="info"> + <h:outputText dir="#{commentBoxB.currentLocale eq 'en' ? 'ltr' : 'rtl'}" value="#{wrapper.right.modification_time}"> + <f:converter + converterId="ir.ac.iut.sccportal.guestdiscussion.ConditionalPrettyTimeConveter" /> + </h:outputText> + </p:outputPanel> + </span> + + <p:outputPanel id="comment-likecount"> + <span class="bullet">•</span> + <span class="info">#{i18n['commentbox.comments.comment.likecount']}: + #{wrapper.right.likecount}</span> + </p:outputPanel> + + <p:outputPanel id="comment-dislikecount"> + <span class="bullet">•</span> + <span class="info">#{i18n['commentbox.comments.comment.dislikecount']}: + #{wrapper.right.dislikeCount}</span> + </p:outputPanel> + + </header> + + <div class="comment-text" style="overflow-x: auto;"> + <h:outputText style="white-space: pre-line" dir="#{commentBoxB.currentLocale eq 'en' ? 'ltr' : 'rtl'}" value="#{wrapper.right.comment_text}" + escape="false" /> + </div> + + <div class="commentEditorDiv" /> + + <footer style="overflow: hidden;"> + <menu> + + <p:outputPanel> + <li class="bullet">•</li> + <li class="action lockondelete"><p:commandLink + value="#{i18n['commentbox.comments.comment.like']}" + update="comment-likecount" + onclick="$(this).addClass('clickedLink')" + actionListener="#{commentBoxB.likeComment(wrapper.right)}" + style="color: #00b300;" /> + </li> + </p:outputPanel> + + <p:outputPanel> + <li class="bullet">•</li> + <li class="action lockondelete"><p:commandLink + value="#{i18n['commentbox.comments.comment.dislike']}" + update="comment-dislikecount" + onclick="$(this).addClass('clickedLink')" + actionListener="#{commentBoxB.dislikeComment(wrapper.right)}" + style="color: #e60000;" /> + </li> + </p:outputPanel> + + <p:outputPanel> + <li class="bullet">•</li> + <li class="action lockondelete"><a style="color: #ac7339;" + href="#bottom" rel="nofollow" + onclick="#{commentBoxB.id}_commentboxWrapper.saveCurrentAnswerComment(#{wrapper.right.id});#{commentBoxB.id}_commentboxWrapper.showAnswerEditor();">#{i18n['commentbox.comments.comment.reply']}</a> + </li> + </p:outputPanel> + + <p:outputPanel + styleClass="updateAnswersPanel updateAnswersPanel-#{wrapper.right.id}" + style="display: none;"> + <li class="bullet">•</li> + <li class="action"><a href="javascript:void(0)" + rel="nofollow" class="getReplies" + onclick="var commentid = $(this).closest('div.comment').attr('data-commentid');$(#{commentBoxB.id}_commentboxWrapper.comment_id + ' .rcGetAnswersForm').find('[name=\'currentAnswerComment\']').val(commentid);rcGetAnswers();#{commentBoxB.id}_commentboxWrapper.updateNodes(treeVar, $(this).closest('.ui-treenode'));$(this).closest('.updateAnswersPanel').css('display', 'none'); delete #{commentBoxB.id}_commentboxWrapper.newAnswers[commentid];">Show + # new replies</a></li> + </p:outputPanel> + + <p:outputPanel styleClass="typingUsers" + style="display: none;"> + <li class="bullet">•</li> + <li class="action"><span class="hiddenUsersTyping" + style="display: none;">{}</span> <a># Typing User</a></li> + </p:outputPanel> + </menu> + </footer> + </div> + </div> + </h:form> + </p:outputPanel> + + <p:outputPanel rendered="#{wrapper.left}"> + <div style="margin-top: 9px;" class="commentAnswerDivWrapper"> + <div class="avatar"> + <h:graphicImage + rendered="#{not empty commentBoxB.currentUserAvatarUrl}" + value="#{commentBoxB.currentUserAvatarUrl}" /> + </div> + + <div class="commentEditorDivAnswer"></div> + </div> + </p:outputPanel> + + </p:treeNode> + </p:tree> + </p:outputPanel> + + + + <p:outputPanel> + <div style="height: 0px;" class="MycommentAnswerDivWrapper"> + + <div class="commentEditorDivAnswer"></div> + </div> + </p:outputPanel> + + + </p:outputPanel> + + <p:separator style="margin: 14px 0 4px 0 !important;" /> + + <div id="bottom"></div> + + <p:messages id="messages2" for="newanswer" closable="true" autoUpdate="true" showSummary="true" showDetail="true" /> + + <h:form id="answerEditorForm" styleClass="answerEditorForm" + style="height: 0px; overflow: hidden; width:72%;"> + + + + + + + + <p:editor id="inlineEditor" maxlength="8000" + styleClass="my_editor commentseditor inlineEditor answerEditor" + value="#{commentBoxB.answer_comment_editor_text}" + controls="bold italic underline strikethrough | color | alignleft | center | alignright | link unlink | undo | redo" + height="120" widgetVar="answerEditorVar" /> + + <h:panelGrid columns="2" cellpadding="5"> + + <h:outputLabel for="guestname" + value="#{i18n['commentbox.guest.name']}:" /> + <p:inputText id="guestname" value="#{commentBoxB.guestName}" + style="width: 80%;" /> + + </h:panelGrid> + + <h:panelGrid columns="4" cellpadding="5"> + + <p:selectBooleanCheckbox onchange="if(emailNotificationFlag2==false){document.getElementsByClassName('myemail2')[0].style.display = 'block'; + document.getElementsByClassName('myemail2')[1].style.display = 'block'; emailNotificationFlag2=true;} else{ + document.getElementsByClassName('myemail2')[0].style.display = 'none'; + document.getElementsByClassName('myemail2')[1].style.display = 'none'; emailNotificationFlag2=false;}" + value="#{commentBoxB.guestEmailNotification}" /> + <h:outputText value="#{i18n['inform-by-email']}" /> + + <h:panelGroup id="help2"> + <p:graphicImage width="20" height="20" value="../resources/images/icon-help-circled-128.png"/> + </h:panelGroup> + <p:tooltip id="toolTipFade2" for="help2" value="#{i18n['inform-by-email-help']}"/> + + </h:panelGrid> + + <h:panelGrid columns="2" cellpadding="5"> + + <h:outputLabel for="email2" + value="#{i18n['commentbox.guest.email']}:" style="display: none;" styleClass="myemail2" /> + <p:inputText id="email2" value="#{commentBoxB.guestEmailAddress}" + style="width: 80%; direction: ltr; display:none;" styleClass="myemail2"/> + + </h:panelGrid> + + <h:panelGroup style="#{not commentBoxB.administratorFeatures ? '' : 'display: none;'}"> + <div id="recaptcha2" class="g-recaptcha" style="margin: 4px;"></div> + </h:panelGroup> + + <p:commandButton id="submitButton" ajax="true" + value="#{i18n['commentbox.editor.save']}" icon="ui-icon-disk" + update=":#{component.namingContainer.parent.namingContainer.clientId}:innerWrapper" + actionListener="#{commentBoxB.answerComment()}" + onclick="#{commentBoxB.id}_commentboxWrapper.submitAnswer();#{commentBoxB.id}_commentboxWrapper.initDiffNodes();" + oncomplete="if(typeof widgetId2 !== 'undefined'){grecaptcha.reset(widgetId2);}answerEditorVar.clear();#{commentBoxB.id}_commentboxWrapper.reShowEditors();#{commentBoxB.id}_commentboxWrapper.indicateNewNodes();" /> + + <p:commandButton rendered="#{commentBoxB.administratorFeatures}" + value="#{i18n['commentbox.editor.savedraft']}" + icon="ui-icon-pencil" actionListener="#{commentBoxB.saveAnswerCommentDraft}" /> + + <p:commandButton id="clearButton" type="button" + value="#{i18n['commentbox.editor.clear']}" + onclick="answerEditorVar.clear();" icon="ui-icon-close" /> + <p:commandButton id="cancelButton" type="button" + value="#{i18n['commentbox.editor.cancel']}" + onclick="#{commentBoxB.id}_commentboxWrapper.cancelCreateAnswer();" + icon="ui-icon-close" /> + <input id="currentAnswerComment" type="hidden" value="" + name="currentAnswerComment" /> + </h:form> + + <h:form styleClass="rcUserTypingForm"> + <p:remoteCommand id="rc" name="rcUserTyping" + actionListener="#{commentBoxB.onUserType}" + oncomplete="#{commentBoxB.id}_commentboxWrapper.rcUserTyping_callback();" /> + <input id="currentAnswerComment" type="hidden" value="" + name="currentAnswerComment" /> + </h:form> + + <h:form styleClass="rcGetAnswersForm"> + <p:remoteCommand id="rc" name="rcGetAnswers" + actionListener="#{commentBoxB.fetchNewAnswers()}" /> + <input id="currentAnswerComment" type="hidden" value="" + name="currentAnswerComment" /> + </h:form> + + <p:socket rendered="#{commentBoxB.enableLiveFeatures}" + onMessage="#{commentBoxB.id}_commentboxWrapper.handlePushMessage" + channel="/commentboxpush-#{commentBoxB.id}-#{commentBoxB.contextID}" + autoConnect="true" widgetVar="pushVar" /> + + </p:outputPanel> + + + <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit&hl=#{commentBoxB.currentLocale}" + async="async" defer="defer"> + </script> + + + <script type="text/javascript"> + jQuery(document).ready(function($) { + $(".my_editor").find('iframe').contents().find('body').attr('dir', '#{commentBoxB.currentLocale eq 'en' ? 'ltr' : 'rtl'}'); + }); +</script> + + + + <script type="text/javascript"> + //<![CDATA[ + var #{commentBoxB.id}_commentboxWrapper = new commentboxWidget('#{commentBoxB.id}', '', JSON.parse('#{commentBoxB.messageBundleAsJSON}')); + //]]> + </script> + + </h:body> +</f:view> \ No newline at end of file diff --git a/docroot/views/config.xhtml b/docroot/views/config.xhtml new file mode 100644 index 0000000..bf9f48b --- /dev/null +++ b/docroot/views/config.xhtml @@ -0,0 +1,166 @@ +<?xml version="1.0"?> + +<f:view xmlns="http://www.w3.org/1999/xhtml" + xmlns:c="http://java.sun.com/jsp/jstl/core" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:p="http://primefaces.org/ui" + xmlns:ui="http://java.sun.com/jsf/facelets"> + + + + <h:head> + <style> + .ui-widget-content .ui-state-highlight { + background-image:-moz-linear-gradient(top, #bfbfbf, #bfbfbf); + background-image:-webkit-gradient(linear, 0 0, 0 100%, from( #bfbfbf), to( #bfbfbf)); + background-image:-webkit-linear-gradient(top, #bfbfbf, #bfbfbf); + background-image:-o-linear-gradient(top, #bfbfbf, #bfbfbf); + background-image:linear-gradient(to bottom, #bfbfbf, #bfbfbf); + + } + </style> + </h:head> + <h:body> + <p:tabView id="configtab" + dir="#{configB.currentLocale eq 'en' ? 'ltr' : 'rtl'}"> + <p:tab title="#{i18n['Select-Topic']}"> + <p:panel header="#{i18n['Discussion-Topic']}"> + <h:form id="addtitleform"> + + <h:panelGrid columns="2" cellpadding="5" > + <h:outputLabel for="newtitle" value="#{i18n['New-Topic']}:" + /> + <p:inputText id="newtitle" value="#{configB.newTitleText}" + required="true" + requiredMessage="#{i18n['Please-enter--a-topic-first']}" style="width: 100%;" /> + + </h:panelGrid> + <p:commandButton value="#{i18n['Add']}" + actionListener="#{configB.addNewTitle}" + update=":#{component.namingContainer.parent.namingContainer.clientId}" /> + + </h:form> + + <p:separator /> + + + + <h:form id="form"> + + <p:messages id="messages2" for="savebutton" closable="true" + showSummary="true" showDetail="true" /> + <p:dataTable id="titles" value="#{configB.titleList}" var="title" editable="true" + dir="#{configB.currentLocale eq 'en' ? 'ltr' : 'rtl'}" + selection="#{configB.selectedTitle}" rowKey="#{title.titleId}" style="overflow-x: scroll;" + emptyMessage="#{i18n['There-is-no-title']}" > + + + <p:ajax event="rowEdit" listener="#{configB.onRowEdit}" /> + <p:ajax event="rowEditCancel" listener="#{configB.onRowCancel}" /> + + <p:column selectionMode="single" style="width:1%; text-align:center"/> + + <p:column style="width: 88%;" headerText="#{i18n['Titles']}"> + <p:cellEditor> + <f:facet name="output"><h:outputText value="#{title.titleText}"/></f:facet> + <f:facet name="input"><p:inputText id="modelInput" value="#{title.titleText}" + style="width:100%"/></f:facet> + </p:cellEditor> + </p:column> + + <p:column style="width:1%"> + <p:rowEditor/> + </p:column> + + <p:column style="width: 10%;" > + <p:commandButton value="#{i18n['Delete']}" + onclick="td#{title.titleId}.show()" + icon="ui-icon-close" title="Delete"> + + </p:commandButton> + + <p:confirmDialog message="#{i18n['Are-you-sure-about-deleting-this-title']}" header="#{i18n['Deleting-title']}" + severity="alert" widgetVar="td#{title.titleId}" dir="#{configB.currentLocale eq 'en' ? 'ltr' : 'rtl'}"> + <p:commandButton value="#{i18n['Yes']}" action="#{configB.deleteTitle}" update=":#{component.namingContainer.clientId}" + onclick="td#{title.titleId}.hide();" icon="ui-icon-check"> + <f:setPropertyActionListener value="#{title}" + target="#{configB.selectedTitle}" /> + </p:commandButton> + <p:commandButton value="#{i18n['No']}" onclick="td#{title.titleId}.hide();" type="button" icon="ui-icon-close" /> + </p:confirmDialog> + + </p:column> + + <f:facet name="footer"> + <p:commandButton value="#{i18n['Choose']}" + actionListener="#{configB.selectTitle}" update=":#{component.namingContainer.parent.namingContainer.parent.namingContainer.clientId}" /> + </f:facet> + + </p:dataTable> + </h:form> + + + + </p:panel> + </p:tab> + + <p:tab title="#{i18n['Verify-Comments']}"> + + <h:form> + <p:dataTable id="unverifiedcomments" var="unVerifiedComment" + dir="#{configB.currentLocale eq 'en' ? 'ltr' : 'rtl'}" + value="#{configB.unVerifiedCommentList}" + style="overflow-x: scroll;" + emptyMessage="#{i18n['There-is-no-unverified-comment']}"> + + <p:column style="text-align: center; width: 10%;" headerText="#{i18n['Guest-Name']}"> + <a id="#{unVerifiedComment.commentId}">#{unVerifiedComment.guestName}</a> + </p:column> + + <p:column style="text-align: center; width: 10%;" headerText="#{i18n['Reply-to']}"> + <a href="##{unVerifiedComment.parentId}">#{unVerifiedComment.parentName}</a> + </p:column> + + <p:column headerText="#{i18n['Comment']}" style="width: 60%;"> + <h:outputText style="white-space: pre-line;" escape="false" value="#{unVerifiedComment.commentText}" /> + </p:column> + + <p:column style="width: 10%;" > + <p:commandButton value="#{unVerifiedComment.verified eq false ? i18n['Verify'] : i18n['Unverify']}" + update="unverifiedcomments" action="#{configB.verifyComment}" + icon="ui-icon-check" title="Verify"> + <f:setPropertyActionListener value="#{unVerifiedComment}" + target="#{configB.selectedComment}" /> + </p:commandButton> + </p:column> + + <p:column style="width: 10%;" > + <p:commandButton value="#{i18n['Delete']}" onclick="cd#{unVerifiedComment.commentId}.show()" + icon="ui-icon-close" title="Delete"> + </p:commandButton> + + <p:confirmDialog message="#{i18n['Are-you-sure-about-deleting-this-comment']}" header="#{i18n['Deleting-comment']}" + severity="alert" widgetVar="cd#{unVerifiedComment.commentId}" dir="#{configB.currentLocale eq 'en' ? 'ltr' : 'rtl'}"> + <p:commandButton value="#{i18n['Yes']}" action="#{configB.deleteComment}" update="unverifiedcomments" + onclick="cd#{unVerifiedComment.commentId}.hide();" icon="ui-icon-check"> + <f:setPropertyActionListener value="#{unVerifiedComment}" + target="#{configB.selectedComment}" /> + </p:commandButton> + + <p:commandButton value="#{i18n['No']}" onclick="cd#{unVerifiedComment.commentId}.hide();" type="button" icon="ui-icon-close" /> + </p:confirmDialog> + </p:column> + + </p:dataTable> + + </h:form> + + </p:tab> + + </p:tabView> + + + </h:body> + +</f:view> \ No newline at end of file diff --git a/ivy.xml b/ivy.xml new file mode 100644 index 0000000..6c99bb1 --- /dev/null +++ b/ivy.xml @@ -0,0 +1,28 @@ +<?xml version="1.0"?> + +<ivy-module + version="2.0" + xmlns:m2="http://ant.apache.org/ivy/maven" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd" +> + <info module="portlet_primefaces_tmpl" organisation="com.liferay"> + <extends extendType="configurations,description,info" location="../../ivy.xml" module="com.liferay.sdk" organisation="com.liferay" revision="latest.integration" /> + </info> + + <dependencies defaultconf="default"> + <dependency name="jboss-el" org="org.jboss.el" rev="2.0.1.GA" /> + <dependency name="jsf-api" org="com.sun.faces" rev="2.2.14" /> + <dependency name="jsf-impl" org="com.sun.faces" rev="2.2.14" /> + <dependency name="liferay-faces-bridge-api" org="com.liferay.faces" rev="4.2.5-ga6" /> + <dependency name="liferay-faces-bridge-impl" org="com.liferay.faces" rev="4.2.5-ga6" /> + <dependency name="liferay-faces-portal" org="com.liferay.faces" rev="4.2.5-ga6" /> + <dependency name="liferay-faces-util" org="com.liferay.faces" rev="4.2.5-ga6" /> + + <dependency org="org.glassfish" name="javax.json" rev="1.0.2"/> + + <dependency conf="test->default" name="arquillian-junit-container" org="org.jboss.arquillian.junit" rev="1.1.6.Final" /> + <dependency conf="test->default" name="arquillian-tomcat-remote-7" org="org.jboss.arquillian.container" rev="1.0.0.CR6" /> + <dependency conf="test->default" name="com.liferay.ant.arquillian" org="com.liferay" rev="1.0.0-SNAPSHOT" /> + </dependencies> +</ivy-module> \ No newline at end of file diff --git a/ivy.xml.MD5 b/ivy.xml.MD5 new file mode 100644 index 0000000..c16322f --- /dev/null +++ b/ivy.xml.MD5 @@ -0,0 +1 @@ +0f53febeb36ce74adf6caa752392caf9 diff --git a/test/integration/arquillian.xml b/test/integration/arquillian.xml new file mode 100644 index 0000000..9413609 --- /dev/null +++ b/test/integration/arquillian.xml @@ -0,0 +1,15 @@ +<?xml version="1.0"?> + +<arquillian + xmlns="http://jboss.org/schema/arquillian" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd" +> + <container default="true" qualifier="tomcat"> + <configuration> + <property name="jmxPort">8099</property> + <property name="pass">tomcat</property> + <property name="user">tomcat</property> + </configuration> + </container> +</arquillian> \ No newline at end of file